diff --git a/mozilla/build/mac/build_scripts/MozillaBuildList.pm b/mozilla/build/mac/build_scripts/MozillaBuildList.pm
index 738266d978a..b048ef87e47 100644
--- a/mozilla/build/mac/build_scripts/MozillaBuildList.pm
+++ b/mozilla/build/mac/build_scripts/MozillaBuildList.pm
@@ -898,7 +898,6 @@ sub BuildClientDist()
}
#PLUGIN
- InstallFromManifest(":mozilla:modules:plugin:base:src:MANIFEST", "$distdirectory:plugin:");
InstallFromManifest(":mozilla:modules:plugin:base:public:MANIFEST", "$distdirectory:plugin:");
InstallFromManifest(":mozilla:modules:plugin:base:public:MANIFEST_IDL", "$distdirectory:idl:");
InstallFromManifest(":mozilla:modules:oji:src:MANIFEST", "$distdirectory:oji:");
diff --git a/mozilla/dom/src/base/nsPluginArray.h b/mozilla/dom/src/base/nsPluginArray.h
index 515be7c43f5..e72f2920563 100644
--- a/mozilla/dom/src/base/nsPluginArray.h
+++ b/mozilla/dom/src/base/nsPluginArray.h
@@ -46,7 +46,7 @@
class NavigatorImpl;
class nsIDocShell;
-struct nsIPluginHost;
+class nsIPluginHost;
class PluginArrayImpl : public nsIDOMPluginArray,
public nsIDOMJSPluginArray
diff --git a/mozilla/modules/plugin/base/macbuild/plugin.xml b/mozilla/modules/plugin/base/macbuild/plugin.xml
index 8a9c00b6ea5..92797b14447 100644
--- a/mozilla/modules/plugin/base/macbuild/plugin.xml
+++ b/mozilla/modules/plugin/base/macbuild/plugin.xml
@@ -507,7 +507,7 @@
This supersedes the old plugin API (npapi.h, npupp.h), and - * eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that - * get linked with the plugin. You will however need to link with the "backward - * adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0 - * browsers. - * - *
See nsPlugin.idl for an overview of how this interface fits with the - * overall plugin architecture. - */ -//////////////////////////////////////////////////////////////////////////////// - #include "nsISupports.idl" +#include "nspluginroot.idl" /** * nsICookieStorage - * - * Level of API support: BETA - * Subject to final review before 6/1/00. */ -[scriptable, uuid(b0175bf6-2dd8-11d4-8cf4-0060b0fc14a3)] +%{C++ +// {c8c05101-cfdb-11d2-bab8-b088e084e5bc} +#define NS_COOKIESTORAGE_CID \ +{ 0xc8c05101, 0xcfdb, 0x11d2, { 0xba, 0xb8, 0xb0, 0x88, 0xe0, 0x84, 0xe5, 0xbc } } +%} + +[uuid(c8c05100-cfdb-11d2-bab8-b088e084e5bc)] interface nsICookieStorage : nsISupports { /** * Retrieves a cookie from the browser's persistent cookie store. - * @param cookieURL URL string to look up cookie with. - * @param cookieCount on input, size of the cookie buffer, on output cookie's size. - * @param cookies array of cookie strings + * @param aCookieURL - URL string to look up cookie with. + * @param aCookieBuffer - buffer large enough to accomodate cookie data. + * @param aCookieSize - on input, size of the cookie buffer, on output cookie's size. */ - void getCookie(in wstring cookieURL, - out unsigned long cookieCount, - [size_is(cookieCount)] out string cookies); + void getCookie(in string aCookieURL, in voidPtr aCookieBuffer, in PRUint32Ref aCookieSize); /** * Stores a cookie in the browser's persistent cookie store. - * @param cookieURL URL string store cookie with. - * @param cookieCount specifies size of cookie data. - * @param cookieBuffer array of cookie strings + * @param aCookieURL - URL string store cookie with. + * @param aCookieBuffer - buffer containing cookie data. + * @param aCookieSize - specifies size of cookie data. */ - void setCookie(in wstring cookieURL, - in unsigned long cookieCount, - [size_is(cookieCount)] in string cookies); + void setCookie(in string aCookieURL, in constVoidPtr aCookieBuffer, in unsigned long aCookieSize); }; - diff --git a/mozilla/modules/plugin/base/public/nsIEventHandler.idl b/mozilla/modules/plugin/base/public/nsIEventHandler.idl index 9eac6c1b946..9c7bc414fe9 100644 --- a/mozilla/modules/plugin/base/public/nsIEventHandler.idl +++ b/mozilla/modules/plugin/base/public/nsIEventHandler.idl @@ -35,22 +35,12 @@ * * ***** END LICENSE BLOCK ***** */ -//////////////////////////////////////////////////////////////////////////////// -/** - * INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API). - * - *
This supersedes the old plugin API (npapi.h, npupp.h), and - * eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that - * get linked with the plugin. You will however need to link with the "backward - * adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0 - * browsers. - * - *
See nsPlugin.idl for an overview of how this interface fits with the - * overall plugin architecture. - */ -//////////////////////////////////////////////////////////////////////////////// +#include "nsISupports.idl" +#include "nspluginroot.idl" -#include "nsPluginDefs.idl" +%{C++ +#include "nsplugindefs.h" +%} [uuid(a447ddf0-1a99-11d2-815f-006008119d7a)] interface nsIEventHandler : nsISupports @@ -68,8 +58,9 @@ interface nsIEventHandler : nsISupports * * (Corresponds to NPP_HandleEvent.) * - * @param event - the event to be handled - * @result - PR_TRUE if event was handled + * @param aEvent - the event to be handled + * @param aHandled - set to PR_TRUE if event was handled + * @result - NS_OK if this operation was successful */ - boolean handleEvent(in nsPluginEventPtr event); + void handleEvent(in nsPluginEventPtr aEvent, out boolean aHandled); }; diff --git a/mozilla/modules/plugin/base/public/nsIHTTPHeaderListener.idl b/mozilla/modules/plugin/base/public/nsIHTTPHeaderListener.idl index 0f3bca7424d..b2e2cceaa02 100644 --- a/mozilla/modules/plugin/base/public/nsIHTTPHeaderListener.idl +++ b/mozilla/modules/plugin/base/public/nsIHTTPHeaderListener.idl @@ -39,7 +39,6 @@ #include "nsISupports.idl" /** - * The nsIHTTPHeaderListener interface allows plugin authors to * access HTTP Response headers after issuing an * nsIPluginManager::{GetURL,PostURL}() call.
@@ -50,24 +49,14 @@ * {GetURL,PostURL}()'s streamListener parameter. The browser will then * QI thi streamListener to see if it implements * nsIHTTPHeaderListener. - */ [scriptable, uuid(8b246748-1dd2-11b2-9512-9dc84a95fc2f)] interface nsIHTTPHeaderListener : nsISupports { - /** - * Called for each HTTP Response header. - * NOTE: You must copy the values of the params. - */ - void newResponseHeader(in string headerName, in string headerValue); }; - -//////////////////////////////////////////////////////////////////////////////// - -#endif /* nsIPluginStreamListener_h___ */ diff --git a/mozilla/modules/plugin/base/public/nsIJRILiveConnectPlugin.idl b/mozilla/modules/plugin/base/public/nsIJRILiveConnectPlugin.idl index b15420dc91a..4ccc9ad7ed9 100644 --- a/mozilla/modules/plugin/base/public/nsIJRILiveConnectPlugin.idl +++ b/mozilla/modules/plugin/base/public/nsIJRILiveConnectPlugin.idl @@ -35,23 +35,6 @@ * * ***** END LICENSE BLOCK ***** */ -//////////////////////////////////////////////////////////////////////////////// -/** - * INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API). - * - *
This supersedes the old plugin API (npapi.h, npupp.h), and - * eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that - * get linked with the plugin. You will however need to link with the "backward - * adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0 - * browsers. - * - *
See nsPlugin.idl for an overview of how this interface fits with the - * overall plugin architecture. - */ -//////////////////////////////////////////////////////////////////////////////// - -#include "nsPluginDefs.idl" - /** * nsIJRILiveConnectPlugin * @@ -62,6 +45,13 @@ * http://mozilla.org/projects/plugins/ */ +#include "nsISupports.idl" +#include "nspluginroot.idl" + +%{C++ +#include "jri.h" +%} + /** * The nsIJRILiveConnectPlugin interface defines additional entry points that a * plugin developer needs to implement in order for the plugin to support @@ -78,10 +68,11 @@ interface nsIJRILiveConnectPlugin : nsISupports * Returns the class of the Java instance to be associated with the * plugin. * - * (Corresponds to NPP_GetJavaClass.) + * (New JNI-based entry point, roughly corresponds to NPP_GetJavaClass.) * - * @result - a resulting reference to the Java class + * @param aJavaClass - a resulting reference to the Java class + * @result - NS_OK if this operation was successful */ - jref getJavaClass(in JRIEnvStar env); + void getJavaClass(in JRIEnvPtr aEnv, out jref aJavaClass); }; diff --git a/mozilla/modules/plugin/base/public/nsIPlugin.idl b/mozilla/modules/plugin/base/public/nsIPlugin.idl index 12e988d5b81..16c38db4b94 100644 --- a/mozilla/modules/plugin/base/public/nsIPlugin.idl +++ b/mozilla/modules/plugin/base/public/nsIPlugin.idl @@ -35,24 +35,6 @@ * * ***** END LICENSE BLOCK ***** */ -//////////////////////////////////////////////////////////////////////////////// -/** - * INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API). - * - *
This supersedes the old plugin API (npapi.h, npupp.h), and - * eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that - * get linked with the plugin. You will however need to link with the "backward - * adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0 - * browsers. - * - *
See nsPlugin.idl for an overview of how this interface fits with the - * overall plugin architecture. - */ -//////////////////////////////////////////////////////////////////////////////// - -#include "nsPluginDefs.idl" -#include "nsIFactory.idl" - /** * nsIPlugin * @@ -63,6 +45,13 @@ * http://mozilla.org/projects/plugins/ */ +#include "nsIFactory.idl" +#include "nspluginroot.idl" + +%{C++ +#include "nsplugindefs.h" +%} + %{C++ // {ffc63200-cf09-11d2-a5a0-bc8f7ad21dfc} #define NS_PLUGIN_CID \ @@ -89,7 +78,7 @@ * (e.g. by going back in the window history) after previously being stopped * by the Stop method. */ -[scriptable, uuid(0e2c3ce4-2de7-11d4-8cf4-0060b0fc14a3)] +[uuid(df773070-0199-11d2-815b-006008119d7a)] interface nsIPlugin : nsIFactory { /** @@ -98,13 +87,18 @@ interface nsIPlugin : nsIFactory * the specified MIME type. */ void createPluginInstance(in nsISupports aOuter, - in nsIIDRef iid, - in string pluginMIMEType, - [retval, iid_is(iid)] out nsQIResult result); + in nsIIDRef aIID, + in string aPluginMIMEType, + [retval, iid_is(aIID)] out nsQIResult aResult); /** * Initializes the plugin and will be called before any new instances are - * created. + * created. It is passed browserInterfaces on which QueryInterface + * may be used to obtain an nsIPluginManager, and other interfaces. + * + * @param browserInterfaces - an object that allows access to other browser + * interfaces via QueryInterface + * @result - NS_OK if this operation was successful */ void initialize(); @@ -113,6 +107,8 @@ interface nsIPlugin : nsIFactory * the plugin is disabled by the user. * * (Corresponds to NPP_Shutdown.) + * + * @result - NS_OK if this operation was successful */ void shutdown(); @@ -125,21 +121,20 @@ interface nsIPlugin : nsIFactory * * (Corresponds to NPP_GetMIMEDescription.) * - * @result - the resulting MIME description (freed with nsIAllocator::Free) + * @param aMIMEDescription - the resulting MIME description + * @result - NS_OK if this operation was successful */ - readonly attribute string MIMEDescription; + //readonly attribute string MIMEDescription; + void getMIMEDescription(out constCharPtr aMIMEDescription); /** - * Returns the name of the plugin. + * Returns the value of a variable associated with the plugin. * - * (Supersedes NPP_GetValue with NPPVpluginNameString.) - */ - readonly attribute wstring name; - - /** - * Returns the name of the plugin. + * (Corresponds to NPP_GetValue.) * - * (Supersedes NPP_GetValue with NPPVpluginDescriptionString.) + * @param aVariable - the plugin variable to get + * @param aValue - the address of where to store the resulting value + * @result - NS_OK if this operation was successful */ - readonly attribute wstring description; + void getValue(in nsPluginVariable aVariable, in voidPtr aValue); }; diff --git a/mozilla/modules/plugin/base/public/nsIPluginInstance.idl b/mozilla/modules/plugin/base/public/nsIPluginInstance.idl index b8a8d34bb7c..ce0db361c54 100644 --- a/mozilla/modules/plugin/base/public/nsIPluginInstance.idl +++ b/mozilla/modules/plugin/base/public/nsIPluginInstance.idl @@ -35,23 +35,6 @@ * * ***** END LICENSE BLOCK ***** */ -//////////////////////////////////////////////////////////////////////////////// -/** - * INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API). - * - *
This supersedes the old plugin API (npapi.h, npupp.h), and - * eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that - * get linked with the plugin. You will however need to link with the "backward - * adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0 - * browsers. - * - *
See nsPlugin.idl for an overview of how this interface fits with the - * overall plugin architecture. - */ -//////////////////////////////////////////////////////////////////////////////// - -#include "nsPluginDefs.idl" - /** * nsIPluginInstance * @@ -62,8 +45,14 @@ * http://mozilla.org/projects/plugins/ */ -//////////////////////////////////////////////////////////////////////////////// -// Plugin Instance Interface +#include "nsISupports.idl" +#include "nsIPluginStreamListener.idl" + +%{C++ +#include "nsplugindefs.h" +%} + +interface nsIPluginInstancePeer; /** * The nsIPluginInstance interface is the minimum interface plugin developers @@ -82,16 +71,17 @@ * Destroy -- called once, before the plugin instance peer is to be * destroyed. This method is used to destroy the plugin instance. */ -[scriptable, uuid(f69b5c56-2de9-11d4-8cf4-0060b0fc14a3)] +[uuid(ebe00f40-0199-11d2-815b-006008119d7a)] interface nsIPluginInstance : nsISupports { /** * Initializes a newly created plugin instance, passing to it the plugin * instance peer which it should use for all communication back to the browser. * - * @param peer - the corresponding plugin instance peer + * @param aPeer - the corresponding plugin instance peer + * @result - NS_OK if this operation was successful */ - void initialize(in nsIPluginInstancePeer peer); + void initialize(in nsIPluginInstancePeer aPeer); /** * Returns a reference back to the plugin instance peer. This method is @@ -99,7 +89,8 @@ interface nsIPluginInstance : nsISupports * instance. The implementation of this method should be sure to increment * the reference count on the peer by calling AddRef. * - * @result - the resulting plugin instance peer + * @param aPeer - the resulting plugin instance peer + * @result - NS_OK if this operation was successful */ readonly attribute nsIPluginInstancePeer peer; @@ -108,6 +99,8 @@ interface nsIPluginInstance : nsISupports * the plugin is first created and initialized, and may be called after the * plugin is stopped (via the Stop method) if the plugin instance is returned * to in the browser window's history. + * + * @result - NS_OK if this operation was successful */ void start(); @@ -116,6 +109,8 @@ interface nsIPluginInstance : nsISupports * This method will be called whenever the browser window goes on to display * another page and the page containing the plugin goes into the window's history * list. + * + * @result - NS_OK if this operation was successful */ void stop(); @@ -124,6 +119,8 @@ interface nsIPluginInstance : nsISupports * it become no longer possible to return to the plugin instance, either because * the browser window's history list of pages is being trimmed, or because the * window containing this page in the history is being closed. + * + * @result - NS_OK if this operation was successful */ void destroy(); @@ -132,9 +129,10 @@ interface nsIPluginInstance : nsISupports * * (Corresponds to NPP_SetWindow.) * - * @param window - the plugin window structure + * @param aWindow - the plugin window structure + * @result - NS_OK if this operation was successful */ - [noscript] void setWindow(in nsPluginWindowPtr window); + void setWindow(in nsPluginWindowPtr aWindow); /** * Called to tell the plugin that the initial src/data stream is @@ -142,17 +140,46 @@ interface nsIPluginInstance : nsISupports * * (Corresponds to NPP_NewStream.) * - * @result - listener the browser will use to give the plugin the data + * @param aListener - listener the browser will use to give the plugin the data + * @result - NS_OK if this operation was successful */ - nsIPluginStreamListener newStream(); + void newStream(out nsIPluginStreamListener aListener); /** * Called to instruct the plugin instance to print itself to a printer. * * (Corresponds to NPP_Print.) * - * @param platformPrint - platform-specific printing information + * @param aPlatformPrint - platform-specific printing information + * @result - NS_OK if this operation was successful + */ + void print(in nsPluginPrintPtr aPlatformPrint); + + /** + * Returns the value of a variable associated with the plugin instance. + * + * @param aVariable - the plugin instance variable to get + * @param aValue - the address of where to store the resulting value + * @result - NS_OK if this operation was successful + */ + void getValue(in nsPluginInstanceVariable aVariable, in voidPtr aValue); + + /** + * Handles an event. An nsIEventHandler can also get registered with with + * nsIPluginManager2::RegisterWindow and will be called whenever an event + * comes in for that window. + * + * Note that for Unix and Mac the nsPluginEvent structure is different + * from the old NPEvent structure -- it's no longer the native event + * record, but is instead a struct. This was done for future extensibility, + * and so that the Mac could receive the window argument too. For Windows + * and OS2, it's always been a struct, so there's no change for them. + * + * (Corresponds to NPP_HandleEvent.) + * + * @param aEvent - the event to be handled + * @param aHandled - set to PR_TRUE if event was handled * @result - NS_OK if this operation was successful */ - [noscript] void print(in nsPluginPrintPtr platformPrint); + void handleEvent(in nsPluginEventPtr aEvent, out boolean aHandled); }; diff --git a/mozilla/modules/plugin/base/public/nsIPluginInstancePeer.idl b/mozilla/modules/plugin/base/public/nsIPluginInstancePeer.idl index 29b1f0e0f78..acc6e52036d 100644 --- a/mozilla/modules/plugin/base/public/nsIPluginInstancePeer.idl +++ b/mozilla/modules/plugin/base/public/nsIPluginInstancePeer.idl @@ -35,23 +35,6 @@ * * ***** END LICENSE BLOCK ***** */ -//////////////////////////////////////////////////////////////////////////////// -/** - * INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API). - * - *
This supersedes the old plugin API (npapi.h, npupp.h), and - * eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that - * get linked with the plugin. You will however need to link with the "backward - * adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0 - * browsers. - * - *
See nsPlugin.idl for an overview of how this interface fits with the - * overall plugin architecture. - */ -//////////////////////////////////////////////////////////////////////////////// - -#include "nsPluginDefs.idl" - /** * nsIPluginInstancePeer * @@ -62,8 +45,15 @@ * http://mozilla.org/projects/plugins/ */ -//////////////////////////////////////////////////////////////////////////////// -// Plugin Instance Peer Interface +#include "nsISupports.idl" +#include "nspluginroot.idl" + +%{C++ +#include "nsplugindefs.h" +struct JSObject; +%} + +interface nsIOutputStream; /** * The nsIPluginInstancePeer interface is the set of operations implemented @@ -74,21 +64,28 @@ * Other interfaces may be obtained from nsIPluginInstancePeer by calling * QueryInterface, e.g. nsIPluginTagInfo. */ -[scriptable, uuid(f7d64b8a-2df3-11d4-8cf4-0060b0fc14a3)] +[uuid(4b7cea20-019b-11d2-815b-006008119d7a)] interface nsIPluginInstancePeer : nsISupports { /** + * Returns the value of a variable associated with the plugin manager. + * + * (Corresponds to NPN_GetValue.) + * + * @param aVariable - the plugin manager variable to get + * @param aValue - the address of where to store the resulting value + * @result - NS_OK if this operation was successful + */ + void getValue(in nsPluginInstancePeerVariable aVariable, in voidPtr aValue); + /** * Returns the MIME type of the plugin instance. * * (Corresponds to NPP_New's MIMEType argument.) * - * @result - resulting MIME type + * @param aMIMEType - resulting MIME type + * @result - NS_OK if this operation was successful */ - readonly attribute string MIMEType; - - // plugin modes: - const unsigned long MODE_EMBEDDED = 1; - const unsigned long MODE_FULL = 2; + readonly attribute nsMIMEType MIMEType; /** * Returns the mode of the plugin instance, i.e. whether the plugin is @@ -96,9 +93,10 @@ interface nsIPluginInstancePeer : nsISupports * * (Corresponds to NPP_New's mode argument.) * - * @result - the resulting mode + * @param result - the resulting mode + * @result - NS_OK if this operation was successful */ - readonly attribute unsigned long mode; + readonly attribute nsPluginMode mode; /** * This operation is called by the plugin instance when it wishes to send @@ -108,12 +106,12 @@ interface nsIPluginInstancePeer : nsISupports * * (Corresponds to NPN_NewStream.) * - * @param type - type MIME type of the stream to create - * @param target - the target window name to receive the data - * @result - the resulting output stream + * @param aType - MIME type of the stream to create + * @param aTarget - the target window name to receive the data + * @param aResult - the resulting output stream + * @result - NS_OK if this operation was successful */ - nsIOutputStream newStream(in string mimeType, - in wstring targetWindow); + void newStream(in nsMIMEType aType, in string aTarget, out nsIOutputStream aResult); /** * This operation causes status information to be displayed on the window @@ -121,16 +119,17 @@ interface nsIPluginInstancePeer : nsISupports * * (Corresponds to NPN_Status.) * - * @param message - the status message to display + * @param aMessage - the status message to display + * @result - NS_OK if this operation was successful */ - void showStatus(in wstring message); + void showStatus(in string aMessage); /** * Set the desired size of the window in which the plugin instance lives. * - * @param width - new window width - * @param height - new window height + * @param aWidth - new window width + * @param aHeight - new window height + * @result - NS_OK if this operation was successful */ - void setWindowSize(in unsigned long width, - in unsigned long height); + void setWindowSize(in unsigned long aWidth, in unsigned long aHeight); }; diff --git a/mozilla/modules/plugin/base/public/nsIPluginInstancePeer2.idl b/mozilla/modules/plugin/base/public/nsIPluginInstancePeer2.idl index 4151526530e..2f9cff4fedf 100644 --- a/mozilla/modules/plugin/base/public/nsIPluginInstancePeer2.idl +++ b/mozilla/modules/plugin/base/public/nsIPluginInstancePeer2.idl @@ -35,23 +35,6 @@ * * ***** END LICENSE BLOCK ***** */ -//////////////////////////////////////////////////////////////////////////////// -/** - * INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API). - * - *
This supersedes the old plugin API (npapi.h, npupp.h), and - * eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that - * get linked with the plugin. You will however need to link with the "backward - * adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0 - * browsers. - * - *
See nsPlugin.idl for an overview of how this interface fits with the - * overall plugin architecture. - */ -//////////////////////////////////////////////////////////////////////////////// - -#include "nsIPluginInstancePeer.idl" - /** * nsIPluginInstancePeer2 * @@ -62,33 +45,46 @@ * http://mozilla.org/projects/plugins/ */ +#include "nsIPluginInstancePeer.idl" + +%{C++ +struct JSObject; +struct JSContext; +%} + +[ptr] native JSObjectPtr(JSObject); +[ptr] native JSContextPtr(JSContext); + /** * The nsIPluginInstancePeer2 interface extends the nsIPluginInstancePeer * interface, providing access to functionality provided by newer browsers. * All functionality in nsIPluginInstancePeer can be mapped to the 4.X * plugin API. */ -[scriptable, uuid(e7d48c00-e1f1-11d2-8360-fbc8abc4ae7c)] +[uuid(e7d48c00-e1f1-11d2-8360-fbc8abc4ae7c)] interface nsIPluginInstancePeer2 : nsIPluginInstancePeer { /** * Get the JavaScript window object corresponding to this plugin instance. * - * @result - the resulting JavaScript window object + * @param aJSWindow - the resulting JavaScript window object + * @result - NS_OK if this operation was successful */ - [noscript] readonly attribute JSObjectPtr JSWindow; + readonly attribute JSObjectPtr JSWindow; /** * Get the JavaScript execution thread corresponding to this plugin instance. * - * @result - the resulting JavaScript thread + * @param aJSThread - the resulting JavaScript thread id + * @result - NS_OK if this operation was successful */ readonly attribute unsigned long JSThread; /** * Get the JavaScript context to this plugin instance. * - * @result - the resulting JavaScript context + * @param aJSContext - the resulting JavaScript context + * @result - NS_OK if this operation was successful */ - [noscript] readonly attribute JSContextPtr JSContext; + readonly attribute JSContextPtr JSContext; }; diff --git a/mozilla/modules/plugin/base/public/nsIPluginManager.idl b/mozilla/modules/plugin/base/public/nsIPluginManager.idl index f12cff4c4c9..1376695381a 100644 --- a/mozilla/modules/plugin/base/public/nsIPluginManager.idl +++ b/mozilla/modules/plugin/base/public/nsIPluginManager.idl @@ -35,26 +35,6 @@ * * ***** END LICENSE BLOCK ***** */ -//////////////////////////////////////////////////////////////////////////////// -/** - * INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API). - * - *
This supersedes the old plugin API (npapi.h, npupp.h), and - * eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that - * get linked with the plugin. You will however need to link with the "backward - * adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0 - * browsers. - * - *
See nsPlugin.idl for an overview of how this interface fits with the - * overall plugin architecture. - */ -//////////////////////////////////////////////////////////////////////////////// - -#include "nsISupports.idl" -%{C++ -#include "nsplugindefs.h" -%} - /** * nsIPluginManager * @@ -65,6 +45,13 @@ * http://mozilla.org/projects/plugins/ */ +#include "nsISupports.idl" +#include "nspluginroot.idl" + +%{C++ +#include "nsplugindefs.h" +%} + // CLSID for the browser's global plugin manager object. %{C++ #define NS_PLUGINMANAGER_CID \ @@ -77,10 +64,6 @@ %} interface nsIPluginStreamListener; -native nsPluginManagerVariable(nsPluginManagerVariable); -native REFNSIID(REFNSIID); -native nativeVoid(void *); -native nativeChar(const char * *); [scriptable, uuid(da58ad80-4eb6-11d2-8164-006008119d7a)] @@ -93,7 +76,6 @@ native nativeChar(const char * *); interface nsIPluginManager : nsISupports { - /** * Returns the value of a variable associated with the plugin manager. * @@ -103,8 +85,7 @@ interface nsIPluginManager : nsISupports * @param value - the address of where to store the resulting value * @result - NS_OK if this operation was successful */ - [noscript] void GetValue(in nsPluginManagerVariable variable, - in nativeVoid value); + [noscript] void GetValue(in nsPluginManagerVariable variable, in nativeVoid value); /** * Causes the plugins directory to be searched again for new plugin @@ -240,23 +221,18 @@ interface nsIPluginManager : nsISupports */ [noscript] void UnregisterPlugin(in REFNSIID aCID); +%{C++ /** * Fetches a URL, with Headers - * @see GetURL. Identical except for additional params headers and * headersLen - * @param getHeadersLength - the length of getHeaders (if non-NULL) - * @param getHeaders - the headers to GET. Must be in the form of * "HeaderName: HeaderValue\r\n". Each header, including the last, * must be followed by "\r\n". NULL specifies that there are no * get headers - * @result - NS_OK if this operation was successful - */ -%{C++ NS_IMETHOD GetURLWithHeaders(nsISupports* pluginInst, const char* url, @@ -268,6 +244,4 @@ interface nsIPluginManager : nsISupports PRUint32 getHeadersLength = 0, const char* getHeaders = NULL) = 0; %} - }; - diff --git a/mozilla/modules/plugin/base/public/nsIPluginManager2.idl b/mozilla/modules/plugin/base/public/nsIPluginManager2.idl index bc72199934b..082ff2b7d0e 100644 --- a/mozilla/modules/plugin/base/public/nsIPluginManager2.idl +++ b/mozilla/modules/plugin/base/public/nsIPluginManager2.idl @@ -35,71 +35,116 @@ * * ***** END LICENSE BLOCK ***** */ -//////////////////////////////////////////////////////////////////////////////// -/** - * INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API). - * - *
This supersedes the old plugin API (npapi.h, npupp.h), and - * eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that - * get linked with the plugin. You will however need to link with the "backward - * adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0 - * browsers. - * - *
See nsPlugin.idl for an overview of how this interface fits with the - * overall plugin architecture. - */ -//////////////////////////////////////////////////////////////////////////////// - #include "nsIPluginManager.idl" +interface nsIPlugin; +interface nsIEventHandler; + +native nsPluginPlatformWindowRef(nsPluginPlatformWindowRef); + /** * Plugin Manager 2 Interface * These extensions to nsIPluginManager are only available in Communicator 5.0. */ -[scriptable, uuid(99967220-2df8-11d4-8cf4-0060b0fc14a3)] +[uuid(d2962dc0-4eb6-11d2-8164-006008119d7a)] interface nsIPluginManager2 : nsIPluginManager { - /** - * Puts up a wait cursor. - */ - void beginWaitCursor(); + /** + * Puts up a wait cursor. + * + * @result - NS_OK if this operation was successful + */ + void beginWaitCursor(); - /** - * Restores the previous (non-wait) cursor. - */ - void endWaitCursor(); + /** + * Restores the previous (non-wait) cursor. + * + * @result - NS_OK if this operation was successful + */ + void endWaitCursor(); - /** - * Returns true if a URL protocol (e.g. "http") is supported. - * - * @param protocol - the protocol name - * @result - true if the protocol is supported - */ - boolean supportsURLProtocol(in string protocol); + /** + * Returns true if a URL protocol (e.g. "http") is supported. + * + * @param aProtocol - the protocol name + * @param aResult - true if the protocol is supported + * @result - NS_OK if this operation was successful + */ + void supportsURLProtocol(in string aProtocol, out boolean aResult); - /** - * This method may be called by the plugin to indicate that an error - * has occurred, e.g. that the plugin has failed or is shutting down - * spontaneously. This allows the browser to clean up any plugin-specific - * state. - * - * @param plugin - the plugin whose status is changing - * @param errorStatus - the the error status value - */ - void notifyStatusChange(in nsIPlugin plugin, - in nsresult errorStatus); - - /** - * Returns the proxy info for a given URL. The caller is required to - * free the resulting memory with nsIAllocator::Free. The result will be in the - * following format - * - * i) "DIRECT" -- no proxy - * ii) "PROXY xxx.xxx.xxx.xxx" -- use proxy - * iii) Mixed. e.g. "PROXY 111.111.111.111;PROXY 112.112.112.112", - * "PROXY 111.111.111.111;... - * - * Which proxy to use is determined by the plugin. - */ - string findProxyForURL(in wstring url); + /** + * This method may be called by the plugin to indicate that an error + * has occurred, e.g. that the plugin has failed or is shutting down + * spontaneously. This allows the browser to clean up any plugin-specific + * state. + * + * @param aPlugin - the plugin whose status is changing + * @param aStatus - the error status value + * @result - NS_OK if this operation was successful + */ + void notifyStatusChange(in nsIPlugin aPlugin, in nsresult aStatus); + + /** + * Returns the proxy info for a given URL. The caller is required to + * free the resulting memory with nsIMalloc::Free. The result will be in the + * following format + * + * i) "DIRECT" -- no proxy + * ii) "PROXY xxx.xxx.xxx.xxx" -- use proxy + * iii) "SOCKS xxx.xxx.xxx.xxx" -- use SOCKS + * iv) Mixed. e.g. "PROXY 111.111.111.111;PROXY 112.112.112.112", + * "PROXY 111.111.111.111;SOCKS 112.112.112.112".... + * + * Which proxy/SOCKS to use is determined by the plugin. + */ + void findProxyForURL(in string aURL, out string aResult); + + /** + * Registers a top-level window with the browser. Events received by that + * window will be dispatched to the event handler specified. + * + * @param aHandler - the event handler for the window + * @param aWindow - the platform window reference + * @result - NS_OK if this operation was successful + */ + void registerWindow(in nsIEventHandler aHandler, in nsPluginPlatformWindowRef aWindow); + + /** + * Unregisters a top-level window with the browser. The handler and window pair + * should be the same as that specified to RegisterWindow. + * + * @param aHandler - the event handler for the window + * @param aWindow - the platform window reference + * @result - NS_OK if this operation was successful + */ + void unregisterWindow(in nsIEventHandler aHandler, in nsPluginPlatformWindowRef aWindow); + + /** + * Allocates a new menu ID (for the Mac). + * + * @param aHandler - the event handler for the window + * @param aIsSubmenu - whether this is a sub-menu ID or not + * @param aResult - the resulting menu ID + * @result - NS_OK if this operation was successful + */ + void allocateMenuID(in nsIEventHandler aHandler, in boolean aIsSubmenu, out short aResult); + + /** + * Deallocates a menu ID (for the Mac). + * + * @param aHandler - the event handler for the window + * @param aMenuID - the menu ID + * @result - NS_OK if this operation was successful + */ + void deallocateMenuID(in nsIEventHandler aHandler, in short aMenuID); + + /** + * Indicates whether this event handler has allocated the given menu ID. + * + * @param aHandler - the event handler for the window + * @param aMenuID - the menu ID + * @param aResult - returns PR_TRUE if the menu ID is allocated + * @result - NS_OK if this operation was successful + */ + void hasAllocatedMenuID(in nsIEventHandler aHandler, in short aMenuID, out boolean aResult); }; diff --git a/mozilla/modules/plugin/base/public/nsIPluginStreamInfo.idl b/mozilla/modules/plugin/base/public/nsIPluginStreamInfo.idl index 8f8efd1b9f9..be53a4468bf 100644 --- a/mozilla/modules/plugin/base/public/nsIPluginStreamInfo.idl +++ b/mozilla/modules/plugin/base/public/nsIPluginStreamInfo.idl @@ -35,23 +35,6 @@ * * ***** END LICENSE BLOCK ***** */ -//////////////////////////////////////////////////////////////////////////////// -/** - * INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API). - * - *
This supersedes the old plugin API (npapi.h, npupp.h), and - * eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that - * get linked with the plugin. You will however need to link with the "backward - * adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0 - * browsers. - * - *
See nsPlugin.idl for an overview of how this interface fits with the - * overall plugin architecture. - */ -//////////////////////////////////////////////////////////////////////////////// - -#include "nsPluginDefs.idl" - /** * nsIPluginStreamInfo * @@ -62,18 +45,27 @@ * http://mozilla.org/projects/plugins/ */ -[scriptable, uuid(c3062ffa-2df9-11d4-8cf4-0060b0fc14a3)] +#include "nsISupports.idl" +#include "nspluginroot.idl" + +%{C++ +#include "nsplugindefs.h" +%} + +[uuid(ed7d4ca0-b005-11d2-adaa-00805f6dec49)] interface nsIPluginStreamInfo : nsISupports { - readonly attribute string contentType; + readonly attribute nsMIMEType contentType; - boolean isSeekable(); + void isSeekable(out boolean aSeekable); readonly attribute unsigned long length; readonly attribute unsigned long lastModified; - readonly attribute wstring URL; + void getURL(out constCharPtr aURL); - [noscript] void requestRead(in nsByteRangePtr rangeList); + void requestRead(in nsByteRangePtr aRangeList); + + attribute long streamOffset; }; diff --git a/mozilla/modules/plugin/base/public/nsIPluginStreamListener.idl b/mozilla/modules/plugin/base/public/nsIPluginStreamListener.idl index f3f3287409a..b1aac85986d 100644 --- a/mozilla/modules/plugin/base/public/nsIPluginStreamListener.idl +++ b/mozilla/modules/plugin/base/public/nsIPluginStreamListener.idl @@ -35,23 +35,6 @@ * * ***** END LICENSE BLOCK ***** */ -//////////////////////////////////////////////////////////////////////////////// -/** - * INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API). - * - *
This supersedes the old plugin API (npapi.h, npupp.h), and - * eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that - * get linked with the plugin. You will however need to link with the "backward - * adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0 - * browsers. - * - *
See nsPlugin.idl for an overview of how this interface fits with the
- * overall plugin architecture.
- */
-////////////////////////////////////////////////////////////////////////////////
-
-#include "nsPluginDefs.idl"
-
/**
* nsIPluginStreamListener
*
@@ -62,59 +45,75 @@
* http://mozilla.org/projects/plugins/
*/
+#include "nsISupports.idl"
+#include "nspluginroot.idl"
+#include "nsIPluginStreamInfo.idl"
+#include "nsIInputStream.idl"
+
+%{C++
+#include "nsplugindefs.h"
+%}
+
/**
* The nsIPluginStreamListener interface defines the minimum set of functionality that
* the browser will support if it allows plugins. Plugins can call QueryInterface
* to determine if a plugin manager implements more specific APIs or other
* browser interfaces for the plugin to use (e.g. nsINetworkManager).
*/
-[scriptable, uuid(faa328a8-2dfb-11d4-8cf4-0060b0fc14a3)]
+[uuid(df055770-5448-11d2-8164-006008119d7a)]
interface nsIPluginStreamListener : nsISupports
{
/**
* Notify the observer that the URL has started to load. This method is
* called only once, at the beginning of a URL load.
+ *
+ * @param aPluginInfo - plugin stream info
+ * @return - the return value is currently ignored, in the future
+ * it may be used to cancel the URL load..
*/
- void onStartBinding(in nsIPluginStreamInfo pluginInfo);
+ void onStartBinding(in nsIPluginStreamInfo aPluginInfo);
/**
* Notify the client that data is available in the input stream. This
* method is called whenver data is written into the input stream by the
* networking library...
*
- * @param aIStream The input stream containing the data. This stream can
+ * @param aPluginInfo - plugin stream info
+ * @param aInputStream - the input stream containing the data. This stream can
* be either a blocking or non-blocking stream.
- * @param length The amount of data that was just pushed into the stream.
+ * @param aLength - the amount of data that was just pushed into the stream.
+ * @return - the return value is currently ignored.
*/
- void onDataAvailable(in nsIPluginStreamInfo pluginInfo,
- in nsIInputStream input,
- in unsigned long sourceOffset,
- in unsigned long length);
+ void onDataAvailable(in nsIPluginStreamInfo aPluginInfo,
+ in nsIInputStream aInputStream,
+ in unsigned long aLength);
- void onFileAvailable(in nsIPluginStreamInfo pluginInfo,
- in nsIFile fileName);
+ /**
+ * Notify the client that data is available in the file.
+ *
+ * @param aPluginInfo - plugin stream info
+ * @param aFileName - the name of the file containing the data
+ * @return - the return value is currently ignored.
+ */
+ void onFileAvailable(in nsIPluginStreamInfo aPluginInfo, in string aFileName);
/**
* Notify the observer that the URL has finished loading. This method is
* called once when the networking library has finished processing the
- * URL transaction.
+ * URL transaction initiatied via the nsINetService::Open(...) call.
*
* This method is called regardless of whether the URL loaded successfully.
*
- * @param status Status code for the URL load.
- * @param msg A text string describing the error.
+ * @param aPluginInfo - plugin stream info
+ * @param aStatus - reason why the stream has been terminated
+ * @return - the return value is currently ignored.
*/
- void onStopBinding(in nsIPluginStreamInfo pluginInfo,
- in nsresult status);
+ void onStopBinding(in nsIPluginStreamInfo aPluginInfo, in nsresult aStatus);
- const unsigned long STREAMTYPE_NORMAL = 1;
- const unsigned long STREAMTYPE_SEEK = 2;
- const unsigned long STREAMTYPE_ASFILE = 3;
- const unsigned long STREAMTYPE_ASFILEONLY = 4;
-
- readonly attribute unsigned long streamType;
+ /**
+ * Gets the type of the stream
+ *
+ * @param aStreamType - the type of the stream
+ */
+ readonly attribute nsPluginStreamType streamType;
};
-
-////////////////////////////////////////////////////////////////////////////////
-
-#endif /* nsIPluginStreamListener_h___ */
diff --git a/mozilla/modules/plugin/base/public/nsIPluginTagInfo.idl b/mozilla/modules/plugin/base/public/nsIPluginTagInfo.idl
index e799db0b706..4d64b64e7f2 100644
--- a/mozilla/modules/plugin/base/public/nsIPluginTagInfo.idl
+++ b/mozilla/modules/plugin/base/public/nsIPluginTagInfo.idl
@@ -35,23 +35,6 @@
*
* ***** END LICENSE BLOCK ***** */
-////////////////////////////////////////////////////////////////////////////////
-/**
- * INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).
- *
- *
This supersedes the old plugin API (npapi.h, npupp.h), and - * eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that - * get linked with the plugin. You will however need to link with the "backward - * adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0 - * browsers. - * - *
See nsPlugin.idl for an overview of how this interface fits with the - * overall plugin architecture. - */ -//////////////////////////////////////////////////////////////////////////////// - -#include "nsPluginDefs.idl" - /** * nsIPluginTagInfo * @@ -62,33 +45,45 @@ * http://mozilla.org/projects/plugins/ */ +#include "nsISupports.idl" +#include "nspluginroot.idl" + +%{C++ +#include "nsplugindefs.h" +%} + +interface nsIDOMElement; + /** * Plugin Tag Info Interface * This interface provides information about the HTML tag on the page. * Some day this might get superseded by a DOM API. */ -[scriptable, uuid(6aa8a500-2dfd-11d4-8cf4-0060b0fc14a3)] + +[uuid(5f1ec1d0-019b-11d2-815b-006008119d7a)] interface nsIPluginTagInfo : nsISupports { - // QueryInterface on nsIPluginInstancePeer to get this. - - // (Corresponds to NPP_New's argc, argn, and argv arguments.) - // Get a ptr to the paired list of attribute names and values, - // returns the length of the array. - // - // Each name or value is a null-terminated string. - void getAttributes(out unsigned long count, - [array, size_is(count)] out wstring names, - [array, size_is(count)] out wstring values); + /** + * QueryInterface on nsIPluginInstancePeer to get this. + * + * (Corresponds to NPP_New's argc, argn, and argv arguments.) + * Get a ptr to the paired list of attribute names and values, + * returns the length of the array. + * + * Each name or value is a null-terminated string. + */ + void getAttributes(in PRUint16Ref aCount, + in constCharStarConstStar aNames, + in constCharStarConstStar aValues); /** * Gets the value for the named attribute. * - * @param name - the name of the attribute to find - * @param result - the resulting attribute + * @param aName - the name of the attribute to find + * @param aResult - the resulting attribute * @result - NS_OK if this operation was successful, NS_ERROR_FAILURE if * this operation failed. result is set to NULL if the attribute is not found * else to the found value. */ - wstring getAttribute(in wstring name); + void getAttribute(in string aName, out constCharPtr aResult); }; diff --git a/mozilla/modules/plugin/base/public/nsIPluginTagInfo2.idl b/mozilla/modules/plugin/base/public/nsIPluginTagInfo2.idl index 38d671a0e66..b319d24b1ce 100644 --- a/mozilla/modules/plugin/base/public/nsIPluginTagInfo2.idl +++ b/mozilla/modules/plugin/base/public/nsIPluginTagInfo2.idl @@ -35,25 +35,6 @@ * * ***** END LICENSE BLOCK ***** */ -//////////////////////////////////////////////////////////////////////////////// -/** - * INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API). - * - *
This supersedes the old plugin API (npapi.h, npupp.h), and - * eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that - * get linked with the plugin. You will however need to link with the "backward - * adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0 - * browsers. - * - *
See nsPlugin.idl for an overview of how this interface fits with the - * overall plugin architecture. - */ -//////////////////////////////////////////////////////////////////////////////// - -#include "nsIPluginTagInfo.idl" - -interface nsIDOMElement; - /** * nsIPluginTagInfo2 * @@ -64,27 +45,32 @@ interface nsIDOMElement; * http://mozilla.org/projects/plugins/ */ -[scriptable, uuid(e4003382-2dfd-11d4-8cf4-0060b0fc14a3)] +#include "nsIPluginTagInfo.idl" + +%{C++ +enum nsPluginTagType { + nsPluginTagType_Unknown, + nsPluginTagType_Embed, + nsPluginTagType_Object, + nsPluginTagType_Applet +}; +%} + +native nsPluginTagType(nsPluginTagType); + +[uuid(6a49c9a0-019b-11d2-815b-006008119d7a)] interface nsIPluginTagInfo2 : nsIPluginTagInfo { - // QueryInterface on nsIPluginInstancePeer to get this. - - const unsigned long TAGTYPE_UNKNOWN = 0; - const unsigned long TAGTYPE_EMBED = 1; - const unsigned long TAGTYPE_OBJECT = 2; - const unsigned long TAGTYPE_APPLET = 3; - /** * Get the type of the HTML tag that was used ot instantiate this * plugin. Currently supported tags are EMBED, OBJECT and APPLET. */ - readonly attribute unsigned long tagType; + readonly attribute nsPluginTagType tagType; /** - * Get the complete text of the HTML tag that was - * used to instantiate this plugin. + * Get the complete text of the HTML tag that was used to instantiate this plugin. */ - readonly attribute wstring tagText; + void getTagText(out constCharPtr aTagText); /** * Get a ptr to the paired list of parameter names and values, @@ -92,40 +78,58 @@ interface nsIPluginTagInfo2 : nsIPluginTagInfo * * Each name or value is a null-terminated string. */ - void getParameters(out unsigned long count, - [array, size_is(count)] out wstring names, - [array, size_is(count)] out wstring values); + void getParameters(in PRUint16Ref aCount, + in constCharStarConstStar aNames, + in constCharStarConstStar aValues); /** * Get the value for the named parameter. Returns null * if the parameter was not set. - * @result - NS_OK if this operation was successful, NS_ERROR_FAILURE if - * this operation failed. result is set to NULL if the attribute is not found - * else to the found value. + * + * @param aName - name of the parameter + * @param aResult - parameter value + * @result - NS_OK if this operation was successful */ - wstring getParameter(in wstring name); + void getParameter(in string aName, out constCharPtr aResult); - readonly attribute wstring documentBase; + /** + * Get the document base + */ + void getDocumentBase(out constCharPtr aDocumentBase); /** * Return an encoding whose name is specified in: * http://java.sun.com/products/jdk/1.1/docs/guide/intl/intl.doc.html#25303 */ - readonly attribute string documentEncoding; + void getDocumentEncoding(out constCharPtr aDocumentEncoding); - readonly attribute string alignment; + /** + * Get object alignment + */ + void getAlignment(out constCharPtr aElignment); + /** + * Get object width + */ readonly attribute unsigned long width; + /** + * Get object height + */ readonly attribute unsigned long height; + /** + * Get border vertical space + */ readonly attribute unsigned long borderVertSpace; + /** + * Get border horizontal space + */ readonly attribute unsigned long borderHorizSpace; /** - * Returns a unique id for the current document on which the - * plugin is displayed. + * Returns a unique id for the current document containing plugin */ readonly attribute unsigned long uniqueID; @@ -133,7 +137,7 @@ interface nsIPluginTagInfo2 : nsIPluginTagInfo * Returns the DOM element corresponding to the tag which references * this plugin in the document. * - * @param result - resulting DOM element + * @param aDOMElement - resulting DOM element * @result - NS_OK if this operation was successful */ readonly attribute nsIDOMElement DOMElement; diff --git a/mozilla/modules/plugin/base/public/nsIPluginViewer.idl b/mozilla/modules/plugin/base/public/nsIPluginViewer.idl index c0272e51a4a..eadc22ebfcb 100644 --- a/mozilla/modules/plugin/base/public/nsIPluginViewer.idl +++ b/mozilla/modules/plugin/base/public/nsIPluginViewer.idl @@ -47,8 +47,6 @@ interface nsIPluginViewer : nsISupports { %{C++ - - /** * Creates a new plugin viewer, based on a nsIRequest. */ diff --git a/mozilla/modules/plugin/base/public/nsIScriptablePlugin.idl b/mozilla/modules/plugin/base/public/nsIScriptablePlugin.idl index 2053108d21c..cc6dbdf2974 100644 --- a/mozilla/modules/plugin/base/public/nsIScriptablePlugin.idl +++ b/mozilla/modules/plugin/base/public/nsIScriptablePlugin.idl @@ -36,8 +36,7 @@ * ***** END LICENSE BLOCK ***** */ /** - * Interface for exposing scriptable plugin methods to JavaScript via - * XPConnect. + * Interface for exposing scriptable plugin methods to JavaScript via XPConnect. */ #include "nsISupports.idl" @@ -47,8 +46,7 @@ interface nsIScriptablePlugin : nsISupports { /** * The object to be wrapped and exposed to JavaScript. It should - * be an XPCOM object, and it can be the same object as the - * plugin. + * be an XPCOM object, and it can be the same object as the plugin. */ readonly attribute nsQIResult scriptablePeer; diff --git a/mozilla/modules/plugin/base/public/nsplugin.h b/mozilla/modules/plugin/base/public/nsplugin.h index 6f2115b2098..58e87994bd9 100644 --- a/mozilla/modules/plugin/base/public/nsplugin.h +++ b/mozilla/modules/plugin/base/public/nsplugin.h @@ -59,27 +59,24 @@ * the plugin (only 1) * +----------------------+ * | nsIPlugin or |<- - - - - -NSGetFactory() - * | nsILiveConnectPlugin | * +----------------------+ * | * | - * | instances (many) streams to receive URL data (many) - * | +-------------------+ +-----------------+ - * | | nsIPluginInstance |+ | nsIPluginStream |+ - * | | || | || - * | +-------------------+| +-----------------+| - * | +------|-----------+ +------|---------+ - * | | | - * | PLUGIN SIDE |peer |peer - *~~~~|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~ - * | BROWSER SIDE | | - * | v v - * | +---------------------------------+ +----------------------------+ - * | | nsIPluginInstancePeer |+ | nsIPluginStreamPeer |+ - * | | nsIWindowlessPluginInstancePeer || | nsISeekablePluginStreamPeer|| - * | | nsILiveConnectPluginInstancePeer|| | nsIPluginstreamPeer2 || - * | | nsIPluginTagInfo || +----------------------------+| - * | | nsIPluginTagInfo2 || +---------------------------+ + * | instances (many) + * | +-------------------+ + * | | nsIPluginInstance |+ + * | +-------------------+| + * | +------|-----------+ + * | | + * | PLUGIN SIDE |peer + *~~~~|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * | BROWSER SIDE | + * | v + * | +---------------------------------+ + * | | nsIPluginInstancePeer |+ + * | | nsIWindowlessPluginInstancePeer || + * | | nsIPluginTagInfo || + * | | nsIPluginTagInfo2 || * | +---------------------------------+| * | +--------------------------------+ * | @@ -92,7 +89,6 @@ * | nsIPref | * | nsICacheManager ... | * +---------------------+ - * */ #ifndef nsplugins_h___ @@ -104,20 +100,6 @@ * Interfaces which must be implemented by a plugin * These interfaces have NPP equivalents in pre-5.0 browsers (see npapi.h). */ -//////////////////////////////////////////////////////////////////////////////// - -/** - * NSGetFactory is the main entry point to the plugin's DLL. The plugin manager - * finds this symbol and calls it to create the plugin class. Once the plugin - * object is returned to the plugin manager, instances on the page are created - * by calling nsIPlugin::CreateInstance. - */ -// (Declared in nsComponentManager.h) -//extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* serviceMgr, -// const nsCID &aClass, -// const char *aClassName, -// const char *aContractID, -// nsIFactory **aFactory); /** * A plugin object is used to create new plugin instances. It manages the @@ -130,21 +112,6 @@ */ #include "nsIPluginInstance.h" -/** - * A plugin stream listener ... - */ -#include "nsIPluginStreamListener.h" - -/** - * The nsILiveConnectPlugin interface provides additional operations that a - * plugin must implement if it is to be controlled by JavaScript through - * LiveConnect. - * - * Note that this interface is part of a new JNI-based LiveConnect - * implementation and superceeds that provided prior to Communicator 5.0. - */ -//#include "nsILiveConnectPlugin.h" - //////////////////////////////////////////////////////////////////////////////// /** * Interfaces implemented by the browser: @@ -181,11 +148,6 @@ */ #include "nsIWindowlessPlugInstPeer.h" -/** - * - */ -#include "nsIPluginInputStream.h" - //////////////////////////////////////////////////////////////////////////////// /** * Interfaces implemented by the browser (new for 5.0): @@ -208,22 +170,6 @@ */ #include "nsIFileUtilities.h" -/** - * The nsILiveConnectPluginInstancePeer allows plugins to be manipulated - * by JavaScript, providing basic scriptability. - * - * Note that this interface is part of a new JNI-based LiveConnect - * implementation and superceeds that provided prior to Communicator 5.0. - * - * To obtain: QueryInterface on nsIPluginInstancePeer - */ -//#include "nsILiveConnectPlugInstPeer.h" - -/** - * - */ -#include "nsIPluginInputStream.h" - /** * The nsIPluginTagInfo2 interface provides additional html tag information * only available in Communicator 5.0. diff --git a/mozilla/modules/plugin/base/public/nsplugindefs.h b/mozilla/modules/plugin/base/public/nsplugindefs.h index e96c0fd9278..7057e031a6b 100644 --- a/mozilla/modules/plugin/base/public/nsplugindefs.h +++ b/mozilla/modules/plugin/base/public/nsplugindefs.h @@ -35,21 +35,6 @@ * * ***** END LICENSE BLOCK ***** */ -//////////////////////////////////////////////////////////////////////////////// -/** - * INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API). - * - *
This superscedes the old plugin API (npapi.h, npupp.h), and - * eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that - * get linked with the plugin. You will however need to link with the "backward - * adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0 - * browsers. - * - *
See nsplugin.h for an overview of how this fits with the
- * overall plugin architecture.
- */
-////////////////////////////////////////////////////////////////////////////////
-
#ifndef nsplugindefs_h___
#define nsplugindefs_h___
@@ -384,10 +369,8 @@ enum nsPluginReason {
// Classes that must be implemented by the plugin DLL:
class nsIPlugin; // plugin class (MIME-type handler)
-class nsILiveConnectPlugin; // subclass of nsIPlugin
class nsIEventHandler; // event handler interface
class nsIPluginInstance; // plugin instance
-class nsIPluginStream; // stream to receive data from the browser
// Classes that are implemented by the browser:
class nsIPluginManager; // minimum browser requirements
@@ -395,10 +378,6 @@ class nsIFileUtilities; // file utilities (accessible from nsIPl
class nsIPluginInstancePeer; // parts of nsIPluginInstance implemented by the browser
class nsIWindowlessPluginInstancePeer; // subclass of nsIPluginInstancePeer for windowless plugins
class nsIPluginTagInfo; // describes html tag (accessible from nsIPluginInstancePeer)
-class nsILiveConnectPluginInstancePeer; // subclass of nsIPluginInstancePeer
-class nsIPluginStreamPeer; // parts of nsIPluginStream implemented by the browser
-class nsISeekablePluginStreamPeer; // seekable subclass of nsIPluginStreamPeer
-
////////////////////////////////////////////////////////////////////////////////
#ifdef XP_MAC
diff --git a/mozilla/modules/plugin/base/src/Makefile.in b/mozilla/modules/plugin/base/src/Makefile.in
index 81913a1dbf3..eec7a74a3ed 100644
--- a/mozilla/modules/plugin/base/src/Makefile.in
+++ b/mozilla/modules/plugin/base/src/Makefile.in
@@ -90,9 +90,6 @@ endif
endif
EXPORTS = \
- nsPluginsCID.h \
- nsIPluginHost.h \
- nsIPluginInstanceOwner.h \
nsPluginViewer.h \
$(NULL)
diff --git a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp
index 5b1d416f269..170b77dd06b 100644
--- a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp
+++ b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp
@@ -38,7 +38,6 @@
// TODO: Implement Java callbacks
#include "prtypes.h"
-#include "nsplugin.h"
#include "ns4xPlugin.h"
#include "ns4xPluginInstance.h"
#include "ns4xPluginStreamListener.h"
diff --git a/mozilla/modules/plugin/base/src/ns4xPlugin.h b/mozilla/modules/plugin/base/src/ns4xPlugin.h
index 419fd3abf6e..3a51430cea7 100644
--- a/mozilla/modules/plugin/base/src/ns4xPlugin.h
+++ b/mozilla/modules/plugin/base/src/ns4xPlugin.h
@@ -38,7 +38,9 @@
#ifndef ns4xPlugin_h__
#define ns4xPlugin_h__
-#include "nsplugin.h"
+#include "nsIPlugin.h"
+#include "nsIPluginInstancePeer.h"
+#include "nsIWindowlessPlugInstPeer.h"
#include "prlink.h" // for PRLibrary
#include "npupp.h"
#include "nsPluginHostImpl.h"
diff --git a/mozilla/modules/plugin/base/src/ns4xPluginInstance.h b/mozilla/modules/plugin/base/src/ns4xPluginInstance.h
index c64703b3934..36567df8c8b 100644
--- a/mozilla/modules/plugin/base/src/ns4xPluginInstance.h
+++ b/mozilla/modules/plugin/base/src/ns4xPluginInstance.h
@@ -48,11 +48,16 @@
#define _INT32
#endif /* HPUX11 */
-#include "nsplugin.h"
+#include "nsCOMPtr.h"
+#include "nsIPlugin.h"
+#include "nsIPluginInstance.h"
+#include "nsIPluginInstancePeer.h"
+#include "nsIPluginTagInfo2.h"
+#include "nsIScriptablePlugin.h"
+
#include "npupp.h"
#include "jri.h"
#include "prlink.h" // for PRLibrary
-#include "nsIScriptablePlugin.h"
#if defined (MOZ_WIDGET_GTK) || defined (MOZ_WIDGET_GTK2)
#include