Update browser plugins to support v2 wire protocol, and checkin some prebuilt libraries for them. The XPI files are *not* checked in here until all platforms are rebuilt with the changes -- otherwise, users would no longer be able to use platforms that were left out. Log levels were changed in a few places in the XPCOM plugin to reduce spaminess, especially in the event the development mode server connection goes away while the page is still running. The Safari plugin changes have had only minimal changes, and the IE plugin changes are completely untested. They are checked in anyway since they were never brought up to common code changes made last year, and therefore can't be built from trunk anyway, so they are certainly no worse off this way. When Bob is in town next week, we will test the Safari plugin more thoroughly (including building an install image) and get the IE plugin built/tested. Patch by: jat Review by: bobv git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@5998 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/plugins/xpcom/ExternalWrapper.cpp b/plugins/xpcom/ExternalWrapper.cpp index 9ce0103..1d54747 100644 --- a/plugins/xpcom/ExternalWrapper.cpp +++ b/plugins/xpcom/ExternalWrapper.cpp
@@ -1,12 +1,12 @@ /* * Copyright 2008 Google Inc. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -29,6 +29,7 @@ #include "LoadModuleMessage.h" #include "ServerMethods.h" +#include "BrowserChannel.h" NS_IMPL_ISUPPORTS2_CI(ExternalWrapper, IOOPHM, nsISecurityCheckedComponent) @@ -59,35 +60,57 @@ } // TODO: handle context object passed in (currently nsIDOMWindow below) -NS_IMETHODIMP ExternalWrapper::Connect(const nsACString & aAddr, const nsACString & aModuleName, nsIDOMWindow* domWindow, PRBool *_retval) { - Debug::log(Debug::Spam) << "Address: " << aAddr << " Module: " << aModuleName << Debug::flush; +NS_IMETHODIMP ExternalWrapper::Init(nsIDOMWindow* domWindow, PRBool *_retval) { + Debug::log(Debug::Spam) << "Init" << Debug::flush; + *_retval = true; + return NS_OK; +} + +NS_IMETHODIMP ExternalWrapper::Connect(const nsACString& url, + const nsACString& sessionKey, const nsACString& aAddr, + const nsACString& aModuleName, const nsACString& hostedHtmlVersion, + PRBool *_retval) { + Debug::log(Debug::Spam) << "Connect(url=" << url << ", sessionKey=" + << sessionKey << ", address=" << aAddr << ", module=" << aModuleName + << ", hostedHtmlVersion=" << hostedHtmlVersion << Debug::flush; // TODO: string utilities? - nsCString addrAutoStr(aAddr), moduleAutoStr(aModuleName); - std::string url(addrAutoStr.get()); - - size_t index = url.find(':'); + nsCString urlAutoStr(url); + nsCString sessionKeyAutoStr(sessionKey); + nsCString addrAutoStr(aAddr); + nsCString moduleAutoStr(aModuleName); + nsCString hostedHtmlVersionAutoStr(hostedHtmlVersion); + std::string hostedUrl(addrAutoStr.get()); + + size_t index = hostedUrl.find(':'); if (index == std::string::npos) { *_retval = false; return NS_OK; } - std::string hostPart = url.substr(0, index); - std::string portPart = url.substr(index + 1); + std::string hostPart = hostedUrl.substr(0, index); + std::string portPart = hostedUrl.substr(index + 1); HostChannel* channel = new HostChannel(); Debug::log(Debug::Debugging) << "Connecting..." << Debug::flush; - if (!channel->connectToHost( - const_cast<char*>(hostPart.c_str()), + if (!channel->connectToHost(hostPart.c_str(), atoi(portPart.c_str()))) { *_retval = false; return NS_OK; } Debug::log(Debug::Debugging) << "...Connected" << Debug::flush; - sessionHandler.reset(new FFSessionHandler(channel/*, ctx*/)); + + std::string hostedHtmlVersionStr(hostedHtmlVersionAutoStr.get()); + if (!channel->init(sessionHandler.get(), BROWSERCHANNEL_PROTOCOL_VERSION, + BROWSERCHANNEL_PROTOCOL_VERSION, + hostedHtmlVersionStr)) { + *_retval = false; + return NS_OK; + } + std::string moduleName(moduleAutoStr.get()); std::string userAgent; @@ -97,10 +120,12 @@ return res; } - LoadModuleMessage::send(*channel, 1, - moduleName.c_str(), moduleName.length(), - userAgent.c_str(), - sessionHandler.get()); + std::string urlStr(urlAutoStr.get()); + std::string tabKeyStr(""); // TODO(jat): add support for tab identity + std::string sessionKeyStr(sessionKeyAutoStr.get()); + + LoadModuleMessage::send(*channel, urlStr, tabKeyStr, sessionKeyStr, + moduleName, userAgent, sessionHandler.get()); // TODO: return session object? *_retval = true; @@ -127,7 +152,7 @@ NS_IMETHODIMP ExternalWrapper::CanCallMethod(const nsIID * iid, const PRUnichar *methodName, char **_retval) { Debug::log(Debug::Spam) << "ExternalWrapper::CanCallMethod" << Debug::flush; - if (strEquals(methodName, "connect")) { + if (strEquals(methodName, "connect") || strEquals(methodName, "init")) { *_retval = cloneAllAccess(); } else { *_retval = nsnull;
diff --git a/plugins/xpcom/FFSessionHandler.cpp b/plugins/xpcom/FFSessionHandler.cpp index 908e755..09fa9e1 100755 --- a/plugins/xpcom/FFSessionHandler.cpp +++ b/plugins/xpcom/FFSessionHandler.cpp
@@ -125,7 +125,7 @@ dbg << objId << " "; jsval toRemove; if (JS_GetElement(ctx, jsObjectsById, objId, &toRemove) && JSVAL_IS_OBJECT(toRemove)) { - jsIdsByObject.erase(JSVAL_TO_OBJECT(toRemove)); + jsIdsByObject.erase(identityFromObject(JSVAL_TO_OBJECT(toRemove))); JS_DeleteElement(ctx, jsObjectsById, objId); } else { Debug::log(Debug::Error) << "Error deleting js objId=" << objId << Debug::flush; @@ -158,6 +158,11 @@ } } +void FFSessionHandler::fatalError(HostChannel& channel, + const std::string& message) { + // TODO(jat): implement +} + bool FFSessionHandler::invoke(HostChannel& channel, const Value& thisObj, const std::string& methodName, int numArgs, const Value* const args, Value* returnValue) { Debug::log(Debug::Spam) << "FFSessionHandler::invoke " << thisObj.toString() @@ -176,7 +181,7 @@ << Debug::flush; return true; } - + jsval jsThis; if (thisObj.isNull()) { jsThis = OBJECT_TO_JSVAL(global); @@ -257,7 +262,10 @@ /** * Convert UTF16 string to UTF8-encoded std::string. - * + * + * This is implemented here because the Mozilla libraries mangle certain UTF8 + * strings. + * * @return UTF8-encoded string. */ static std::string utf8String(const jschar* str, unsigned len) { @@ -290,7 +298,10 @@ /** * Creates a JSString from a UTF8-encoded std::string. - * + * + * This is implemented here because the Mozilla libraries mangle certain UTF8 + * strings. + * * @return the JSString object, which owns its memory buffer. */ static JSString* stringUtf8(JSContext* ctx, const std::string& utf8str) { @@ -406,14 +417,15 @@ // str will be garbage-collected, does not need to be freed } else { // It's a plain-old JavaScript Object - std::map<JSObject*, int>::iterator it = jsIdsByObject.find(obj); + void* objKey = identityFromObject(obj); + std::map<void*, int>::iterator it = jsIdsByObject.find(objKey); if (it != jsIdsByObject.end()) { retVal.setJsObjectId(it->second); } else { // Allocate a new id int objId = ++jsObjectId; JS_SetElement(ctx, jsObjectsById, objId, const_cast<jsval*>(&value)); - jsIdsByObject[obj] = objId; + jsIdsByObject[objKey] = objId; retVal.setJsObjectId(objId); } } @@ -552,3 +564,16 @@ channel->disconnectFromHost(); } } + +void* FFSessionHandler::identityFromObject(JSObject* obj) { + JSContext* ctx = getJSContext(); + jsval rval; + void* returnValue = obj; + if (JS_GetProperty(ctx, obj, "wrappedJSObject", &rval) + && JSVAL_IS_OBJECT(rval)) { + returnValue = JSVAL_TO_OBJECT(rval); + Debug::log(Debug::Info) << "identityFromObject mapped " << obj << " to " + << returnValue << Debug::flush; + } + return returnValue; +}
diff --git a/plugins/xpcom/FFSessionHandler.h b/plugins/xpcom/FFSessionHandler.h index 0583031..b456dcd 100755 --- a/plugins/xpcom/FFSessionHandler.h +++ b/plugins/xpcom/FFSessionHandler.h
@@ -2,13 +2,13 @@ #define _H_FFSessionHandler /* * Copyright 2008 Google Inc. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -47,10 +47,12 @@ virtual bool invokeSpecial(HostChannel& channel, SpecialMethodId method, int numArgs, const Value* const args, Value* returnValue); virtual void sendFreeValues(HostChannel& channel); + virtual void fatalError(HostChannel& channel, const std::string& message); private: void getStringObjectClass(JSContext* ctx); void getToStringTearOff(JSContext* ctx); + void* identityFromObject(JSObject* obj); int jsObjectId; @@ -61,7 +63,7 @@ JSObject* jsObjectsById; JSClass* stringObjectClass; - std::map<JSObject*, int> jsIdsByObject; + std::map<void*, int> jsIdsByObject; }; inline Debug::DebugStream& operator<<(Debug::DebugStream& dbg, JSString* str) {
diff --git a/plugins/xpcom/IOOPHM.idl b/plugins/xpcom/IOOPHM.idl index fdd206e..1aeea54 100644 --- a/plugins/xpcom/IOOPHM.idl +++ b/plugins/xpcom/IOOPHM.idl
@@ -5,5 +5,7 @@ [scriptable, uuid(90CEF17B-C3FE-4251-AF68-4381B3D938A0)] interface IOOPHM : nsISupports { - boolean connect( in ACString addr, in ACString moduleName, in nsIDOMWindow window ); + boolean init(in nsIDOMWindow window); + boolean connect(in ACString url, in ACString sessionKey, in ACString addr, + in ACString moduleName, in ACString hostedHtmlVersion); };
diff --git a/plugins/xpcom/JavaObject.cpp b/plugins/xpcom/JavaObject.cpp index fd2af9f..638094f 100644 --- a/plugins/xpcom/JavaObject.cpp +++ b/plugins/xpcom/JavaObject.cpp
@@ -135,6 +135,12 @@ *rval = INT_TO_JSVAL(objectRef); return JS_TRUE; } + if ((JS_GetStringLength(str) == 16) && !strncmp("__noSuchMethod__", + JS_GetStringBytes(str), 16)) { + // Avoid error spew if we are disconnected + *rval = JSVAL_VOID; + return JS_TRUE; + } Debug::log(Debug::Error) << "Getting unexpected string property " << dumpJsVal(ctx, id) << Debug::flush; // TODO: throw a better exception here @@ -354,13 +360,13 @@ data->makeValueFromJsval(args[i], ctx, jsargs[i]); } if (!InvokeMessage::send(*channel, javaThis, dispId, numArgs, args.get())) { - Debug::log(Debug::Error) << "JavaObject::call failed to send invoke message" << Debug::flush; + Debug::log(Debug::Debugging) << "JavaObject::call failed to send invoke message" << Debug::flush; return false; } Debug::log(Debug::Spam) << " return from invoke" << Debug::flush; scoped_ptr<ReturnMessage> retMsg(channel->reactToMessagesWhileWaitingForReturn(handler)); if (!retMsg.get()) { - Debug::log(Debug::Error) << "JavaObject::call failed to get return value" << Debug::flush; + Debug::log(Debug::Debugging) << "JavaObject::call failed to get return value" << Debug::flush; return false; } Value returnValue = retMsg->getReturnValue();
diff --git a/plugins/xpcom/Makefile b/plugins/xpcom/Makefile index b4f0711..a1e8186 100644 --- a/plugins/xpcom/Makefile +++ b/plugins/xpcom/Makefile
@@ -119,7 +119,7 @@ INC += -I$(GECKO_PLAT_INC) -I$(GECKO_SDK)/include -I$(dir $(FF_HEADER)) -VERSION=0.0.$(shell ./getversion).$(shell date +%Y%m%d%H%M%S) +VERSION=0.9.$(shell ./getversion).$(shell date +%Y%m%d%H%M%S) .PHONY: all xpi lib common browser clean depend install install-platform find-ff-libs
diff --git a/plugins/xpcom/ModuleOOPHM.cpp b/plugins/xpcom/ModuleOOPHM.cpp index 33c5d73..919d2b3 100644 --- a/plugins/xpcom/ModuleOOPHM.cpp +++ b/plugins/xpcom/ModuleOOPHM.cpp
@@ -129,7 +129,7 @@ nsCString gecko_version; app_info->GetPlatformVersion(gecko_version); - Debug::log(Debug::Debugging) << " gecko version = " + Debug::log(Debug::Info) << " gecko version = " << gecko_version.BeginReading() << Debug::flush; #if defined(BROWSER_FF2) if (strncmp(gecko_version.BeginReading(), "1.8", 3) != 0) {
diff --git a/plugins/xpcom/install-template-ff3+.rdf b/plugins/xpcom/install-template-ff3+.rdf index aaee998..84a16f9 100644 --- a/plugins/xpcom/install-template-ff3+.rdf +++ b/plugins/xpcom/install-template-ff3+.rdf
@@ -3,15 +3,15 @@ xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> - <em:id>oophm-xpcom-ff3@gwt.google.com</em:id> - <em:name>GWT Development Mode Plugin (XPCOM) for FF v3.x</em:name> + <em:id>oophm-xpcom-ff3p@gwt.google.com</em:id> + <em:name>GWT Development Mode Plugin (XPCOM) for FF v3.x (alt libraries)</em:name> <em:version>GWT_OOPHM_VERSION</em:version> <em:type>2</em:type> <em:targetApplication> <Description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minVersion>3</em:minVersion> - <em:maxVersion>3.*</em:maxVersion> + <em:maxVersion>3.3.*</em:maxVersion> </Description> </em:targetApplication>
diff --git a/plugins/xpcom/install-template-ff3.rdf b/plugins/xpcom/install-template-ff3.rdf index aaee998..9082d32 100644 --- a/plugins/xpcom/install-template-ff3.rdf +++ b/plugins/xpcom/install-template-ff3.rdf
@@ -11,7 +11,7 @@ <Description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minVersion>3</em:minVersion> - <em:maxVersion>3.*</em:maxVersion> + <em:maxVersion>3.3.*</em:maxVersion> </Description> </em:targetApplication>
diff --git a/plugins/xpcom/prebuilt/extension-ff2/components/IOOPHM.xpt b/plugins/xpcom/prebuilt/extension-ff2/components/IOOPHM.xpt index 4be87b7..683c881 100644 --- a/plugins/xpcom/prebuilt/extension-ff2/components/IOOPHM.xpt +++ b/plugins/xpcom/prebuilt/extension-ff2/components/IOOPHM.xpt Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension-ff2/platform/Linux_x86-gcc3/components/liboophm_ff2.so b/plugins/xpcom/prebuilt/extension-ff2/platform/Linux_x86-gcc3/components/liboophm_ff2.so index 65b6dd9..eedbabb 100755 --- a/plugins/xpcom/prebuilt/extension-ff2/platform/Linux_x86-gcc3/components/liboophm_ff2.so +++ b/plugins/xpcom/prebuilt/extension-ff2/platform/Linux_x86-gcc3/components/liboophm_ff2.so Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension-ff2/platform/Linux_x86_64-gcc3/components/liboophm_ff2.so b/plugins/xpcom/prebuilt/extension-ff2/platform/Linux_x86_64-gcc3/components/liboophm_ff2.so index f9dd5d3..cf54702 100755 --- a/plugins/xpcom/prebuilt/extension-ff2/platform/Linux_x86_64-gcc3/components/liboophm_ff2.so +++ b/plugins/xpcom/prebuilt/extension-ff2/platform/Linux_x86_64-gcc3/components/liboophm_ff2.so Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension-ff3+/components/IOOPHM.xpt b/plugins/xpcom/prebuilt/extension-ff3+/components/IOOPHM.xpt index 4be87b7..683c881 100644 --- a/plugins/xpcom/prebuilt/extension-ff3+/components/IOOPHM.xpt +++ b/plugins/xpcom/prebuilt/extension-ff3+/components/IOOPHM.xpt Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension-ff3+/platform/Linux_x86_64-gcc3/components/liboophm_ff3+.so b/plugins/xpcom/prebuilt/extension-ff3+/platform/Linux_x86_64-gcc3/components/liboophm_ff3+.so index 2361279..e1f5935 100755 --- a/plugins/xpcom/prebuilt/extension-ff3+/platform/Linux_x86_64-gcc3/components/liboophm_ff3+.so +++ b/plugins/xpcom/prebuilt/extension-ff3+/platform/Linux_x86_64-gcc3/components/liboophm_ff3+.so Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension-ff3/components/IOOPHM.xpt b/plugins/xpcom/prebuilt/extension-ff3/components/IOOPHM.xpt index 4be87b7..683c881 100644 --- a/plugins/xpcom/prebuilt/extension-ff3/components/IOOPHM.xpt +++ b/plugins/xpcom/prebuilt/extension-ff3/components/IOOPHM.xpt Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension-ff3/platform/Linux_x86-gcc3/components/liboophm_ff3.so b/plugins/xpcom/prebuilt/extension-ff3/platform/Linux_x86-gcc3/components/liboophm_ff3.so index a8705e0..76ace0d 100755 --- a/plugins/xpcom/prebuilt/extension-ff3/platform/Linux_x86-gcc3/components/liboophm_ff3.so +++ b/plugins/xpcom/prebuilt/extension-ff3/platform/Linux_x86-gcc3/components/liboophm_ff3.so Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension-ff3/platform/Linux_x86_64-gcc3/components/liboophm_ff3.so b/plugins/xpcom/prebuilt/extension-ff3/platform/Linux_x86_64-gcc3/components/liboophm_ff3.so index cb26cbe..99db367 100755 --- a/plugins/xpcom/prebuilt/extension-ff3/platform/Linux_x86_64-gcc3/components/liboophm_ff3.so +++ b/plugins/xpcom/prebuilt/extension-ff3/platform/Linux_x86_64-gcc3/components/liboophm_ff3.so Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension-ff35/components/IOOPHM.xpt b/plugins/xpcom/prebuilt/extension-ff35/components/IOOPHM.xpt index 4be87b7..683c881 100644 --- a/plugins/xpcom/prebuilt/extension-ff35/components/IOOPHM.xpt +++ b/plugins/xpcom/prebuilt/extension-ff35/components/IOOPHM.xpt Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension-ff35/platform/Linux_x86_64-gcc3/components/liboophm_ff35.so b/plugins/xpcom/prebuilt/extension-ff35/platform/Linux_x86_64-gcc3/components/liboophm_ff35.so index 1027a07..a65b4e6 100755 --- a/plugins/xpcom/prebuilt/extension-ff35/platform/Linux_x86_64-gcc3/components/liboophm_ff35.so +++ b/plugins/xpcom/prebuilt/extension-ff35/platform/Linux_x86_64-gcc3/components/liboophm_ff35.so Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension/components/IOOPHM.xpt b/plugins/xpcom/prebuilt/extension/components/IOOPHM.xpt index 4be87b7..683c881 100644 --- a/plugins/xpcom/prebuilt/extension/components/IOOPHM.xpt +++ b/plugins/xpcom/prebuilt/extension/components/IOOPHM.xpt Binary files differ
diff --git a/plugins/xpcom/prebuilt/ff2/include/IOOPHM.h b/plugins/xpcom/prebuilt/ff2/include/IOOPHM.h index 9ab769d..12acdc1 100644 --- a/plugins/xpcom/prebuilt/ff2/include/IOOPHM.h +++ b/plugins/xpcom/prebuilt/ff2/include/IOOPHM.h
@@ -29,22 +29,28 @@ NS_DEFINE_STATIC_IID_ACCESSOR(IOOPHM_IID) - /* boolean connect (in ACString addr, in ACString moduleName, in nsIDOMWindow window); */ - NS_IMETHOD Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval) = 0; + /* boolean init (in nsIDOMWindow window); */ + NS_IMETHOD Init(nsIDOMWindow *window, PRBool *_retval) = 0; + + /* boolean connect (in ACString url, in ACString sessionKey, in ACString addr, in ACString moduleName, in ACString hostedHtmlVersion); */ + NS_IMETHOD Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_IOOPHM \ - NS_IMETHOD Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval); + NS_IMETHOD Init(nsIDOMWindow *window, PRBool *_retval); \ + NS_IMETHOD Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_IOOPHM(_to) \ - NS_IMETHOD Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval) { return _to Connect(addr, moduleName, window, _retval); } + NS_IMETHOD Init(nsIDOMWindow *window, PRBool *_retval) { return _to Init(window, _retval); } \ + NS_IMETHOD Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval) { return _to Connect(url, sessionKey, addr, moduleName, hostedHtmlVersion, _retval); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_IOOPHM(_to) \ - NS_IMETHOD Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Connect(addr, moduleName, window, _retval); } + NS_IMETHOD Init(nsIDOMWindow *window, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(window, _retval); } \ + NS_IMETHOD Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Connect(url, sessionKey, addr, moduleName, hostedHtmlVersion, _retval); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ @@ -78,8 +84,14 @@ /* destructor code */ } -/* boolean connect (in ACString addr, in ACString moduleName, in nsIDOMWindow window); */ -NS_IMETHODIMP _MYCLASS_::Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval) +/* boolean init (in nsIDOMWindow window); */ +NS_IMETHODIMP _MYCLASS_::Init(nsIDOMWindow *window, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean connect (in ACString url, in ACString sessionKey, in ACString addr, in ACString moduleName, in ACString hostedHtmlVersion); */ +NS_IMETHODIMP _MYCLASS_::Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval) { return NS_ERROR_NOT_IMPLEMENTED; }
diff --git a/plugins/xpcom/prebuilt/ff3+/include/IOOPHM.h b/plugins/xpcom/prebuilt/ff3+/include/IOOPHM.h index ba6f481..169598e 100644 --- a/plugins/xpcom/prebuilt/ff3+/include/IOOPHM.h +++ b/plugins/xpcom/prebuilt/ff3+/include/IOOPHM.h
@@ -29,8 +29,11 @@ NS_DECLARE_STATIC_IID_ACCESSOR(IOOPHM_IID) - /* boolean connect (in ACString addr, in ACString moduleName, in nsIDOMWindow window); */ - NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval) = 0; + /* boolean init (in nsIDOMWindow window); */ + NS_SCRIPTABLE NS_IMETHOD Init(nsIDOMWindow *window, PRBool *_retval) = 0; + + /* boolean connect (in ACString url, in ACString sessionKey, in ACString addr, in ACString moduleName, in ACString hostedHtmlVersion); */ + NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval) = 0; }; @@ -38,15 +41,18 @@ /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_IOOPHM \ - NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval); + NS_SCRIPTABLE NS_IMETHOD Init(nsIDOMWindow *window, PRBool *_retval); \ + NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_IOOPHM(_to) \ - NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval) { return _to Connect(addr, moduleName, window, _retval); } + NS_SCRIPTABLE NS_IMETHOD Init(nsIDOMWindow *window, PRBool *_retval) { return _to Init(window, _retval); } \ + NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval) { return _to Connect(url, sessionKey, addr, moduleName, hostedHtmlVersion, _retval); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_IOOPHM(_to) \ - NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Connect(addr, moduleName, window, _retval); } + NS_SCRIPTABLE NS_IMETHOD Init(nsIDOMWindow *window, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(window, _retval); } \ + NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Connect(url, sessionKey, addr, moduleName, hostedHtmlVersion, _retval); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ @@ -80,8 +86,14 @@ /* destructor code */ } -/* boolean connect (in ACString addr, in ACString moduleName, in nsIDOMWindow window); */ -NS_IMETHODIMP _MYCLASS_::Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval) +/* boolean init (in nsIDOMWindow window); */ +NS_IMETHODIMP _MYCLASS_::Init(nsIDOMWindow *window, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean connect (in ACString url, in ACString sessionKey, in ACString addr, in ACString moduleName, in ACString hostedHtmlVersion); */ +NS_IMETHODIMP _MYCLASS_::Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval) { return NS_ERROR_NOT_IMPLEMENTED; }
diff --git a/plugins/xpcom/prebuilt/ff3/include/IOOPHM.h b/plugins/xpcom/prebuilt/ff3/include/IOOPHM.h index ba6f481..169598e 100644 --- a/plugins/xpcom/prebuilt/ff3/include/IOOPHM.h +++ b/plugins/xpcom/prebuilt/ff3/include/IOOPHM.h
@@ -29,8 +29,11 @@ NS_DECLARE_STATIC_IID_ACCESSOR(IOOPHM_IID) - /* boolean connect (in ACString addr, in ACString moduleName, in nsIDOMWindow window); */ - NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval) = 0; + /* boolean init (in nsIDOMWindow window); */ + NS_SCRIPTABLE NS_IMETHOD Init(nsIDOMWindow *window, PRBool *_retval) = 0; + + /* boolean connect (in ACString url, in ACString sessionKey, in ACString addr, in ACString moduleName, in ACString hostedHtmlVersion); */ + NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval) = 0; }; @@ -38,15 +41,18 @@ /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_IOOPHM \ - NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval); + NS_SCRIPTABLE NS_IMETHOD Init(nsIDOMWindow *window, PRBool *_retval); \ + NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_IOOPHM(_to) \ - NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval) { return _to Connect(addr, moduleName, window, _retval); } + NS_SCRIPTABLE NS_IMETHOD Init(nsIDOMWindow *window, PRBool *_retval) { return _to Init(window, _retval); } \ + NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval) { return _to Connect(url, sessionKey, addr, moduleName, hostedHtmlVersion, _retval); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_IOOPHM(_to) \ - NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Connect(addr, moduleName, window, _retval); } + NS_SCRIPTABLE NS_IMETHOD Init(nsIDOMWindow *window, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(window, _retval); } \ + NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Connect(url, sessionKey, addr, moduleName, hostedHtmlVersion, _retval); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ @@ -80,8 +86,14 @@ /* destructor code */ } -/* boolean connect (in ACString addr, in ACString moduleName, in nsIDOMWindow window); */ -NS_IMETHODIMP _MYCLASS_::Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval) +/* boolean init (in nsIDOMWindow window); */ +NS_IMETHODIMP _MYCLASS_::Init(nsIDOMWindow *window, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean connect (in ACString url, in ACString sessionKey, in ACString addr, in ACString moduleName, in ACString hostedHtmlVersion); */ +NS_IMETHODIMP _MYCLASS_::Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval) { return NS_ERROR_NOT_IMPLEMENTED; }
diff --git a/plugins/xpcom/prebuilt/ff35/include/IOOPHM.h b/plugins/xpcom/prebuilt/ff35/include/IOOPHM.h index 47d62d2..0e7be5d 100644 --- a/plugins/xpcom/prebuilt/ff35/include/IOOPHM.h +++ b/plugins/xpcom/prebuilt/ff35/include/IOOPHM.h
@@ -29,8 +29,11 @@ NS_DECLARE_STATIC_IID_ACCESSOR(IOOPHM_IID) - /* boolean connect (in ACString addr, in ACString moduleName, in nsIDOMWindow window); */ - NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval NS_OUTPARAM) = 0; + /* boolean init (in nsIDOMWindow window); */ + NS_SCRIPTABLE NS_IMETHOD Init(nsIDOMWindow *window, PRBool *_retval NS_OUTPARAM) = 0; + + /* boolean connect (in ACString url, in ACString sessionKey, in ACString addr, in ACString moduleName, in ACString hostedHtmlVersion); */ + NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval NS_OUTPARAM) = 0; }; @@ -38,15 +41,18 @@ /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_IOOPHM \ - NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval NS_OUTPARAM); + NS_SCRIPTABLE NS_IMETHOD Init(nsIDOMWindow *window, PRBool *_retval NS_OUTPARAM); \ + NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval NS_OUTPARAM); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_IOOPHM(_to) \ - NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval NS_OUTPARAM) { return _to Connect(addr, moduleName, window, _retval); } + NS_SCRIPTABLE NS_IMETHOD Init(nsIDOMWindow *window, PRBool *_retval NS_OUTPARAM) { return _to Init(window, _retval); } \ + NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval NS_OUTPARAM) { return _to Connect(url, sessionKey, addr, moduleName, hostedHtmlVersion, _retval); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_IOOPHM(_to) \ - NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Connect(addr, moduleName, window, _retval); } + NS_SCRIPTABLE NS_IMETHOD Init(nsIDOMWindow *window, PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(window, _retval); } \ + NS_SCRIPTABLE NS_IMETHOD Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Connect(url, sessionKey, addr, moduleName, hostedHtmlVersion, _retval); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ @@ -80,8 +86,14 @@ /* destructor code */ } -/* boolean connect (in ACString addr, in ACString moduleName, in nsIDOMWindow window); */ -NS_IMETHODIMP _MYCLASS_::Connect(const nsACString & addr, const nsACString & moduleName, nsIDOMWindow *window, PRBool *_retval NS_OUTPARAM) +/* boolean init (in nsIDOMWindow window); */ +NS_IMETHODIMP _MYCLASS_::Init(nsIDOMWindow *window, PRBool *_retval NS_OUTPARAM) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean connect (in ACString url, in ACString sessionKey, in ACString addr, in ACString moduleName, in ACString hostedHtmlVersion); */ +NS_IMETHODIMP _MYCLASS_::Connect(const nsACString & url, const nsACString & sessionKey, const nsACString & addr, const nsACString & moduleName, const nsACString & hostedHtmlVersion, PRBool *_retval NS_OUTPARAM) { return NS_ERROR_NOT_IMPLEMENTED; }