Initial checkin of OOPHM plugins into trunk.  Testing of non-XPCOM plugins
is still required, and more platforms need to be built.


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@5868 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/plugins/xpcom/ExternalWrapper.cpp b/plugins/xpcom/ExternalWrapper.cpp
new file mode 100644
index 0000000..9ce0103
--- /dev/null
+++ b/plugins/xpcom/ExternalWrapper.cpp
@@ -0,0 +1,147 @@
+/*
+ * 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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+#include "ExternalWrapper.h"
+
+#include "nsIHttpProtocolHandler.h"
+#include "nsISupports.h"
+#include "nsNetCID.h"
+#include "nsCOMPtr.h"
+#include "nsMemory.h"
+#include "nsServiceManagerUtils.h"
+
+#ifndef NS_IMPL_ISUPPORTS2_CI
+#include "nsIClassInfoImpl.h" // 1.9 only
+#endif
+
+#include "LoadModuleMessage.h"
+#include "ServerMethods.h"
+
+NS_IMPL_ISUPPORTS2_CI(ExternalWrapper, IOOPHM, nsISecurityCheckedComponent)
+
+ExternalWrapper::ExternalWrapper() {
+  Debug::log(Debug::Spam) << "ExternalWrapper::ExternalWrapper()" << Debug::flush;
+}
+
+ExternalWrapper::~ExternalWrapper() {
+  Debug::log(Debug::Spam) << "ExternalWrapper::~ExternalWrapper" << Debug::flush;
+}
+
+// define the CID for nsIHttpProtocolHandler
+static NS_DEFINE_CID(kHttpHandlerCID, NS_HTTPPROTOCOLHANDLER_CID);
+
+static nsresult getUserAgent(std::string& userAgent) {
+  nsresult res;
+  nsCOMPtr<nsIHttpProtocolHandler> http = do_GetService(kHttpHandlerCID, &res);
+  if (NS_FAILED(res)) {
+    return res;
+  }
+  nsCString userAgentStr;
+  res = http->GetUserAgent(userAgentStr);
+  if (NS_FAILED(res)) {
+    return res;
+  }
+  userAgent.assign(userAgentStr.get());
+  return NS_OK;
+}
+
+// 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;
+
+  // TODO: string utilities?
+  nsCString addrAutoStr(aAddr), moduleAutoStr(aModuleName);
+  std::string url(addrAutoStr.get());
+  
+  size_t index = url.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);
+
+  HostChannel* channel = new HostChannel();
+
+  Debug::log(Debug::Debugging) << "Connecting..." << Debug::flush;
+
+  if (!channel->connectToHost(
+      const_cast<char*>(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 moduleName(moduleAutoStr.get());
+  std::string userAgent;
+
+  // get the user agent
+  nsresult res = getUserAgent(userAgent);
+  if (NS_FAILED(res)) {
+    return res;
+  }
+
+  LoadModuleMessage::send(*channel, 1,
+    moduleName.c_str(), moduleName.length(),
+    userAgent.c_str(),
+    sessionHandler.get());
+
+  // TODO: return session object?
+  *_retval = true;
+  return NS_OK;
+}
+
+// nsISecurityCheckedComponent
+static char* cloneAllAccess() {
+  static const char allAccess[] = "allAccess";
+  return static_cast<char*>(nsMemory::Clone(allAccess, sizeof(allAccess)));
+}
+
+static bool strEquals(const PRUnichar* utf16, const char* ascii) {
+  nsCString utf8;
+  NS_UTF16ToCString(nsDependentString(utf16), NS_CSTRING_ENCODING_UTF8, utf8);
+  return strcmp(ascii, utf8.get()) == 0;
+}
+
+NS_IMETHODIMP ExternalWrapper::CanCreateWrapper(const nsIID * iid, char **_retval) {
+  Debug::log(Debug::Spam) << "ExternalWrapper::CanCreateWrapper" << Debug::flush;
+  *_retval = cloneAllAccess();
+  return NS_OK;
+}
+
+NS_IMETHODIMP ExternalWrapper::CanCallMethod(const nsIID * iid, const PRUnichar *methodName, char **_retval) {
+  Debug::log(Debug::Spam) << "ExternalWrapper::CanCallMethod" << Debug::flush;
+  if (strEquals(methodName, "connect")) {
+    *_retval = cloneAllAccess();
+  } else {
+    *_retval = nsnull;
+  }
+  return NS_OK;
+}
+
+NS_IMETHODIMP ExternalWrapper::CanGetProperty(const nsIID * iid, const PRUnichar *propertyName, char **_retval) {
+  Debug::log(Debug::Spam) << "ExternalWrapper::CanGetProperty" << Debug::flush;
+  *_retval = nsnull;
+  return NS_OK;
+}
+NS_IMETHODIMP ExternalWrapper::CanSetProperty(const nsIID * iid, const PRUnichar *propertyName, char **_retval) {
+  Debug::log(Debug::Spam) << "ExternalWrapper::CanSetProperty" << Debug::flush;
+  *_retval = nsnull;
+  return NS_OK;
+}
diff --git a/plugins/xpcom/ExternalWrapper.h b/plugins/xpcom/ExternalWrapper.h
new file mode 100755
index 0000000..a21204c
--- /dev/null
+++ b/plugins/xpcom/ExternalWrapper.h
@@ -0,0 +1,59 @@
+#ifndef _H_ExternalWrapper
+#define _H_ExternalWrapper
+/*
+ * 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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+#include <string>
+
+#include "mozincludes.h"
+
+#include "IOOPHM.h"
+
+#include "FFSessionHandler.h"
+#include "Debug.h"
+#include "scoped_ptr/scoped_ptr.h"
+#include "nsISecurityCheckedComponent.h"
+#include "nsStringAPI.h"
+
+class nsIDOMWindow;
+
+// {028DD88B-6D65-401D-AAFD-17E497D15D09}
+#define OOPHM_CID \
+  { 0x028DD88B, 0x6D65, 0x401D, \
+  { 0xAA, 0xFD, 0x17, 0xE4, 0x97, 0xD1, 0x5D, 0x09 } }
+
+#define OOPHM_CONTRACTID "@gwt.google.com/oophm/ExternalWrapper;1"
+#define OOPHM_CLASSNAME "GWT Hosted-mode component"
+
+class ExternalWrapper : public IOOPHM,
+                        public nsISecurityCheckedComponent {
+  NS_DECL_ISUPPORTS
+  NS_DECL_IOOPHM
+  NS_DECL_NSISECURITYCHECKEDCOMPONENT
+
+  ExternalWrapper();
+  virtual ~ExternalWrapper(); 
+private:
+  scoped_ptr<FFSessionHandler> sessionHandler;
+};
+
+inline Debug::DebugStream& operator<<(Debug::DebugStream& dbg, const nsACString& str) {
+  nsCString copy(str);
+  dbg << copy.get();
+  return dbg;
+}
+
+#endif
diff --git a/plugins/xpcom/FFSessionHandler.cpp b/plugins/xpcom/FFSessionHandler.cpp
new file mode 100755
index 0000000..908e755
--- /dev/null
+++ b/plugins/xpcom/FFSessionHandler.cpp
@@ -0,0 +1,554 @@
+/*
+ * 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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+#include "FFSessionHandler.h"
+#include "HostChannel.h"
+#include "JavaObject.h"
+#include "JSRunner.h"
+#include "Debug.h"
+#include "XpcomDebug.h"
+#include "scoped_ptr/scoped_ptr.h"
+#include "RootedObject.h"
+#include "InvokeMessage.h"
+#include "ServerMethods.h"
+
+#include "jsapi.h"
+#include "nsCOMPtr.h"
+#include "nsIJSContextStack.h"
+#include "nsIPrincipal.h"
+#include "nsServiceManagerUtils.h"
+
+static JSContext* getJSContext() {
+  // Get JSContext from stack.
+  nsCOMPtr<nsIJSContextStack> stack =
+      do_GetService("@mozilla.org/js/xpc/ContextStack;1");
+  if (!stack) {
+    return NULL;
+  }
+
+  JSContext *cx;
+  if (NS_FAILED(stack->Peek(&cx))) {
+    return NULL;
+  }
+  return cx;
+}
+
+FFSessionHandler::FFSessionHandler(HostChannel* channel)
+    : SessionData(channel, this, getJSContext()), jsObjectId(0),
+    jsObjectsById(NULL), stringObjectClass(NULL) {
+  // TODO(jat): is there a way to avoid calling this twice, without keeping
+  // JSContext in an instance field?
+  JSContext* ctx = getJSContext();
+  if (!JS_AddNamedRoot(ctx, &jsObjectsById, "jsObjectsById")) {
+    Debug::log(Debug::Error) << "Error rooting jsObjectsById" << Debug::flush;
+  }
+  jsObjectsById = JS_NewArrayObject(ctx, 0, NULL);
+  if (!jsObjectsById) {
+    Debug::log(Debug::Error) << "Error rooting jsObjectsById" << Debug::flush;
+  }
+  if (!JS_AddNamedRoot(ctx, &toStringTearOff, "toStringTearOff")) {
+    Debug::log(Debug::Error) << "Error rooting toStringTearOff" << Debug::flush;
+  }
+  getStringObjectClass(ctx);
+  getToStringTearOff(ctx);
+}
+
+void FFSessionHandler::getStringObjectClass(JSContext* ctx) {
+  jsval str = JS_GetEmptyStringValue(ctx);
+  JSObject* obj = 0;
+  if (!JS_ValueToObject(ctx, str, &obj)) {
+    return;
+  }
+  if (!obj) {
+    return;
+  }
+  stringObjectClass = JS_GET_CLASS(ctx, obj);
+}
+
+void FFSessionHandler::getToStringTearOff(JSContext* ctx) {
+  jsval funcVal;
+  if (!JS_GetProperty(ctx, global, "__gwt_makeTearOff", &funcVal)) {
+    Debug::log(Debug::Error) << "Could not get function \"__gwt_makeTearOff\""
+        << Debug::flush;
+    return;
+  }
+  jsval jsargs[3] = {
+    JSVAL_NULL,                                     // no proxy
+    INT_TO_JSVAL(InvokeMessage::TOSTRING_DISP_ID),  // dispId
+    JSVAL_ZERO                                      // arg count is zero
+  };
+  if (!JS_CallFunctionValue(ctx, global, funcVal, 3, jsargs, &toStringTearOff)) {
+    jsval exc;
+    if (JS_GetPendingException(ctx, &exc)) {
+      Debug::log(Debug::Error)
+          << "__gwt_makeTearOff(null,0,0) threw exception "
+          << dumpJsVal(ctx, exc) << Debug::flush;
+    } else {
+      Debug::log(Debug::Error) << "Error creating toString tear-off"
+          << Debug::flush;
+    }
+    // TODO(jat): show some crash page and die
+  }
+}
+
+FFSessionHandler::~FFSessionHandler(void) {
+  Debug::log(Debug::Debugging) << "FFSessionHandler::~FFSessionHandler" << Debug::flush;
+  disconnect();
+  if (runtime) {
+    JS_RemoveRootRT(runtime, &jsObjectsById);
+    jsObjectsById = NULL;
+    JS_RemoveRootRT(runtime, &toStringTearOff);
+    runtime = NULL;
+  }
+}
+
+void FFSessionHandler::freeValue(HostChannel& channel, int idCount, const int* ids) {
+  Debug::DebugStream& dbg = Debug::log(Debug::Spam)
+      << "FFSessionHandler::freeValue [ ";
+  JSContext* ctx = getJSContext();
+
+  for (int i = 0; i < idCount; ++i) {
+    int objId = ids[i];
+    dbg << objId << " ";
+    jsval toRemove;
+    if (JS_GetElement(ctx, jsObjectsById, objId, &toRemove) && JSVAL_IS_OBJECT(toRemove)) {
+      jsIdsByObject.erase(JSVAL_TO_OBJECT(toRemove));
+      JS_DeleteElement(ctx, jsObjectsById, objId);
+    } else {
+      Debug::log(Debug::Error) << "Error deleting js objId=" << objId << Debug::flush;
+    }
+  }
+
+  dbg << "]" << Debug::flush;
+}
+
+void FFSessionHandler::loadJsni(HostChannel& channel, const std::string& js) {
+  Debug::log(Debug::Spam) << "FFSessionHandler::loadJsni " << js << "(EOM)" << Debug::flush;
+  JSContext* ctx = getJSContext();
+  if (!JSRunner::eval(ctx, global, js)) {
+    Debug::log(Debug::Error) << "Error executing script" << Debug::flush;
+  }
+}
+
+void FFSessionHandler::sendFreeValues(HostChannel& channel) {
+  unsigned n = javaObjectsToFree.size();
+  if (n) {
+    scoped_array<int> ids(new int[n]);
+    int i = 0;
+    for (std::set<int>::iterator it = javaObjectsToFree.begin();
+        it != javaObjectsToFree.end(); ++it) {
+      ids[i++] = *it;
+    }
+    if (ServerMethods::freeJava(channel, this, n, ids.get())) {
+      javaObjectsToFree.clear();
+    }
+  }
+}
+
+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()
+      << "::" << methodName << Debug::flush;
+  JSContext* ctx = getJSContext();
+
+  // Used to root JSthis and args while making the JS call
+  // TODO(jat): keep one object and just keep a "stack pointer" into that
+  // object on the native stack so we don't keep allocating/rooting/freeing
+  // an object
+  RootedObject argsRoot(ctx, "FFSessionhandler::invoke");
+  argsRoot = JS_NewArrayObject(ctx, 0, NULL);
+  if (!JS_SetArrayLength(ctx, argsRoot.get(), numArgs + 1)) {
+    Debug::log(Debug::Error)
+        << "FFSessionhandler::invoke - could not set argsRoot length"
+        << Debug::flush;
+    return true;
+  }
+  
+  jsval jsThis;
+  if (thisObj.isNull()) {
+    jsThis = OBJECT_TO_JSVAL(global);
+    Debug::log(Debug::Spam) << "  using global object for this" << Debug::flush;
+  } else {
+    makeJsvalFromValue(jsThis, ctx, thisObj);
+    if (Debug::level(Debug::Spam)) {
+      Debug::log(Debug::Spam) << "  obj=" << dumpJsVal(ctx, jsThis)
+          << Debug::flush;
+    }
+  }
+  if (!JS_SetElement(ctx, argsRoot.get(), 0, &jsThis)) {
+    Debug::log(Debug::Error)
+        << "FFSessionhandler::invoke - could not set argsRoot[0] to this"
+        << Debug::flush;
+    return true;
+  }
+
+  jsval funcVal;
+  // TODO: handle non-ASCII method names
+  if (!JS_GetProperty(ctx, global, methodName.c_str(), &funcVal)) {
+    Debug::log(Debug::Error) << "Could not get function " << methodName << Debug::flush;
+    return true;
+  }
+
+  scoped_array<jsval> jsargs(new jsval[numArgs]);
+  for (int i = 0; i < numArgs; ++i) {
+    makeJsvalFromValue(jsargs[i], ctx, args[i]);
+    if (Debug::level(Debug::Spam)) {
+      Debug::log(Debug::Spam) << "  arg[" << i << "] = " << dumpJsVal(ctx,
+          jsargs[i]) << Debug::flush;
+    }
+    if (!JS_SetElement(ctx, argsRoot.get(), i + 1, &jsargs[i])) {
+      Debug::log(Debug::Error)
+          << "FFSessionhandler::invoke - could not set args[" << (i + 1) << "]"
+          << Debug::flush;
+      return true;
+    }
+  }
+
+  if (JS_IsExceptionPending(ctx)) {
+    JS_ClearPendingException(ctx);
+  }
+
+  jsval rval;
+  JSBool ok = JS_CallFunctionValue(ctx, JSVAL_TO_OBJECT(jsThis), funcVal,
+      numArgs, jsargs.get(), &rval);
+
+  if (!ok) {
+    if (JS_GetPendingException(ctx, &rval)) {
+      makeValueFromJsval(*returnValue, ctx, rval);
+      Debug::log(Debug::Debugging) << "FFSessionHandler::invoke "
+          << thisObj.toString() << "::" << methodName << " threw exception "
+          << dumpJsVal(ctx, rval) << Debug::flush;
+    } else {
+      Debug::log(Debug::Error) << "Non-exception failure invoking "
+          << methodName << Debug::flush;
+      returnValue->setUndefined();
+    }
+  } else {
+    makeValueFromJsval(*returnValue, ctx, rval);
+  }
+  Debug::log(Debug::Spam) << "  return= " << *returnValue << Debug::flush;
+  return !ok;
+}
+
+/**
+ * Invoke a plugin-provided method with the given args.  As above, this method does not own
+ * any of its args.
+ *
+ * Returns true if an exception occurred.
+ */
+bool FFSessionHandler::invokeSpecial(HostChannel& channel, SpecialMethodId method, int numArgs,
+    const Value* const args, Value* returnValue)  {
+  Debug::log(Debug::Spam) << "FFSessionHandler::invokeSpecial" << Debug::flush;
+  return false;
+}
+
+/**
+ * Convert UTF16 string to UTF8-encoded std::string.
+ * 
+ * @return UTF8-encoded string.
+ */
+static std::string utf8String(const jschar* str, unsigned len) {
+  std::string utf8str;
+  while (len-- > 0) {
+    unsigned ch = *str++;
+    // check for paired surrogates first, leave unpaired surrogates as-is
+    if (ch >= 0xD800 && ch < 0xDC00 && len > 0 && *str >= 0xDC00 && *str < 0xE000) {
+      ch = ((ch & 1023) << 10) + (*str++ & 1023) + 0x10000;
+      len--;
+    }
+    if (ch < 0x80) {          // U+0000 - U+007F as 0xxxxxxx
+      utf8str.append(1, ch);
+    } else if (ch < 0x800) {  // U+0080 - U+07FF as 110xxxxx 10xxxxxx
+      utf8str.append(1, 0xC0 + ((ch >> 6) & 31));
+      utf8str.append(1, 0x80 + (ch & 63));
+    } else if (ch < 0x10000) { // U+0800 - U+FFFF as 1110xxxx 10xxxxxx 10xxxxxx
+      utf8str.append(1, 0xE0 + ((ch >> 12) & 15));
+      utf8str.append(1, 0x80 + ((ch >> 6) & 63));
+      utf8str.append(1, 0x80 + (ch & 63));
+    } else {  // rest as 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+      utf8str.append(1, 0xF0 + ((ch >> 18) & 7));
+      utf8str.append(1, 0x80 + ((ch >> 12) & 63));
+      utf8str.append(1, 0x80 + ((ch >> 6) & 63));
+      utf8str.append(1, 0x80 + (ch & 63));
+    }
+  }
+  return utf8str;
+}
+
+/**
+ * Creates a JSString from a UTF8-encoded std::string.
+ * 
+ * @return the JSString object, which owns its memory buffer.
+ */
+static JSString* stringUtf8(JSContext* ctx, const std::string& utf8str) {
+  unsigned len = 0;
+  for (unsigned i = 0; i < utf8str.length(); ++i) {
+    char ch = utf8str[i];
+    switch (ch & 0xF8) {
+      // continuation & invalid chars
+      default:
+      // ASCII characters
+      case 0x00: case 0x08: case 0x10: case 0x18:
+      case 0x20: case 0x28: case 0x30: case 0x38:
+      case 0x40: case 0x48: case 0x50: case 0x58:
+      case 0x60: case 0x68: case 0x70: case 0x78:
+      // 2-byte UTF8 characters
+      case 0xC0: case 0xC8: case 0xD0: case 0xD8:
+      // 3-byte UTF8 characters
+      case 0xE0: case 0xE8:
+        ++len;
+        break;
+      case 0xF0:
+        len += 2;
+        break;
+    }
+  }
+  // Account for null terminator even if it isn't included in the string length
+  // Note that buf becomes owned by the JSString and must not be freed here.
+  jschar* buf = static_cast<jschar*>(JS_malloc(ctx, (len + 1) * sizeof(jschar)));
+  if (!buf) {
+    return NULL;
+  }
+  jschar* p = buf;
+  unsigned codePoint;
+  int charsLeft = -1;
+  for (unsigned i = 0; i < utf8str.length(); ++i) {
+    char ch = utf8str[i];
+    if (charsLeft >= 0) {
+      if ((ch & 0xC0) != 0x80) {
+        // invalid, missing continuation character
+        *p++ = static_cast<jschar>(0xFFFD);
+        charsLeft = -1;
+      } else {
+        codePoint = (codePoint << 6) | (ch & 63);
+        if (!--charsLeft) {
+          if (codePoint >= 0x10000) {
+            codePoint -= 0x10000;
+            *p++ = static_cast<jschar>(0xD800 + ((codePoint >> 10) & 1023));
+            *p++ = static_cast<jschar>(0xDC00 + (codePoint & 1023));
+          } else {
+            *p++ = static_cast<jschar>(codePoint);
+          }
+          charsLeft = -1;
+        }
+      }
+      continue;
+    }
+    // Look at the top 5 bits to determine how many bytes are in this character.
+    switch (ch & 0xF8) {
+      default: // skip invalid and continuation chars
+        break;
+      case 0x00: case 0x08: case 0x10: case 0x18:
+      case 0x20: case 0x28: case 0x30: case 0x38:
+      case 0x40: case 0x48: case 0x50: case 0x58:
+      case 0x60: case 0x68: case 0x70: case 0x78:
+        *p++ = static_cast<jschar>(ch);
+        break;
+      case 0xC0: case 0xC8: case 0xD0: case 0xD8:
+        charsLeft = 1;
+        codePoint = ch & 31;
+        break;
+      case 0xE0: case 0xE8:
+        charsLeft = 2;
+        codePoint = ch & 15;
+        break;
+      case 0xF0:
+        charsLeft = 3;
+        codePoint = ch & 7;
+        break;
+    }
+  }
+  // null terminator, apparently some code expects a terminator even though
+  // the strings are counted.  Note that this null word should not be included
+  // in the length, and that the buffer becomes owned by the JSString object.
+  *p = 0;
+  return JS_NewUCString(ctx, buf, p - buf);
+}
+
+void FFSessionHandler::makeValueFromJsval(Value& retVal, JSContext* ctx,
+    const jsval& value) {
+  if (JSVAL_IS_VOID(value)) {
+    retVal.setUndefined();
+  } else if (JSVAL_IS_NULL(value)) {
+    retVal.setNull();
+  } else if (JSVAL_IS_INT(value)) {
+    retVal.setInt(JSVAL_TO_INT(value));
+  } else if (JSVAL_IS_BOOLEAN(value)) {
+    retVal.setBoolean(JSVAL_TO_BOOLEAN(value));
+  } else if (JSVAL_IS_STRING(value)) {
+    JSString* str = JSVAL_TO_STRING(value);
+    retVal.setString(utf8String(JS_GetStringChars(str),
+        JS_GetStringLength(str)));
+  } else if (JSVAL_IS_DOUBLE(value)) {
+    retVal.setDouble(*JSVAL_TO_DOUBLE(value));
+  } else if (JSVAL_IS_OBJECT(value)) {
+    JSObject* obj = JSVAL_TO_OBJECT(value);
+    if (JavaObject::isJavaObject(ctx, obj)) {
+      retVal.setJavaObject(JavaObject::getObjectId(ctx, obj));
+    } else if (JS_GET_CLASS(ctx, obj) == stringObjectClass) {
+      // JS String wrapper object, treat as a string primitive
+      JSString* str = JS_ValueToString(ctx, value);
+      retVal.setString(utf8String(JS_GetStringChars(str),
+          JS_GetStringLength(str)));
+      // 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);
+      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;
+        retVal.setJsObjectId(objId);
+      }
+    }
+  } else {
+    Debug::log(Debug::Error) << "Unhandled jsval type " << Debug::flush;
+    retVal.setString("Unhandled jsval type");
+  }
+}
+
+void FFSessionHandler::makeJsvalFromValue(jsval& retVal, JSContext* ctx,
+    const Value& value) {
+  switch (value.getType()) {
+    case Value::NULL_TYPE:
+      retVal = JSVAL_NULL;
+      break;
+    case Value::BOOLEAN:
+      retVal = BOOLEAN_TO_JSVAL(value.getBoolean());
+      break;
+    case Value::BYTE:
+      retVal = INT_TO_JSVAL((int) value.getByte());
+      break;
+    case Value::CHAR:
+      retVal = INT_TO_JSVAL((int) value.getChar());
+      break;
+    case Value::SHORT:
+      retVal = INT_TO_JSVAL((int) value.getShort());
+      break;
+    case Value::INT: {
+      int intValue = value.getInt();
+      if (INT_FITS_IN_JSVAL(intValue)) {
+        retVal = INT_TO_JSVAL(intValue);
+      } else {
+        JS_NewNumberValue(ctx, (jsdouble) intValue, &retVal);
+      }
+      break;
+    }
+    // TODO(jat): do we still need long support in the wire format and Value?
+//    case Value::LONG:
+//      retVal = value.getLong();
+//      break;
+    case Value::FLOAT:
+      JS_NewNumberValue(ctx, (jsdouble) value.getFloat(), &retVal);
+      break;
+    case Value::DOUBLE:
+      JS_NewNumberValue(ctx, (jsdouble) value.getDouble(), &retVal);
+      break;
+    case Value::STRING:
+      {
+        JSString* str = stringUtf8(ctx, value.getString());
+        retVal = STRING_TO_JSVAL(str);
+      }
+      break;
+    case Value::JAVA_OBJECT:
+      {
+        int javaId = value.getJavaObjectId();
+        std::map<int, JSObject*>::iterator i = javaObjectsById.find(javaId);
+        if (i == javaObjectsById.end()) {
+          JSObject* obj = JavaObject::construct(ctx, this, javaId);
+          javaObjectsById[javaId] = obj;
+          // We may have previously released the proxy for the same object id,
+          // but have not yet sent a free message back to the server.
+          javaObjectsToFree.erase(javaId);
+          retVal = OBJECT_TO_JSVAL(obj);
+        } else {
+          retVal = OBJECT_TO_JSVAL(i->second);
+        }
+      }
+      break;
+    case Value::JS_OBJECT:
+      {
+        int jsId = value.getJsObjectId();
+        if (!JS_GetElement(ctx, jsObjectsById, jsId, &retVal)) {
+          Debug::log(Debug::Error) << "Error getting jsObject with id " << jsId << Debug::flush;
+        }
+        if (!JSVAL_IS_OBJECT(retVal)) {
+          Debug::log(Debug::Error) << "Missing jsObject with id " << jsId << Debug::flush;
+        }
+      }
+      break;
+    case Value::UNDEFINED:
+      retVal = JSVAL_VOID;
+      break;
+    default:
+      Debug::log(Debug::Error) << "Unknown Value type " << value.toString() << Debug::flush;
+  }
+}
+
+void FFSessionHandler::freeJavaObject(int objectId) {
+  if (!javaObjectsById.erase(objectId)) {
+    Debug::log(Debug::Error) << "Trying to free unknown JavaObject: " << objectId << Debug::flush;
+    return;
+  }
+  javaObjectsToFree.insert(objectId);
+}
+
+void FFSessionHandler::disconnect() {
+  Debug::log(Debug::Debugging) << "FFSessionHandler::disconnect" << Debug::flush;
+  JSContext* ctx = getJSContext();
+  bool freeCtx = false;
+  if (!ctx) {
+    Debug::log(Debug::Debugging) << "  creating temporary context"
+        << Debug::flush;
+    freeCtx = true;
+    ctx = JS_NewContext(runtime, 8192);
+    if (ctx) {
+      JS_SetOptions(ctx, JSOPTION_VAROBJFIX);
+#ifdef JSVERSION_LATEST
+      JS_SetVersion(ctx, JSVERSION_LATEST);
+#endif
+    }
+  }
+  if (ctx) {
+    JS_BeginRequest(ctx);
+    for (std::map<int, JSObject*>::iterator it = javaObjectsById.begin();
+        it != javaObjectsById.end(); ++it) {
+      int javaId = it->first;
+      JSObject* obj = it->second;
+      if (JavaObject::isJavaObject(ctx, obj)) {
+        // clear the SessionData pointer -- JavaObject knows it is
+        // disconnected if this is null
+        JS_SetPrivate(ctx, obj, NULL);
+        javaObjectsToFree.erase(javaId);
+      }
+    }
+    JS_EndRequest(ctx);
+    if (freeCtx) {
+      JS_DestroyContext(ctx);
+    }
+  } else {
+    Debug::log(Debug::Warning)
+        << "FFSessionHandler::disconnect - no context available"
+        << Debug::flush;
+  }
+  HostChannel* channel = getHostChannel();
+  if (channel->isConnected()) {
+    channel->disconnectFromHost();
+  }
+}
diff --git a/plugins/xpcom/FFSessionHandler.h b/plugins/xpcom/FFSessionHandler.h
new file mode 100755
index 0000000..0583031
--- /dev/null
+++ b/plugins/xpcom/FFSessionHandler.h
@@ -0,0 +1,76 @@
+#ifndef _H_FFSessionHandler
+#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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+#include <set>
+#include <map>
+
+#include "mozincludes.h"
+#include "SessionData.h"
+
+#include "jsapi.h"
+
+class HostChannel;
+class Value;
+
+class FFSessionHandler : public SessionData, public SessionHandler {
+  friend class JavaObject;
+public:
+  FFSessionHandler(HostChannel* channel);
+  ~FFSessionHandler(void);
+  virtual void makeValueFromJsval(Value& retVal, JSContext* ctx,
+      const jsval& value);
+  virtual void makeJsvalFromValue(jsval& retVal, JSContext* ctx,
+      const Value& value);
+  virtual void freeJavaObject(int objectId);
+  void disconnect();
+
+protected:
+  virtual void freeValue(HostChannel& channel, int idCount, const int* ids);
+  virtual void loadJsni(HostChannel& channel, const std::string& js);
+  virtual bool invoke(HostChannel& channel, const Value& thisObj, const std::string& methodName,
+      int numArgs, const Value* const args, Value* returnValue);
+  virtual bool invokeSpecial(HostChannel& channel, SpecialMethodId method, int numArgs,
+      const Value* const args, Value* returnValue);
+  virtual void sendFreeValues(HostChannel& channel);
+
+private:
+  void getStringObjectClass(JSContext* ctx);
+  void getToStringTearOff(JSContext* ctx);
+
+  int jsObjectId;
+
+  std::map<int, JSObject*> javaObjectsById;
+  std::set<int> javaObjectsToFree;
+
+  // Array of JSObjects exposed to the host
+  JSObject* jsObjectsById;
+  JSClass* stringObjectClass;
+
+  std::map<JSObject*, int> jsIdsByObject;
+};
+
+inline Debug::DebugStream& operator<<(Debug::DebugStream& dbg, JSString* str) {
+  if (str == NULL) {
+    dbg << "null";
+  } else {
+    dbg << std::string(JS_GetStringBytes(str), JS_GetStringLength(str));
+  }
+  return dbg;
+}
+
+#endif
diff --git a/plugins/xpcom/IOOPHM.idl b/plugins/xpcom/IOOPHM.idl
new file mode 100644
index 0000000..fdd206e
--- /dev/null
+++ b/plugins/xpcom/IOOPHM.idl
@@ -0,0 +1,9 @@
+#include "nsISupports.idl"
+
+interface nsIDOMWindow;
+
+[scriptable, uuid(90CEF17B-C3FE-4251-AF68-4381B3D938A0)]
+interface IOOPHM : nsISupports
+{
+  boolean connect( in ACString addr, in ACString moduleName, in nsIDOMWindow window );
+};
diff --git a/plugins/xpcom/IOOPHM.xpt b/plugins/xpcom/IOOPHM.xpt
new file mode 100644
index 0000000..4be87b7
--- /dev/null
+++ b/plugins/xpcom/IOOPHM.xpt
Binary files differ
diff --git a/plugins/xpcom/JSRunner.cpp b/plugins/xpcom/JSRunner.cpp
new file mode 100755
index 0000000..1a9c0ba
--- /dev/null
+++ b/plugins/xpcom/JSRunner.cpp
@@ -0,0 +1,107 @@
+/*
+ * 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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+#include "JSRunner.h"
+
+#include "nsCOMPtr.h"
+#include "nsIPrincipal.h"
+#include "nsIScriptGlobalObject.h"
+#include "nsIScriptObjectPrincipal.h"
+#include "nsIURI.h"
+#include "nsIXPConnect.h"
+#include "nsStringAPI.h"
+
+// from js_runner_ff.cc in Gears (http://code.google.com/p/gears/)
+
+bool JSRunner::eval(JSContext* ctx, JSObject* object, const std::string& script) {
+  // To eval the script, we need the JSPrincipals to be acquired through
+  // nsIPrincipal.  nsIPrincipal can be queried through the
+  // nsIScriptObjectPrincipal interface on the Script Global Object.  In order
+  // to get the Script Global Object, we need to request the private data
+  // associated with the global JSObject on the current context.
+  nsCOMPtr<nsIScriptGlobalObject> sgo;
+  nsISupports *priv = reinterpret_cast<nsISupports *>(JS_GetPrivate(
+                                                          ctx,
+                                                          object));
+  nsCOMPtr<nsIXPConnectWrappedNative> wrapped_native = do_QueryInterface(priv);
+
+  if (wrapped_native) {
+    // The global object is a XPConnect wrapped native, the native in
+    // the wrapper might be the nsIScriptGlobalObject.
+    sgo = do_QueryWrappedNative(wrapped_native);
+  } else {
+    sgo = do_QueryInterface(priv);
+  }
+
+  JSPrincipals *jsprin;
+  nsresult nr;
+
+  nsCOMPtr<nsIScriptObjectPrincipal> obj_prin = do_QueryInterface(sgo, &nr);
+  if (NS_FAILED(nr)) {
+    return false;
+  }
+
+  nsIPrincipal *principal = obj_prin->GetPrincipal();
+  if (!principal) {
+    return false;
+  }
+
+  // Get the script scheme and host from the principal.  This is the URI that
+  // Firefox treats this script as running from.
+  nsCOMPtr<nsIURI> codebase;
+  principal->GetURI(getter_AddRefs(codebase));
+  if (!codebase) { return false; }
+  nsCString scheme;
+  nsCString host;
+  if (NS_FAILED(codebase->GetScheme(scheme)) ||
+      NS_FAILED(codebase->GetHostPort(host))) {
+    return false;
+  }
+
+  // Build a virtual filename that we'll run as.  This is to workaround
+  // http://lxr.mozilla.org/seamonkey/source/dom/src/base/nsJSEnvironment.cpp#500
+  // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=387477
+  // The filename is being used as the security origin instead of the principal.
+  // TODO(zork): Remove this section if this bug is resolved.
+  std::string virtual_filename(scheme.BeginReading());
+  virtual_filename += "://";
+  virtual_filename += host.BeginReading();
+
+  principal->GetJSPrincipals(ctx, &jsprin);
+
+  // Set up the JS stack so that our context is on top.  This is needed to
+  // play nicely with plugins that access the context stack, such as Firebug.
+//  nsCOMPtr<nsIJSContextStack> stack =
+//      do_GetService("@mozilla.org/js/xpc/ContextStack;1");
+//  if (!stack) { return false; }
+//
+//  stack->Push(js_engine_context_);
+
+  uintN line_number_start = 0;
+  jsval rval;
+  JSBool js_ok = 
+      JS_EvaluateScriptForPrincipals(ctx, object, jsprin, script.c_str(), script.length(),
+          virtual_filename.c_str(), line_number_start, &rval);
+
+  // Restore the context stack.
+//  JSContext *cx;
+//  stack->Pop(&cx);
+
+  // Decrements ref count on jsprin (Was added in GetJSPrincipals()).
+  (void)JSPRINCIPALS_DROP(ctx, jsprin);
+  if (!js_ok) { return false; }
+  return true;
+}
diff --git a/plugins/xpcom/JSRunner.h b/plugins/xpcom/JSRunner.h
new file mode 100755
index 0000000..733970e
--- /dev/null
+++ b/plugins/xpcom/JSRunner.h
@@ -0,0 +1,29 @@
+#ifndef _H_JSRunner
+#define _H_JSRunner
+/*
+ * 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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+#include <string>
+
+#include "mozincludes.h"
+#include "jsapi.h"
+
+class JSRunner {
+public:
+  static bool eval(JSContext* ctx, JSObject* global, const std::string& script);
+};
+
+#endif
diff --git a/plugins/xpcom/JavaObject.cpp b/plugins/xpcom/JavaObject.cpp
new file mode 100644
index 0000000..fd2af9f
--- /dev/null
+++ b/plugins/xpcom/JavaObject.cpp
@@ -0,0 +1,386 @@
+/*
+ * 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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+#include "JavaObject.h"
+#include "FFSessionHandler.h"
+#include "SessionData.h"
+#include "ServerMethods.h"
+#include "Debug.h"
+#include "XpcomDebug.h"
+#include "HostChannel.h"
+#include "InvokeMessage.h"
+#include "ReturnMessage.h"
+#include "scoped_ptr/scoped_ptr.h"
+
+static JSClass JavaObjectClass = {
+  "GWTJavaObject", /* class name */
+  JSCLASS_HAS_PRIVATE | JSCLASS_HAS_RESERVED_SLOTS(1) | JSCLASS_NEW_ENUMERATE, /* flags */
+
+  JS_PropertyStub, /* add property */
+  JS_PropertyStub, /* delete property */
+  JavaObject::getProperty, /* get property */
+  JavaObject::setProperty, /* set property */
+
+  reinterpret_cast<JSEnumerateOp>(JavaObject::enumerate), /* enumerate */
+  JS_ResolveStub, /* resolve */
+  JS_ConvertStub, // JavaObject::convert, /* convert */
+  JavaObject::finalize, /* finalize */ //TODO
+
+  NULL, /* object hooks */
+  NULL, /* check access */
+  JavaObject::call, /* call */ //TODO
+  NULL, /* construct */
+  NULL, /* object serialization */
+  NULL, /* has instance */
+  NULL, /* mark */
+  NULL /* reserve slots */
+};
+
+int JavaObject::getObjectId(JSContext* ctx, JSObject* obj) {
+  jsval val;
+  JSClass* jsClass = JS_GET_CLASS(ctx, obj);
+#if 1
+  if (jsClass != &JavaObjectClass) {
+    Debug::log(Debug::Error)
+        << "JavaObject::getObjectId called on non-JavaObject: " << jsClass->name
+        << Debug::flush;
+    return -1;
+  }
+  if (JSCLASS_RESERVED_SLOTS(jsClass) < 1) {
+    Debug::log(Debug::Error)
+        << "JavaObject::getObjectId -- " << static_cast<void*>(obj)
+        << " has only " << (JSCLASS_RESERVED_SLOTS(jsClass))
+        << " reserved slots, no objectId present" << Debug::flush;
+    return -1;
+  }
+#endif
+  if (!JS_GetReservedSlot(ctx, obj, 0, &val)) {
+    Debug::log(Debug::Error) << "Error getting reserved slot" << Debug::flush;
+    return -1;
+  }
+  // TODO: assert JSVAL_IS_INT(val)
+  return JSVAL_TO_INT(val);
+}
+
+SessionData* JavaObject::getSessionData(JSContext* ctx, JSObject* obj) {
+  void* data = JS_GetInstancePrivate(ctx, obj, &JavaObjectClass, NULL);
+  return static_cast<SessionData*>(data);
+}
+
+
+bool JavaObject::isJavaObject(JSContext* ctx, JSObject* obj) {
+  return JS_GET_CLASS(ctx, obj) == &JavaObjectClass;
+}
+
+JSObject* JavaObject::construct(JSContext* ctx, SessionData* data, int objectRef) {
+  // TODO: prototype? parent?
+  Debug::log(Debug::Spam) << "JavaObject::construct objectId=" << objectRef << Debug::flush;
+  JSObject* obj = JS_NewObject(ctx, &JavaObjectClass, NULL, NULL);
+  Debug::log(Debug::Spam) << "  obj=" << obj << Debug::flush;
+  if (!obj) {
+    return NULL;
+  }
+  // set the session data
+  if (!JS_SetPrivate(ctx, obj, data)) {
+    Debug::log(Debug::Error) << "Could not set private data" << Debug::flush;
+    return NULL;
+  }
+  // set the objectId
+  if (!JS_SetReservedSlot(ctx, obj, 0, INT_TO_JSVAL(objectRef))) {
+    Debug::log(Debug::Error) << "Could not set reserved slot" << Debug::flush;
+    return NULL;
+  }
+  // define toString (TODO: some way to avoid doing this each time)
+#if 1
+  if (!JS_DefineFunction(ctx, obj, "toString", JavaObject::toString, 0, 0)) {
+    Debug::log(Debug::Error) << "Could not define toString method on object"
+        << Debug::flush;
+  }
+#endif
+  return obj;
+}
+
+JSBool JavaObject::getProperty(JSContext* ctx, JSObject* obj, jsval id,
+    jsval* rval) {
+  Debug::log(Debug::Spam) << "JavaObject::getProperty obj=" << obj << Debug::flush;
+  SessionData* data = JavaObject::getSessionData(ctx, obj);
+  if (!data) {
+    // TODO: replace the frame with an error page instead?
+    *rval = JSVAL_VOID;
+    return JS_TRUE;
+  }
+  int objectRef = JavaObject::getObjectId(ctx, obj);
+  if (JSVAL_IS_STRING(id)) {
+    JSString* str = JSVAL_TO_STRING(id);
+    if ((JS_GetStringLength(str) == 8) && !strncmp("toString",
+          JS_GetStringBytes(str), 8)) {
+      *rval = data->getToStringTearOff();
+      return JS_TRUE;
+    }
+    if ((JS_GetStringLength(str) == 2) && !strncmp("id",
+          JS_GetStringBytes(str), 2)) {
+      *rval = INT_TO_JSVAL(objectRef);
+      return JS_TRUE;
+    }
+    Debug::log(Debug::Error) << "Getting unexpected string property "
+        << dumpJsVal(ctx, id) << Debug::flush;
+    // TODO: throw a better exception here
+    return JS_FALSE;
+  }
+  if (!JSVAL_IS_INT(id)) {
+    Debug::log(Debug::Error) << "Getting non-int/non-string property "
+          << dumpJsVal(ctx, id) << Debug::flush;
+    // TODO: throw a better exception here
+    return JS_FALSE;
+  }
+  int dispId = JSVAL_TO_INT(id);
+
+  HostChannel* channel = data->getHostChannel();
+  SessionHandler* handler = data->getSessionHandler();
+
+  Value value = ServerMethods::getProperty(*channel, handler, objectRef, dispId);
+  data->makeJsvalFromValue(*rval, ctx, value);
+  return JS_TRUE;
+}
+
+JSBool JavaObject::setProperty(JSContext* ctx, JSObject* obj, jsval id,
+    jsval* vp) {
+  Debug::log(Debug::Spam) << "JavaObject::setProperty obj=" << obj << Debug::flush;
+  if (!JSVAL_IS_INT(id)) {
+    Debug::log(Debug::Error) << "  Error: setting string property id" << Debug::flush;
+    // TODO: throw a better exception here
+    return JS_FALSE;
+  }
+
+  SessionData* data = JavaObject::getSessionData(ctx, obj);
+  if (!data) {
+    return JS_TRUE;
+  }
+
+  int objectRef = JavaObject::getObjectId(ctx, obj);
+  int dispId = JSVAL_TO_INT(id);
+
+  Value value;
+  data->makeValueFromJsval(value, ctx, *vp);
+
+  HostChannel* channel = data->getHostChannel();
+  SessionHandler* handler = data->getSessionHandler();
+
+  if (!ServerMethods::setProperty(*channel, handler, objectRef, dispId, value)) {
+    // TODO: throw a better exception here
+    return JS_FALSE;
+  }
+  return JS_TRUE;
+}
+
+// TODO: can this be removed now?
+JSBool JavaObject::convert(JSContext* ctx, JSObject* obj, JSType type, jsval* vp) {
+  Debug::log(Debug::Spam) << "JavaObject::convert obj=" << obj
+      << " type=" << type << Debug::flush;
+  switch (type) {
+    case JSTYPE_STRING:
+      return toString(ctx, obj, 0, NULL, vp);
+    case JSTYPE_VOID:
+      *vp = JSVAL_VOID;
+      return JS_TRUE;
+    case JSTYPE_NULL:
+      *vp = JSVAL_NULL;
+      return JS_TRUE;
+    case JSTYPE_OBJECT:
+      *vp = OBJECT_TO_JSVAL(obj);
+      return JS_TRUE;
+    default:
+      break;
+  }
+  return JS_FALSE;
+}
+
+/**
+ * List of property names we want to fake on wrapped Java objects.
+ */
+static const char* propertyNames[] = {
+    "toString",
+    "id",
+};
+#define NUM_PROPERTY_NAMES (sizeof(propertyNames) / sizeof(propertyNames[0]))
+
+JSBool JavaObject::enumerate(JSContext* ctx, JSObject* obj, JSIterateOp op,
+    jsval* statep, jsid* idp) {
+  int objectId = JavaObject::getObjectId(ctx, obj);
+  switch (op) {
+    case JSENUMERATE_INIT:
+      Debug::log(Debug::Spam) << "JavaObject::enumerate(oid=" << objectId
+          << ", INIT)" << Debug::flush;
+      *statep = JSVAL_ZERO;
+      if (idp) {
+        *idp = INT_TO_JSVAL(NUM_PROPERTY_NAMES);
+      }
+      break;
+    case JSENUMERATE_NEXT:
+    {
+      int idNum = JSVAL_TO_INT(*statep);
+      Debug::log(Debug::Spam) << "JavaObject::enumerate(oid=" << objectId
+          << ", NEXT " << idNum << ")" << Debug::flush;
+      *statep = INT_TO_JSVAL(idNum + 1);
+      if (idNum >= NUM_PROPERTY_NAMES) {
+        *statep = JSVAL_NULL;
+        *idp = JSVAL_NULL;
+      } else {
+        const char* propName = propertyNames[idNum];
+        JSString* str = JS_NewStringCopyZ(ctx, propName);
+        return JS_ValueToId(ctx, STRING_TO_JSVAL(str), idp);
+      }
+      break;
+    }
+    case JSENUMERATE_DESTROY:
+      Debug::log(Debug::Spam) << "JavaObject::enumerate(oid=" << objectId
+          << ", DESTROY)" << Debug::flush;
+      *statep = JSVAL_NULL;
+      break;
+    default:
+      Debug::log(Debug::Error) << "Unknown Enumerate op " <<
+          static_cast<int>(op) << Debug::flush;
+      return JS_FALSE;
+  }
+  return JS_TRUE;
+}
+
+void JavaObject::finalize(JSContext* ctx, JSObject* obj) {
+  Debug::log(Debug::Debugging) << "JavaObject::finalize obj=" << obj
+      << " objId=" << JavaObject::getObjectId(ctx, obj) << Debug::flush;
+  SessionData* data = JavaObject::getSessionData(ctx, obj);
+  if (data) {
+    int objectId = JavaObject::getObjectId(ctx, obj);
+    data->freeJavaObject(objectId);
+    JS_SetPrivate(ctx, obj, NULL);
+  }
+}
+
+JSBool JavaObject::toString(JSContext* ctx, JSObject* obj, uintN argc,
+    jsval* argv, jsval* rval) {
+  SessionData* data = JavaObject::getSessionData(ctx, obj);
+  if (!data) {
+    *rval = JSVAL_VOID;
+    return JS_TRUE;
+  }
+  int oid = getObjectId(ctx, obj);
+  Debug::log(Debug::Spam) << "JavaObject::toString(id=" << oid << ")"
+      << Debug::flush;
+  Value javaThis;
+  javaThis.setJavaObject(oid);
+  // we ignore any supplied parameters
+  return invokeJava(ctx, data, javaThis, InvokeMessage::TOSTRING_DISP_ID, 0,
+      NULL, rval);
+}
+
+/**
+ * Called when the JavaObject is invoked as a function.
+ * We ignore the JSObject* argument, which is the 'this' context, which is
+ * usually the window object. The JavaObject instance is in argv[-2].
+ *
+ * Returns a JS array, with the first element being a boolean indicating that
+ * an exception occured, and the second element is either the return value or
+ * the exception which was thrown.  In this case, we always return false and
+ * raise the exception ourselves.
+ */
+JSBool JavaObject::call(JSContext* ctx, JSObject*, uintN argc, jsval* argv,
+    jsval* rval) {
+  // Get the JavaObject called as a function
+  JSObject* obj = JSVAL_TO_OBJECT(argv[-2]);
+  if (argc < 2 || !JSVAL_IS_INT(argv[0]) || !JSVAL_IS_OBJECT(argv[1])) {
+    Debug::log(Debug::Error) << "JavaObject::call incorrect arguments" << Debug::flush;
+    return JS_FALSE;
+  }
+  int dispId = JSVAL_TO_INT(argv[0]);
+  if (Debug::level(Debug::Spam)) {
+    Debug::DebugStream& dbg = Debug::log(Debug::Spam) << "JavaObject::call oid="
+        << JavaObject::getObjectId(ctx, obj) << ",dispId=" << dispId << " (";
+    for (unsigned i = 2; i < argc; ++i) {
+      if (i > 2) {
+        dbg << ", ";
+      }
+      dbg << dumpJsVal(ctx, argv[i]);
+    }
+    dbg << ")" << Debug::flush;
+  }
+
+  SessionData* data = JavaObject::getSessionData(ctx, obj);
+  if (!data) {
+    *rval = JSVAL_VOID;
+    return JS_TRUE;
+  }
+  Debug::log(Debug::Spam) << "Data = " << data << Debug::flush;
+
+  Value javaThis;
+  if (!JSVAL_IS_NULL(argv[1])) {
+    JSObject* thisObj = JSVAL_TO_OBJECT(argv[1]);
+    if (isJavaObject(ctx, thisObj)) {
+      javaThis.setJavaObject(getObjectId(ctx, thisObj));
+    } else {
+      data->makeValueFromJsval(javaThis, ctx, argv[1]);
+    }
+  } else {
+    int oid = getObjectId(ctx, obj);
+    javaThis.setJavaObject(oid);
+  }
+  return invokeJava(ctx, data, javaThis, dispId, argc - 2, &argv[2], rval);
+}
+
+/**
+ * Calls a method on a Java object and returns a two-element JS array, with
+ * the first element being a boolean flag indicating an exception was thrown,
+ * and the second element is the actual return value or exception.
+ */
+JSBool JavaObject::invokeJava(JSContext* ctx, SessionData* data,
+    const Value& javaThis, int dispId, int numArgs, const jsval* jsargs,
+    jsval* rval) {
+  HostChannel* channel = data->getHostChannel();
+  SessionHandler* handler = data->getSessionHandler();
+  scoped_array<Value> args(new Value[numArgs]);
+  for (int i = 0; i < numArgs; ++i) {
+    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;
+    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;
+    return false;
+  }
+  Value returnValue = retMsg->getReturnValue();
+  // Since we can set exceptions normally, we always return false to the
+  // wrapper function and set the exception ourselves if one occurs.
+  // TODO: cleanup exception case
+  jsval retvalArray[] = {JSVAL_FALSE, JSVAL_VOID};
+  JSObject* retval = JS_NewArrayObject(ctx, 2, retvalArray);
+  *rval = OBJECT_TO_JSVAL(retval);
+  jsval retJsVal;
+  Debug::log(Debug::Spam) << "  result is " << returnValue << Debug::flush;
+  data->makeJsvalFromValue(retJsVal, ctx, returnValue);
+  if (retMsg->isException()) {
+    JS_SetPendingException(ctx, retJsVal);
+    return false;
+  }
+  if (!JS_SetElement(ctx, retval, 1, &retJsVal)) {
+    Debug::log(Debug::Error) << "Error setting return value element in array"
+        << Debug::flush;
+    return false;
+  }
+  return true;
+}
diff --git a/plugins/xpcom/JavaObject.h b/plugins/xpcom/JavaObject.h
new file mode 100755
index 0000000..781a4f0
--- /dev/null
+++ b/plugins/xpcom/JavaObject.h
@@ -0,0 +1,45 @@
+#ifndef _H_JavaObject
+#define _H_JavaObject
+/*
+ * 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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+#include "mozincludes.h"
+#include "jsapi.h"
+
+class SessionData;
+class Value;
+
+class JavaObject {
+public:
+  static bool isJavaObject(JSContext* ctx, JSObject* obj);
+  static JSObject* construct(JSContext* ctx, SessionData* data, int objectRef);
+  static int getObjectId(JSContext* ctx, JSObject* obj);
+  static JSBool getProperty(JSContext* ctx, JSObject* obj, jsval id, jsval* vp);
+  static JSBool setProperty(JSContext* ctx, JSObject* obj, jsval id, jsval* vp);
+  static JSBool resolve(JSContext* ctx, JSObject* obj, jsval id);
+  static JSBool convert(JSContext* cx, JSObject* obj, JSType type, jsval* vp);
+  static JSBool enumerate(JSContext* ctx, JSObject* obj, JSIterateOp op, jsval* statep, jsid* idp);
+  static void finalize(JSContext* ctx, JSObject* obj);
+  static JSBool toString(JSContext* ctx, JSObject* obj, uintN argc, jsval* argv, jsval* rval);
+  static JSBool call(JSContext* ctx, JSObject* obj, uintN argc, jsval* argv, jsval* rval);
+private:
+  static SessionData* getSessionData(JSContext* ctx, JSObject* obj);
+  static JSBool invokeJava(JSContext* ctx, SessionData* data,
+      const Value& javaThis, int dispId, int numArgs, const jsval* jsargs,
+      jsval* rval);
+};
+
+#endif
diff --git a/plugins/xpcom/Makefile b/plugins/xpcom/Makefile
new file mode 100644
index 0000000..5c1f343
--- /dev/null
+++ b/plugins/xpcom/Makefile
@@ -0,0 +1,257 @@
+# Copyright 2009 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
+# License for the specific language governing permissions and limitations under
+# the License.
+
+include ../config.mk
+
+# Make variables intended to be settable fromthe command line:
+#   DEFAULT_FIREFOX_LIBS	points to /usr/lib/firefox or equivalent
+#   PLUGIN_SDKS			points to GWT /plugin-sdks directory
+#   GECKO_PLATFORM		XPCOM ABI (ie, Linux_x86_64-gcc3)
+#
+
+ifeq ($(OS),mac)
+DEFAULT_FIREFOX_LIBS ?= /Applications/Firefox.app/Contents/MacOS
+RUN_PATH_FLAG = -executable_path
+DLL_SUFFIX = .dylib
+DLLFLAGS = -bundle -arch i386 -arch ppc
+TARGET_PLATFORM = Darwin_x86-gcc3
+# Mac puts multiple architectures into the same files
+GECKO_PLATFORM = Darwin-gcc3
+else ifeq ($(OS),linux)
+DEFAULT_FIREFOX_LIBS ?= /usr/lib/firefox
+RUN_PATH_FLAG = -rpath-link
+DLL_SUFFIX = .so
+DLLFLAGS = -shared -m$(FLAG32BIT)
+TARGET_PLATFORM = Linux_$(ARCH)-gcc3
+else ifeq ($(OS),sun)
+TARGET_PLATFORM = SunOS_$(ARCH)-sunc
+RUN_PATH_FLAG = -rpath-link
+DLLFLAGS=
+endif
+
+export FLAG32BIT
+
+ifeq ($(BROWSER),)
+$(warning Defaulting to FF3 build)
+BROWSER=ff3
+endif
+
+GECKO_MINOR_VERSION=
+ifeq ($(BROWSER),ff2)
+BROWSER_VERSION   = 1.8
+CFLAGS += -DBROWSER_FF2
+else ifeq ($(BROWSER),ff3)
+BROWSER_VERSION   = 1.9.0
+CFLAGS += -DBROWSER_FF3
+else ifeq ($(BROWSER),ff3+)
+BROWSER_VERSION   = 1.9.0
+CFLAGS += -DBROWSER_FF3
+GECKO_MINOR_VERSION=.10
+else ifeq ($(BROWSER),ff35)
+BROWSER_VERSION   = 1.9.1
+CFLAGS += -DBROWSER_FF3
+else
+$(error Unrecognized BROWSER of $(BROWSER) - options are ff2, ff3, ff3+, ff35)
+endif
+
+CFLAGS += -fshort-wchar
+CXXFLAGS = $(CXXONLYFLAGS) $(CFLAGS)
+DIR = $(shell pwd)
+
+# Set $PLUGIN_SDKS if it isn't in the default location
+PLUGIN_SDKS ?= ../../../plugin-sdks
+GECKO_PLATFORM ?= $(TARGET_PLATFORM)
+
+COMMON            = ../common/libcommon$(FLAG32BIT).a
+
+OBJ_OUTDIR        = build/$(TARGET_PLATFORM)-$(BROWSER)
+EXTENSION_OUTDIR  = prebuilt/extension-$(BROWSER)
+FF_PLATFORM_DIR   = $(EXTENSION_OUTDIR)/platform/$(TARGET_PLATFORM)
+
+INSTALLER_XPI     = prebuilt/oophm-xpcom-$(BROWSER).xpi
+FF_DLL            = $(OBJ_OUTDIR)/liboophm_$(BROWSER)$(DLL_SUFFIX)
+#FF_TYPELIB        = build/IOOPHM.xpt
+#FF_HEADER         = $(OBJ_OUTDIR)/IOOPHM.h
+FF_TYPELIB        = prebuilt/extension/components/IOOPHM.xpt
+FF_HEADER         = prebuilt/$(BROWSER)/include/IOOPHM.h
+INSTALL_RDF       = $(EXTENSION_OUTDIR)/install.rdf
+
+SDK_PATH          = $(PLUGIN_SDKS)/gecko-sdks
+GECKO_SDK         = $(SDK_PATH)/gecko-$(BROWSER_VERSION)
+GECKO_PLAT_INC    = $(GECKO_SDK)/$(GECKO_PLATFORM)/include
+GECKO_LIBS        = $(GECKO_SDK)/$(GECKO_PLATFORM)/lib$(GECKO_MINOR_VERSION)
+XPIDL             = $(GECKO_SDK)/$(GECKO_PLATFORM)/bin/xpidl
+XPIDL_FLAGS       = -I$(GECKO_SDK)/idl
+
+#DLLFLAGS += \
+#		-L$(GECKO_LIBS) \
+#		-L$(FIREFOX_LIBS) \
+#		-Wl,$(RUN_PATH_FLAG),$(FIREFOX_LIBS) \
+#		-lxpcomglue_s -lxpcom -lnspr4 -lmozjs
+DLLFLAGS += \
+		-L$(DEFAULT_FIREFOX_LIBS) \
+		-L$(GECKO_LIBS) \
+		-Wl,$(RUN_PATH_FLAG),$(DEFAULT_FIREFOX_LIBS) \
+		-Wl,$(RUN_PATH_FLAG),$(GECKO_LIBS) \
+		-lxpcomglue_s -lxpcom -lnspr4 -lmozjs
+
+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)
+
+.PHONY: all xpi lib common browser clean depend install install-platform find-ff-libs
+
+all:: common xpi
+
+lib:: browser $(OBJ_OUTDIR) $(EXTENSION_OUTDIR) $(FF_DLL)
+xpi:: $(EXTENSION_OUTDIR) $(INSTALLER_XPI)
+
+find-ff-libs::
+ifeq ($(FIREFOX_LIBS),)
+	$(warning Using firefox libraries at $(GECKO_LIBS))
+	$(eval FIREFOX_LIBS = $(GECKO_LIBS))
+endif
+
+browser:: find-ff-libs
+#	if [ ! -r $(GECKO_LIBS)/libxpcom.so ]
+#	then
+#	    $(error Missing Firefox libraries at $(GECKO_LIBS))
+#	fi
+
+# Not needed currently, but keeping around for now in case we change back to
+# putting it in build
+$(EXTENSION_OUTDIR):
+	rm -rf $@
+	mkdir -p $@
+	#cp -r prebuilt/extension/. $(EXTENSION_OUTDIR)
+	cp -r prebuilt/extension-$(BROWSER)/. $(EXTENSION_OUTDIR)
+	@mkdir -p $@/components
+
+generate-install:: $(EXTENSION_OUTDIR) install-template-$(BROWSER).rdf
+	sed -e s/GWT_OOPHM_VERSION/$(VERSION)/ install-template-$(BROWSER).rdf >$(INSTALL_RDF)
+
+SRCS =	\
+		ExternalWrapper.cpp \
+		ModuleOOPHM.cpp \
+		FFSessionHandler.cpp \
+		JavaObject.cpp \
+		JSRunner.cpp \
+		XpcomDebug.cpp
+
+FF_OBJS = $(patsubst %.cpp,$(OBJ_OUTDIR)/%.o,$(SRCS))
+
+$(FF_OBJS): $(OBJ_OUTDIR)
+
+$(OBJ_OUTDIR)::
+	@mkdir -p $@
+
+$(INSTALLER_XPI): $(FF_TYPELIB) $(EXTENSION_OUTDIR) generate-install $(shell find prebuilt/extension $(EXTENSION_OUTDIR)) $(FF_DLL)
+	@mkdir -p $(EXTENSION_OUTDIR)/components
+	(cd prebuilt/extension; find . \( -name .svn -prune \) -o -print | cpio -pmdua ../../$(EXTENSION_OUTDIR))
+	-rm $(INSTALLER_XPI)
+	(cd $(EXTENSION_OUTDIR) && zip -r -D -9 $(DIR)/$(INSTALLER_XPI) * -x '*/.svn/*' -x 'META-INF/*')
+
+$(FF_TYPELIB): IOOPHM.idl
+	$(XPIDL) $(XPIDL_FLAGS) -m typelib -e $@ $<
+
+$(FF_HEADER): IOOPHM.idl
+	$(XPIDL) $(XPIDL_FLAGS) -m header -e $@ $<
+
+$(FF_DLL): $(FF_OBJS) $(COMMON)
+	$(CXX) -m$(FLAG32BIT) -o $@ $(FF_OBJS) $(COMMON) $(DLLFLAGS) 
+	@mkdir -p $(FF_PLATFORM_DIR)/components
+	cp $(FF_DLL) $(FF_PLATFORM_DIR)/components/
+ifeq ($(OS),mac)
+	@mkdir -p $(subst x86,ppc,$(FF_PLATFORM_DIR))/components
+	cp $(FF_DLL) $(subst x86,ppc,$(FF_PLATFORM_DIR))/components/
+endif
+
+$(OBJ_OUTDIR)/%.o: %.cpp $(FF_HEADER)
+	$(CXX) $(CXXFLAGS) -c -o $@ -I. -I../common $<
+
+common $(COMMON):
+	(cd ../common && $(MAKE))
+
+clean:
+	rm -rf build
+
+install-platform:
+ifdef BROWSER
+	@-mkdir -p $(subst $(EXTENSION_OUTDIR),prebuilt/extension-$(BROWSER),$(FF_PLATFORM_DIR))/components
+	-cp $(FF_DLL) $(subst $(EXTENSION_OUTDIR),prebuilt/extension-$(BROWSER),$(FF_PLATFORM_DIR))/components
+ifeq ($(OS),mac)
+	@-mkdir -p $(subst $(EXTENSION_OUTDIR),prebuilt/extension-$(BROWSER),$(subst x86,ppc,$(FF_PLATFORM_DIR)))/components
+	-cp $(FF_DLL) $(subst $(EXTENSION_OUTDIR),prebuilt/extension-$(BROWSER),$(subst x86,ppc,$(FF_PLATFORM_DIR)))/components
+endif
+else
+	@$(MAKE) $@ BROWSER=ff2
+	@$(MAKE) $@ BROWSER=ff3
+endif
+
+DEPEND = g++ -MM -MT'$$(OBJ_OUTDIR)/$(patsubst %.cpp,%.o,$(src))' \
+  -I. -I../common -isystem$(dir $(FF_HEADER)) -isystem$(GECKO_SDK)/include $(src) &&
+depend: browser $(OBJ_OUTDIR) $(FF_HEADER)
+	($(foreach src,$(SRCS),$(DEPEND)) true) >>Makefile
+#	makedepend -- $(CFLAGS) -- $(SRCS)
+
+# DO NOT DELETE
+$(OBJ_OUTDIR)/ExternalWrapper.o: ExternalWrapper.cpp ExternalWrapper.h \
+  mozincludes.h FFSessionHandler.h SessionData.h \
+  ../common/SessionHandler.h ../common/BrowserChannel.h ../common/Value.h \
+  ../common/Debug.h ../common/Platform.h ../common/DebugLevel.h \
+  ../common/BrowserChannel.h ../common/scoped_ptr/scoped_ptr.h \
+  ../common/LoadModuleMessage.h ../common/Message.h \
+  ../common/BrowserChannel.h ../common/HostChannel.h ../common/Debug.h \
+  ../common/ByteOrder.h ../common/Platform.h ../common/Socket.h \
+  ../common/Platform.h ../common/Debug.h ../common/AllowedConnections.h \
+  ../common/Platform.h ../common/Message.h ../common/ReturnMessage.h \
+  ../common/Message.h ../common/BrowserChannel.h ../common/Value.h \
+  ../common/Value.h ../common/SessionHandler.h ../common/SessionHandler.h \
+  ../common/ServerMethods.h ../common/Value.h
+$(OBJ_OUTDIR)/ModuleOOPHM.o: ModuleOOPHM.cpp ../common/Debug.h \
+  ../common/Platform.h ../common/DebugLevel.h ExternalWrapper.h \
+  mozincludes.h FFSessionHandler.h SessionData.h \
+  ../common/SessionHandler.h ../common/BrowserChannel.h ../common/Value.h \
+  ../common/Debug.h ../common/BrowserChannel.h \
+  ../common/scoped_ptr/scoped_ptr.h
+$(OBJ_OUTDIR)/FFSessionHandler.o: FFSessionHandler.cpp FFSessionHandler.h \
+  mozincludes.h SessionData.h ../common/SessionHandler.h \
+  ../common/BrowserChannel.h ../common/Value.h ../common/Debug.h \
+  ../common/Platform.h ../common/DebugLevel.h ../common/BrowserChannel.h \
+  ../common/HostChannel.h ../common/Debug.h ../common/ByteOrder.h \
+  ../common/Platform.h ../common/Socket.h ../common/Platform.h \
+  ../common/Debug.h ../common/AllowedConnections.h ../common/Platform.h \
+  ../common/Message.h ../common/ReturnMessage.h ../common/Message.h \
+  ../common/BrowserChannel.h ../common/Value.h ../common/Value.h \
+  ../common/SessionHandler.h JavaObject.h JSRunner.h XpcomDebug.h \
+  ../common/scoped_ptr/scoped_ptr.h RootedObject.h \
+  ../common/InvokeMessage.h ../common/Message.h \
+  ../common/BrowserChannel.h ../common/Value.h ../common/ServerMethods.h \
+  ../common/Value.h
+$(OBJ_OUTDIR)/JavaObject.o: JavaObject.cpp JavaObject.h mozincludes.h \
+  FFSessionHandler.h SessionData.h ../common/SessionHandler.h \
+  ../common/BrowserChannel.h ../common/Value.h ../common/Debug.h \
+  ../common/Platform.h ../common/DebugLevel.h ../common/BrowserChannel.h \
+  ../common/ServerMethods.h ../common/Value.h XpcomDebug.h \
+  ../common/HostChannel.h ../common/Debug.h ../common/ByteOrder.h \
+  ../common/Platform.h ../common/Socket.h ../common/Platform.h \
+  ../common/Debug.h ../common/AllowedConnections.h ../common/Platform.h \
+  ../common/Message.h ../common/ReturnMessage.h ../common/Message.h \
+  ../common/BrowserChannel.h ../common/Value.h ../common/Value.h \
+  ../common/SessionHandler.h ../common/InvokeMessage.h \
+  ../common/Message.h ../common/BrowserChannel.h ../common/Value.h \
+  ../common/scoped_ptr/scoped_ptr.h
+$(OBJ_OUTDIR)/JSRunner.o: JSRunner.cpp JSRunner.h mozincludes.h
+$(OBJ_OUTDIR)/XpcomDebug.o: XpcomDebug.cpp XpcomDebug.h mozincludes.h \
+  JavaObject.h
diff --git a/plugins/xpcom/ModuleOOPHM.cpp b/plugins/xpcom/ModuleOOPHM.cpp
new file mode 100644
index 0000000..33c5d73
--- /dev/null
+++ b/plugins/xpcom/ModuleOOPHM.cpp
@@ -0,0 +1,145 @@
+/*
+ * 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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+#include "Debug.h"
+#include "ExternalWrapper.h"
+
+#include "nsCOMPtr.h"
+#include "nsIGenericFactory.h"
+#include "nsICategoryManager.h"
+#include "nsISupports.h"
+#include "nsIXULAppInfo.h"
+#include "nsServiceManagerUtils.h"
+#include "nsXPCOMCID.h"
+
+#ifdef BROWSER_FF3
+#include "nsIClassInfoImpl.h" // 1.9 only
+#endif
+
+#ifdef _WINDOWS
+#include <windows.h>
+
+BOOL APIENTRY DllMain(HMODULE hModule, DWORD ulReasonForCall, LPVOID lpReserved) {
+  switch (ulReasonForCall) {
+    case DLL_PROCESS_ATTACH:
+    case DLL_THREAD_ATTACH:
+    case DLL_THREAD_DETACH:
+    case DLL_PROCESS_DETACH:
+      break;
+  }
+  return TRUE;
+}
+#endif
+
+NS_GENERIC_FACTORY_CONSTRUCTOR(ExternalWrapper)
+NS_DECL_CLASSINFO(ExternalWrapper)
+
+static NS_IMETHODIMP registerSelf(nsIComponentManager *aCompMgr, nsIFile *aPath,
+    const char *aLoaderStr, const char *aType,
+    const nsModuleComponentInfo *aInfo) {
+
+  Debug::log(Debug::Info) << "Registered GWT hosted mode plugin"
+      << Debug::flush;
+  nsresult rv;
+  nsCOMPtr<nsICategoryManager> categoryManager =
+      do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
+
+  NS_ENSURE_SUCCESS(rv, rv);
+
+  rv = categoryManager->AddCategoryEntry("JavaScript global property",
+      "__gwt_HostedModePlugin", OOPHM_CONTRACTID, true, true, nsnull);
+
+  if (rv != NS_OK) {
+    Debug::log(Debug::Error) << "ModuleOOPHM registerSelf returned " << rv
+        << Debug::flush;
+  }
+  return rv;
+}
+
+static NS_IMETHODIMP factoryDestructor(void) {
+  Debug::log(Debug::Debugging) << "ModuleOOPHM factoryDestructor()"
+      << Debug::flush;
+  return NS_OK;
+}
+
+static NS_IMETHODIMP unregisterSelf(nsIComponentManager *aCompMgr,
+    nsIFile *aPath, const char *aLoaderStr,
+    const nsModuleComponentInfo *aInfo) {
+  Debug::log(Debug::Debugging) << "ModuleOOPHM unRegisterSelf()"
+      << Debug::flush;
+  return NS_OK;
+}
+
+static nsModuleComponentInfo components[] = {
+    {
+       OOPHM_CLASSNAME,
+       OOPHM_CID,
+       OOPHM_CONTRACTID,
+       ExternalWrapperConstructor,
+       registerSelf,
+       unregisterSelf, /* unregister self */
+       factoryDestructor, /* factory destructor */
+       NS_CI_INTERFACE_GETTER_NAME(ExternalWrapper), /* get interfaces */
+       nsnull, /* language helper */
+       &NS_CLASSINFO_NAME(ExternalWrapper), /* global class-info pointer */
+       0 /* class flags */
+    }
+};
+
+// From Gears base/firefox/module.cc
+static nsModuleInfo const kModuleInfo = {
+  NS_MODULEINFO_VERSION,
+  ("ExternalWrapperModule"),
+  (components),
+  (sizeof(components) / sizeof(components[0])),
+  (nsnull),
+  (nsnull)
+};
+
+NSGETMODULE_ENTRY_POINT(ExternalWrapperModule) (nsIComponentManager *servMgr,
+    nsIFile* location, nsIModule** result) {
+  Debug::log(Debug::Debugging) << "OOPHM ExternalWrapperModule entry point"
+      << Debug::flush;
+
+  // CURRENTLY BUILT AS SEPARATE PLUGINS FOR FF1.5/2 and FF3, so the below
+  // comments are out of date.
+  //
+  // This module is compiled once against Gecko 1.8 (Firefox 1.5 and 2) and
+  // once against Gecko 1.9 (Firefox 3). We need to make sure that we are
+  // only loaded into the environment we were compiled against.
+  nsresult nr;
+  nsCOMPtr<nsIXULAppInfo> app_info =
+      do_GetService("@mozilla.org/xre/app-info;1", &nr);
+  if (NS_FAILED(nr) || !app_info) {
+    return NS_ERROR_FAILURE;
+  }
+
+  nsCString gecko_version;
+  app_info->GetPlatformVersion(gecko_version);
+  Debug::log(Debug::Debugging) << "  gecko version = "
+      << gecko_version.BeginReading() << Debug::flush;
+#if defined(BROWSER_FF2)
+  if (strncmp(gecko_version.BeginReading(), "1.8", 3) != 0) {
+    return NS_ERROR_FAILURE;
+  }
+#elif defined(BROWSER_FF3)
+  if (strncmp(gecko_version.BeginReading(), "1.9", 3) != 0) {
+    return NS_ERROR_FAILURE;
+  }
+#endif
+
+  return NS_NewGenericModule2(&kModuleInfo, result);
+}
diff --git a/plugins/xpcom/README.txt b/plugins/xpcom/README.txt
new file mode 100644
index 0000000..a9aa410
--- /dev/null
+++ b/plugins/xpcom/README.txt
@@ -0,0 +1,25 @@
+You will need to checkout the SDKs required for building the plugin
+separately.  These are located at:
+	https://google-web-toolkit.googlecode.com/svn/plugin-sdks
+
+This assumes the SDKS are located in ../../../plugin-sdks -- if this is
+not correct, edit the definition in Makefile.
+
+Build by:
+
+make ARCH=x86 BROWSER=ff2
+make ARCH=x86_64 BROWSER=ff3
+
+etc -- default is current architecture and ff3.
+
+BROWSER values supported:
+  ff2	Firefox 1.5-2.0
+  ff3	Firefox 3.0
+  ff3+  Firefox 3.0.11+ on some platforms
+  ff35  Firefox 3.5
+
+You may need to try both ff3 and ff3+, as different platforms chose different
+library layouts.
+
+In the future, we will try and make a combined XPI which uses a JS shim plugin
+to select the proper shared library file to use based on the platform.
diff --git a/plugins/xpcom/RootedObject.h b/plugins/xpcom/RootedObject.h
new file mode 100755
index 0000000..7251034
--- /dev/null
+++ b/plugins/xpcom/RootedObject.h
@@ -0,0 +1,77 @@
+#ifndef _H_RootedObject
+#define _H_RootedObject
+/*
+ * 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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+#include "Debug.h"
+
+#include "jsapi.h"
+
+class RootedObject {
+public:
+  RootedObject(JSContext* ctx, const char* name = 0) : ctx(ctx), obj(0) {
+    if (!JS_AddNamedRoot(ctx, &obj, name)) {
+      Debug::log(Debug::Error) << "RootedObject(" << (name ? name : "")
+          << "): JS_AddNamedRoot failed" << Debug::flush;
+    }
+  }
+  
+  ~RootedObject() {
+    // Always returns success, so no need to check.
+    JS_RemoveRoot(ctx, &obj);
+  }
+  
+  JSObject& operator*() const {
+    assert(obj != 0);
+    return *obj;
+  }
+
+  JSObject* operator->() const  {
+    assert(obj != 0);
+    return obj;
+  }
+
+  bool operator==(JSObject* p) const {
+    return obj == p;
+  }
+
+  bool operator!=(JSObject* p) const {
+    return obj != p;
+  }
+
+  JSObject* get() const  {
+    return obj;
+  }
+  
+  RootedObject& operator=(JSObject* val) {
+    obj = val;
+    return *this;
+  }
+
+private:
+  JSContext* ctx;
+  JSObject* obj; 
+};
+
+inline bool operator==(JSObject* p, const RootedObject& ro) {
+  return p == ro.get();
+}
+
+inline bool operator!=(JSObject* p, const RootedObject& ro) {
+  return p != ro.get();
+}
+
+#endif
diff --git a/plugins/xpcom/SessionData.h b/plugins/xpcom/SessionData.h
new file mode 100755
index 0000000..a3dde0e
--- /dev/null
+++ b/plugins/xpcom/SessionData.h
@@ -0,0 +1,90 @@
+#ifndef _H_SessionData
+#define _H_SessionData
+/*
+ * 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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+#include "mozincludes.h"
+
+#include "SessionHandler.h"
+
+#include "jsapi.h"
+
+class HostChannel;
+
+class SessionData {
+public:
+  SessionData(HostChannel* channel, SessionHandler* sessionHandler,
+      JSContext* ctx) : channel(channel), sessionHandler(sessionHandler),
+      global(JS_GetGlobalObject(ctx)), runtime(JS_GetRuntime(ctx)),
+      toStringTearOff(JSVAL_VOID)
+  {
+  }
+
+  HostChannel* getHostChannel() const {
+    return channel;
+  }
+
+  SessionHandler* getSessionHandler() const {
+    return sessionHandler;
+  }
+
+  JSObject* getGlobalObject() const {
+    return global;
+  }
+
+  jsval getToStringTearOff() const {
+    return toStringTearOff;
+  }
+
+  /*
+  * Convert a value from the JavaScript into something that can be sent back
+  * to the OOPHM host.
+  */
+  virtual void makeValueFromJsval(Value& retVal, JSContext* ctx, const jsval& value)=0;
+
+  /*
+  * Convert a value from the OOPHM host into something that can be passed into
+  * the JavaScript execution environment.
+  */
+  virtual void makeJsvalFromValue(jsval& retVal, JSContext* ctx, const Value& value)=0;
+  
+  /*
+  * Removes the JavaObject wrapper with the given id and notifies the host.
+  */
+  virtual void freeJavaObject(int objectId)=0;
+
+protected:
+  /*
+  * The communication channel used for the OOPHM session.
+  */
+  HostChannel* const channel;
+
+  /*
+  * A reference to the SessionHandler being used in the OOPHM session.
+  */
+  SessionHandler* const sessionHandler;
+
+  JSRuntime* runtime;
+  
+  JSObject* const global; 
+  
+  /**
+   * A function object representing the toString tear-off method.
+   */
+  jsval toStringTearOff;
+};
+
+#endif
diff --git a/plugins/xpcom/VisualStudio/ff2-xpcom.vcproj b/plugins/xpcom/VisualStudio/ff2-xpcom.vcproj
new file mode 100755
index 0000000..0575de1
--- /dev/null
+++ b/plugins/xpcom/VisualStudio/ff2-xpcom.vcproj
@@ -0,0 +1,767 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<VisualStudioProject

+	ProjectType="Visual C++"

+	Version="8.00"

+	Name="ff2-xpcom"

+	ProjectGUID="{6BF0C2CE-CB0C-421B-A67C-1E448371D24B}"

+	RootNamespace="ff2-xpcom"

+	Keyword="Win32Proj"

+	>

+	<Platforms>

+		<Platform

+			Name="Win32"

+		/>

+	</Platforms>

+	<ToolFiles>

+	</ToolFiles>

+	<Configurations>

+		<Configuration

+			Name="Debug|Win32"

+			OutputDirectory="Debug"

+			IntermediateDirectory="Debug"

+			ConfigurationType="2"

+			UseOfMFC="1"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				Optimization="0"

+				AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\..\common&quot;;&quot;S:\xulrunner-sdk-win\sdk\include&quot;;&quot;S:\xulrunner-sdk-win\include\caps&quot;;&quot;s:\xulrunner-sdk-win\include\dom&quot;;&quot;s:\xulrunner-sdk-win\include\js&quot;;&quot;s:\xulrunner-sdk-win\include\necko&quot;;&quot;s:\xulrunner-sdk-win\include\string&quot;;&quot;s:\xulrunner-sdk-win\include\widget&quot;;&quot;s:\xulrunner-sdk-win\include\xpcom&quot;;&quot;s:\xulrunner-sdk-win\include\xpconnect&quot;;&quot;S:\xulrunner-sdk-win\include&quot;"

+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FIREFOXPLUGIN_EXPORTS;GWT_DEBUGLEVEL=Warning;XPCOM_GLUE;XPCOM_GLUE_USE_NSPR;MOZILLA_STRICT_API"

+				MinimalRebuild="true"

+				BasicRuntimeChecks="3"

+				RuntimeLibrary="1"

+				UsePrecompiledHeader="0"

+				WarningLevel="3"

+				Detect64BitPortabilityProblems="true"

+				DebugInformationFormat="3"

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+				ResourceOutputFileName="$(IntDir)/$(TargetName).res"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				AdditionalDependencies="ws2_32.lib xpcomglue_s.lib xpcom.lib nspr4.lib js3250.lib"

+				ShowProgress="2"

+				OutputFile="$(ProjectDir)\..\extension\platform\WINNT_x86-msvc\components\xpOOPHM.dll"

+				LinkIncremental="1"

+				AdditionalLibraryDirectories="..\..\..\..\xulrunner-sdk-win\lib"

+				ModuleDefinitionFile="$(ProjectDir)\..\xpOOPHM.def"

+				GenerateDebugInformation="true"

+				ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"

+				SubSystem="2"

+				ImportLibrary="$(IntDir)\$(TargetName).lib"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+		<Configuration

+			Name="Release|Win32"

+			OutputDirectory="Release"

+			IntermediateDirectory="Release"

+			ConfigurationType="2"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				Optimization="3"

+				EnableIntrinsicFunctions="true"

+				AdditionalIncludeDirectories="&quot;..\..\common&quot;"

+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FIREFOXPLUGIN_EXPORTS;GWT_DEBUGLEVEL=Warning;XPCOM_GLUE;XPCOM_GLUE_USE_NSPR;MOZILLA_STRICT_API"

+				ExceptionHandling="1"

+				RuntimeLibrary="2"

+				UsePrecompiledHeader="0"

+				WarningLevel="3"

+				Detect64BitPortabilityProblems="false"

+				DebugInformationFormat="3"

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				AdditionalDependencies="ws2_32.lib xpcomglue_s.lib xpcom.lib nspr4.lib js3250.lib"

+				ShowProgress="2"

+				OutputFile="..\extension\platform\WINNT_x86-msvc\components\xpOOPHM.dll"

+				LinkIncremental="0"

+				AdditionalLibraryDirectories="..\..\..\..\xulrunner-sdk-win\lib"

+				ModuleDefinitionFile="..\xpOOPHM.def"

+				GenerateDebugInformation="true"

+				ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"

+				SubSystem="2"

+				OptimizeReferences="2"

+				EnableCOMDATFolding="2"

+				ImportLibrary="$(IntDir)\$(TargetName).lib"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+	</Configurations>

+	<References>

+	</References>

+	<Files>

+		<Filter

+			Name="Header Files"

+			Filter="h;hpp;hxx;hm;inl;inc;xsd"

+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"

+			>

+			<File

+				RelativePath="..\..\common\AllowedConnections.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\BrowserChannel.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\ByteOrder.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Debug.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\DebugLevel.h"

+				>

+			</File>

+			<File

+				RelativePath="..\ExternalWrapper.h"

+				>

+			</File>

+			<File

+				RelativePath="..\FFSessionHandler.h"

+				>

+			</File>

+			<File

+				RelativePath="..\XpcomDebug.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\FreeValueMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\HashMap.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\HostChannel.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\InvokeMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\InvokeSpecialMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\JavaObject.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsapi.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsautocfg.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jscompat.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsconfig.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jslong.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsotypes.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsproto.tbl"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jspubtd.h"

+				>

+			</File>

+			<File

+				RelativePath="..\JSRunner.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jstypes.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsutil.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsutil.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsutil.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsutil.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\LoadJsniMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\LoadModuleMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Message.h"

+				>

+			</File>

+			<File

+				RelativePath="..\ModuleOOPHM.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\mozilla-config.h"

+				>

+			</File>

+			<File

+				RelativePath="..\mozincludes.h"

+				>

+			</File>

+			<File

+				RelativePath="..\npapi\npapi.h"

+				>

+			</File>

+			<File

+				RelativePath="..\npapi\nphostapi.h"

+				>

+			</File>

+			<File

+				RelativePath="..\npapi\npruntime.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpconnect\nsAXPCNativeCallContext.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsCOMPtr.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nscore.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nscore.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsCycleCollector.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsDebug.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsError.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\widget\nsEvent.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsICategoryManager.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIClassInfo.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIClassInfoImpl.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIComponentManager.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsID.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsIEnumerator.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsIException.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsIExceptionService.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIFactory.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIGenericFactory.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\necko\nsIHttpProtocolHandler.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsIInterfaceInfo.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsIInterfaceInfoManager.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpconnect\nsIJSContextStack.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIMemory.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIModule.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\caps\nsIPrincipal.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIProgrammingLanguage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\necko\nsIProtocolHandler.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\necko\nsIProxiedProtocolHandler.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpconnect\nsIScriptableInterfaces.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\dom\nsIScriptGlobalObject.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\dom\nsIScriptObjectPrincipal.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\caps\nsISecurityCheckedComponent.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsISerializable.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIServiceManager.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsISimpleEnumerator.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsISimpleEnumerator.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsISupports.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsISupports.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsISupportsBase.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsISupportsBase.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsISupportsImpl.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsISupportsUtils.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsISupportsUtils.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIURI.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsIVariant.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpconnect\nsIXPConnect.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsMemory.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\necko\nsNetCID.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsrootidl.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsrootidl.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsServiceManagerUtils.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsStringAPI.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsTraceRefcnt.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsXPCOM.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsXPCOMCID.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsXPCOMStrings.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Platform.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\pratom.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\prcpucfg.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\prinrval.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\prlock.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\prlog.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\prlong.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\obsolete\protypes.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\prthread.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\prtime.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\prtypes.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\QuitMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\ReturnMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\RootedObject.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\scoped_ptr\scoped_ptr.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\ServerMethods.h"

+				>

+			</File>

+			<File

+				RelativePath="..\SessionData.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\SessionHandler.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Socket.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Value.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpconnect\xpccomponents.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpconnect\xpcexception.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpconnect\xpcjsid.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\xpcom-config.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\xpt_arena.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\xpt_struct.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\xptinfo.h"

+				>

+			</File>

+		</Filter>

+		<Filter

+			Name="Resource Files"

+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"

+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"

+			>

+			<File

+				RelativePath="..\xpOOPHM.rc"

+				>

+			</File>

+		</Filter>

+		<Filter

+			Name="Source Files"

+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"

+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"

+			>

+			<File

+				RelativePath="..\..\common\AllowedConnections.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Debug.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\ExternalWrapper.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\FFSessionHandler.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\XpcomDebug.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\FreeValueMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\HostChannel.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\InvokeMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\InvokeSpecialMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\JavaObject.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\JSRunner.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\LoadJsniMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\LoadModuleMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\ModuleOOPHM.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\ReturnMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\ServerMethods.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Socket.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\xpOOPHM.def"

+				>

+			</File>

+		</Filter>

+	</Files>

+	<Globals>

+	</Globals>

+</VisualStudioProject>

diff --git a/plugins/xpcom/VisualStudio/ff3-xpcom.sln b/plugins/xpcom/VisualStudio/ff3-xpcom.sln
new file mode 100755
index 0000000..a14bef1
--- /dev/null
+++ b/plugins/xpcom/VisualStudio/ff3-xpcom.sln
@@ -0,0 +1,20 @@
+

+Microsoft Visual Studio Solution File, Format Version 9.00

+# Visual Studio 2005

+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ff3-xpcom", "ff3-xpcom.vcproj", "{6BF0C2CE-CB0C-421B-A67C-1E448371D24C}"

+EndProject

+Global

+	GlobalSection(SolutionConfigurationPlatforms) = preSolution

+		Debug|Win32 = Debug|Win32

+		Release|Win32 = Release|Win32

+	EndGlobalSection

+	GlobalSection(ProjectConfigurationPlatforms) = postSolution

+		{6BF0C2CE-CB0C-421B-A67C-1E448371D24C}.Debug|Win32.ActiveCfg = Debug|Win32

+		{6BF0C2CE-CB0C-421B-A67C-1E448371D24C}.Debug|Win32.Build.0 = Debug|Win32

+		{6BF0C2CE-CB0C-421B-A67C-1E448371D24C}.Release|Win32.ActiveCfg = Release|Win32

+		{6BF0C2CE-CB0C-421B-A67C-1E448371D24C}.Release|Win32.Build.0 = Release|Win32

+	EndGlobalSection

+	GlobalSection(SolutionProperties) = preSolution

+		HideSolutionNode = FALSE

+	EndGlobalSection

+EndGlobal

diff --git a/plugins/xpcom/VisualStudio/ff3-xpcom.vcproj b/plugins/xpcom/VisualStudio/ff3-xpcom.vcproj
new file mode 100755
index 0000000..d4a7485
--- /dev/null
+++ b/plugins/xpcom/VisualStudio/ff3-xpcom.vcproj
@@ -0,0 +1,787 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<VisualStudioProject

+	ProjectType="Visual C++"

+	Version="8.00"

+	Name="ff3-xpcom"

+	ProjectGUID="{6BF0C2CE-CB0C-421B-A67C-1E448371D24C}"

+	RootNamespace="ff3-xpcom"

+	Keyword="Win32Proj"

+	>

+	<Platforms>

+		<Platform

+			Name="Win32"

+		/>

+	</Platforms>

+	<ToolFiles>

+	</ToolFiles>

+	<Configurations>

+		<Configuration

+			Name="Debug|Win32"

+			OutputDirectory="Debug"

+			IntermediateDirectory="Debug"

+			ConfigurationType="2"

+			UseOfMFC="1"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				Optimization="0"

+				AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\..\common&quot;;&quot;..\prebuilt\ff3\include&quot;;&quot;..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\WINNT_x86-msvc\include&quot;;&quot;..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include&quot;;&quot;..\..\..\..\gwt-tools\sdk\gecko-sdks\geck-1.9\include\caps&quot;;&quot;..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\dom&quot;;&quot;..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\js&quot;;&quot;..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\necko&quot;;&quot;..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\string&quot;;&quot;..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\widget&quot;;&quot;..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpcom&quot;;&quot;..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpconnect&quot;;&quot;..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include&quot;"

+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FIREFOXPLUGIN_EXPORTS;GWT_DEBUGLEVEL=Warning;XPCOM_GLUE;XPCOM_GLUE_USE_NSPR;MOZILLA_STRICT_API;BROWSER_FF3"

+				MinimalRebuild="true"

+				BasicRuntimeChecks="3"

+				RuntimeLibrary="1"

+				UsePrecompiledHeader="0"

+				WarningLevel="3"

+				Detect64BitPortabilityProblems="true"

+				DebugInformationFormat="3"

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+				ResourceOutputFileName="$(IntDir)/$(TargetName).res"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				AdditionalDependencies="ws2_32.lib xpcomglue_s.lib xpcom.lib nspr4.lib js3250.lib"

+				ShowProgress="2"

+				OutputFile="$(ProjectDir)\..\prebuilt\extension-ff3\platform\WINNT_x86-msvc\components\xpOOPHM.dll"

+				LinkIncremental="1"

+				AdditionalLibraryDirectories="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\WINNT_x86-msvc\lib"

+				ModuleDefinitionFile="$(ProjectDir)\..\xpOOPHM.def"

+				GenerateDebugInformation="true"

+				ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"

+				SubSystem="2"

+				ImportLibrary="$(IntDir)\$(TargetName).lib"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+		<Configuration

+			Name="Release|Win32"

+			OutputDirectory="Release"

+			IntermediateDirectory="Release"

+			ConfigurationType="2"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				Optimization="3"

+				EnableIntrinsicFunctions="true"

+				AdditionalIncludeDirectories="&quot;..\..\common&quot;"

+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FIREFOXPLUGIN_EXPORTS;GWT_DEBUGLEVEL=Warning;XPCOM_GLUE;XPCOM_GLUE_USE_NSPR;MOZILLA_STRICT_API;BROWSER_FF3"

+				ExceptionHandling="1"

+				RuntimeLibrary="2"

+				UsePrecompiledHeader="0"

+				WarningLevel="3"

+				Detect64BitPortabilityProblems="false"

+				DebugInformationFormat="3"

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				AdditionalDependencies="ws2_32.lib xpcomglue_s.lib xpcom.lib nspr4.lib js3250.lib"

+				ShowProgress="2"

+				OutputFile="..\extension\platform\WINNT_x86-msvc\components\xpOOPHM.dll"

+				LinkIncremental="0"

+				AdditionalLibraryDirectories="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\WINNT_x86-msvc\lib"

+				ModuleDefinitionFile="..\xpOOPHM.def"

+				GenerateDebugInformation="true"

+				ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"

+				SubSystem="2"

+				OptimizeReferences="2"

+				EnableCOMDATFolding="2"

+				ImportLibrary="$(IntDir)\$(TargetName).lib"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+	</Configurations>

+	<References>

+	</References>

+	<Files>

+		<Filter

+			Name="Header Files"

+			Filter="h;hpp;hxx;hm;inl;inc;xsd"

+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"

+			>

+			<File

+				RelativePath="..\..\common\AllowedConnections.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\BrowserChannel.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\ByteOrder.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Debug.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\DebugLevel.h"

+				>

+			</File>

+			<File

+				RelativePath="..\ExternalWrapper.h"

+				>

+			</File>

+			<File

+				RelativePath="..\FFSessionHandler.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\FreeValueMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\HashMap.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\HostChannel.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\InvokeMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\InvokeSpecialMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\prebuilt\ff3\include\IOOPHM.h"

+				>

+			</File>

+			<File

+				RelativePath="..\JavaObject.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\js\jsapi.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\js\jsautocfg.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\js\jscompat.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\js\jsconfig.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\jscpucfg.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\js\jslong.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\jsosdep.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\js\jsotypes.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\js\jsproto.tbl"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\js\jspubtd.h"

+				>

+			</File>

+			<File

+				RelativePath="..\JSRunner.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\js\jstypes.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\js\jsutil.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\js\jsutil.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\js\jsutil.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\js\jsutil.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\LoadJsniMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\LoadModuleMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Message.h"

+				>

+			</File>

+			<File

+				RelativePath="..\ModuleOOPHM.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\WINNT_x86-msvc\include\mozilla-config.h"

+				>

+			</File>

+			<File

+				RelativePath="..\mozincludes.h"

+				>

+			</File>

+			<File

+				RelativePath="..\npapi\npapi.h"

+				>

+			</File>

+			<File

+				RelativePath="..\npapi\nphostapi.h"

+				>

+			</File>

+			<File

+				RelativePath="..\npapi\npruntime.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpconnect\nsAXPCNativeCallContext.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsCOMPtr.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nscore.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpcom\nscore.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsCycleCollector.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsDebug.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsError.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\widget\nsEvent.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsICategoryManager.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsIClassInfo.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsIClassInfoImpl.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsIComponentManager.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsID.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpcom\nsIEnumerator.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpcom\nsIException.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpcom\nsIExceptionService.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsIFactory.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsIGenericFactory.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\necko\nsIHttpProtocolHandler.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpcom\nsIInterfaceInfo.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpcom\nsIInterfaceInfoManager.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpconnect\nsIJSContextStack.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsIMemory.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsIModule.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\caps\nsIPrincipal.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsIProgrammingLanguage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\necko\nsIProtocolHandler.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\necko\nsIProxiedProtocolHandler.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpconnect\nsIScriptableInterfaces.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\dom\nsIScriptGlobalObject.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\dom\nsIScriptObjectPrincipal.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\caps\nsISecurityCheckedComponent.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpcom\nsISerializable.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsIServiceManager.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpcom\nsISimpleEnumerator.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsISimpleEnumerator.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsISupports.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpcom\nsISupports.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsISupportsBase.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpcom\nsISupportsBase.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsISupportsImpl.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpcom\nsISupportsUtils.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsISupportsUtils.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsIURI.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpcom\nsIVariant.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpconnect\nsIXPConnect.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsMemory.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\necko\nsNetCID.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsrootidl.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpcom\nsrootidl.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsServiceManagerUtils.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsStringAPI.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsTraceRefcnt.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsXPCOM.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsXPCOMCID.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\nsXPCOMStrings.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Platform.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\pratom.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\prcpucfg.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\prinrval.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\prlock.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\prlog.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\prlong.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\obsolete\protypes.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\prthread.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\prtime.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\prtypes.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\QuitMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\ReturnMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\RootedObject.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\scoped_ptr\scoped_ptr.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\ServerMethods.h"

+				>

+			</File>

+			<File

+				RelativePath="..\SessionData.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\SessionHandler.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Socket.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Value.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpconnect\xpccomponents.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpconnect\xpcexception.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpconnect\xpcjsid.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\WINNT_x86-msvc\include\xpcom-config.h"

+				>

+			</File>

+			<File

+				RelativePath="..\XpcomDebug.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpcom\xpt_arena.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpcom\xpt_struct.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\gwt-tools\sdk\gecko-sdks\gecko-1.9\include\xpcom\xptinfo.h"

+				>

+			</File>

+		</Filter>

+		<Filter

+			Name="Resource Files"

+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"

+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"

+			>

+			<File

+				RelativePath="..\xpOOPHM.rc"

+				>

+			</File>

+		</Filter>

+		<Filter

+			Name="Source Files"

+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"

+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"

+			>

+			<File

+				RelativePath="..\..\common\AllowedConnections.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Debug.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\ExternalWrapper.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\FFSessionHandler.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\FreeValueMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\HostChannel.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\InvokeMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\InvokeSpecialMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\JavaObject.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\JSRunner.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\LoadJsniMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\LoadModuleMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\ModuleOOPHM.cpp"

+				>

+				<FileConfiguration

+					Name="Debug|Win32"

+					>

+					<Tool

+						Name="VCCLCompilerTool"

+						GeneratePreprocessedFile="0"

+					/>

+				</FileConfiguration>

+			</File>

+			<File

+				RelativePath="..\..\common\ReturnMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\ServerMethods.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Socket.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\XpcomDebug.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\xpOOPHM.def"

+				>

+			</File>

+		</Filter>

+	</Files>

+	<Globals>

+	</Globals>

+</VisualStudioProject>

diff --git a/plugins/xpcom/VisualStudio/firefox-xpcom.sln b/plugins/xpcom/VisualStudio/firefox-xpcom.sln
new file mode 100755
index 0000000..a50fc62
--- /dev/null
+++ b/plugins/xpcom/VisualStudio/firefox-xpcom.sln
@@ -0,0 +1,26 @@
+

+Microsoft Visual Studio Solution File, Format Version 9.00

+# Visual C++ Express 2005

+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "firefox-xpcom", "firefox-xpcom.vcproj", "{6BF0C2CE-CB0C-421B-A67C-1E448371D24A}"

+EndProject

+Global

+	GlobalSection(SolutionConfigurationPlatforms) = preSolution

+		Debug|Win32 = Debug|Win32

+		Debug|Win64 = Debug|Win64

+		Release|Win32 = Release|Win32

+		Release|Win64 = Release|Win64

+	EndGlobalSection

+	GlobalSection(ProjectConfigurationPlatforms) = postSolution

+		{6BF0C2CE-CB0C-421B-A67C-1E448371D24A}.Debug|Win32.ActiveCfg = Debug|Win32

+		{6BF0C2CE-CB0C-421B-A67C-1E448371D24A}.Debug|Win32.Build.0 = Debug|Win32

+		{6BF0C2CE-CB0C-421B-A67C-1E448371D24A}.Debug|Win64.ActiveCfg = Debug|Win32

+		{6BF0C2CE-CB0C-421B-A67C-1E448371D24A}.Debug|Win64.Build.0 = Debug|Win32

+		{6BF0C2CE-CB0C-421B-A67C-1E448371D24A}.Release|Win32.ActiveCfg = Release|Win32

+		{6BF0C2CE-CB0C-421B-A67C-1E448371D24A}.Release|Win32.Build.0 = Release|Win32

+		{6BF0C2CE-CB0C-421B-A67C-1E448371D24A}.Release|Win64.ActiveCfg = Release|Win32

+		{6BF0C2CE-CB0C-421B-A67C-1E448371D24A}.Release|Win64.Build.0 = Release|Win32

+	EndGlobalSection

+	GlobalSection(SolutionProperties) = preSolution

+		HideSolutionNode = FALSE

+	EndGlobalSection

+EndGlobal

diff --git a/plugins/xpcom/VisualStudio/firefox-xpcom.vcproj b/plugins/xpcom/VisualStudio/firefox-xpcom.vcproj
new file mode 100755
index 0000000..94b9004
--- /dev/null
+++ b/plugins/xpcom/VisualStudio/firefox-xpcom.vcproj
@@ -0,0 +1,767 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<VisualStudioProject

+	ProjectType="Visual C++"

+	Version="8.00"

+	Name="firefox-xpcom"

+	ProjectGUID="{6BF0C2CE-CB0C-421B-A67C-1E448371D24A}"

+	RootNamespace="firefox-xpcom"

+	Keyword="Win32Proj"

+	>

+	<Platforms>

+		<Platform

+			Name="Win32"

+		/>

+	</Platforms>

+	<ToolFiles>

+	</ToolFiles>

+	<Configurations>

+		<Configuration

+			Name="Debug|Win32"

+			OutputDirectory="Debug"

+			IntermediateDirectory="Debug"

+			ConfigurationType="2"

+			UseOfMFC="1"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				Optimization="0"

+				AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\..\common&quot;;&quot;S:\xulrunner-sdk-win\sdk\include&quot;;&quot;S:\xulrunner-sdk-win\include\caps&quot;;&quot;s:\xulrunner-sdk-win\include\dom&quot;;&quot;s:\xulrunner-sdk-win\include\js&quot;;&quot;s:\xulrunner-sdk-win\include\necko&quot;;&quot;s:\xulrunner-sdk-win\include\string&quot;;&quot;s:\xulrunner-sdk-win\include\widget&quot;;&quot;s:\xulrunner-sdk-win\include\xpcom&quot;;&quot;s:\xulrunner-sdk-win\include\xpconnect&quot;;&quot;S:\xulrunner-sdk-win\include&quot;"

+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FIREFOXPLUGIN_EXPORTS;GWT_DEBUGLEVEL=Warning;XPCOM_GLUE;XPCOM_GLUE_USE_NSPR;MOZILLA_STRICT_API"

+				MinimalRebuild="true"

+				BasicRuntimeChecks="3"

+				RuntimeLibrary="1"

+				UsePrecompiledHeader="0"

+				WarningLevel="3"

+				Detect64BitPortabilityProblems="true"

+				DebugInformationFormat="3"

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+				ResourceOutputFileName="$(IntDir)/$(TargetName).res"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				AdditionalDependencies="ws2_32.lib xpcomglue_s.lib xpcom.lib nspr4.lib js3250.lib"

+				ShowProgress="2"

+				OutputFile="$(ProjectDir)\..\extension\platform\WINNT_x86-msvc\components\xpOOPHM.dll"

+				LinkIncremental="1"

+				AdditionalLibraryDirectories="..\..\..\..\xulrunner-sdk-win\lib"

+				ModuleDefinitionFile="$(ProjectDir)\..\xpOOPHM.def"

+				GenerateDebugInformation="true"

+				ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"

+				SubSystem="2"

+				ImportLibrary="$(IntDir)\$(TargetName).lib"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+		<Configuration

+			Name="Release|Win32"

+			OutputDirectory="Release"

+			IntermediateDirectory="Release"

+			ConfigurationType="2"

+			>

+			<Tool

+				Name="VCPreBuildEventTool"

+			/>

+			<Tool

+				Name="VCCustomBuildTool"

+			/>

+			<Tool

+				Name="VCXMLDataGeneratorTool"

+			/>

+			<Tool

+				Name="VCWebServiceProxyGeneratorTool"

+			/>

+			<Tool

+				Name="VCMIDLTool"

+			/>

+			<Tool

+				Name="VCCLCompilerTool"

+				Optimization="3"

+				EnableIntrinsicFunctions="true"

+				AdditionalIncludeDirectories="&quot;..\..\common&quot;"

+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FIREFOXPLUGIN_EXPORTS;GWT_DEBUGLEVEL=Warning;XPCOM_GLUE;XPCOM_GLUE_USE_NSPR;MOZILLA_STRICT_API"

+				ExceptionHandling="1"

+				RuntimeLibrary="2"

+				UsePrecompiledHeader="0"

+				WarningLevel="3"

+				Detect64BitPortabilityProblems="false"

+				DebugInformationFormat="3"

+			/>

+			<Tool

+				Name="VCManagedResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCResourceCompilerTool"

+			/>

+			<Tool

+				Name="VCPreLinkEventTool"

+			/>

+			<Tool

+				Name="VCLinkerTool"

+				AdditionalDependencies="ws2_32.lib xpcomglue_s.lib xpcom.lib nspr4.lib js3250.lib"

+				ShowProgress="2"

+				OutputFile="..\extension\platform\WINNT_x86-msvc\components\xpOOPHM.dll"

+				LinkIncremental="0"

+				AdditionalLibraryDirectories="..\..\..\..\xulrunner-sdk-win\lib"

+				ModuleDefinitionFile="..\xpOOPHM.def"

+				GenerateDebugInformation="true"

+				ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"

+				SubSystem="2"

+				OptimizeReferences="2"

+				EnableCOMDATFolding="2"

+				ImportLibrary="$(IntDir)\$(TargetName).lib"

+				TargetMachine="1"

+			/>

+			<Tool

+				Name="VCALinkTool"

+			/>

+			<Tool

+				Name="VCManifestTool"

+			/>

+			<Tool

+				Name="VCXDCMakeTool"

+			/>

+			<Tool

+				Name="VCBscMakeTool"

+			/>

+			<Tool

+				Name="VCFxCopTool"

+			/>

+			<Tool

+				Name="VCAppVerifierTool"

+			/>

+			<Tool

+				Name="VCWebDeploymentTool"

+			/>

+			<Tool

+				Name="VCPostBuildEventTool"

+			/>

+		</Configuration>

+	</Configurations>

+	<References>

+	</References>

+	<Files>

+		<Filter

+			Name="Header Files"

+			Filter="h;hpp;hxx;hm;inl;inc;xsd"

+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"

+			>

+			<File

+				RelativePath="..\..\common\AllowedConnections.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\BrowserChannel.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\ByteOrder.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Debug.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\DebugLevel.h"

+				>

+			</File>

+			<File

+				RelativePath="..\ExternalWrapper.h"

+				>

+			</File>

+			<File

+				RelativePath="..\FFSessionHandler.h"

+				>

+			</File>

+			<File

+				RelativePath="..\XpcomDebug.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\FreeValueMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\HashMap.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\HostChannel.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\InvokeMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\InvokeSpecialMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\JavaObject.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsapi.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsautocfg.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jscompat.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsconfig.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jslong.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsotypes.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsproto.tbl"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jspubtd.h"

+				>

+			</File>

+			<File

+				RelativePath="..\JSRunner.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jstypes.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsutil.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsutil.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsutil.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\js\jsutil.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\LoadJsniMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\LoadModuleMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Message.h"

+				>

+			</File>

+			<File

+				RelativePath="..\ModuleOOPHM.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\mozilla-config.h"

+				>

+			</File>

+			<File

+				RelativePath="..\mozincludes.h"

+				>

+			</File>

+			<File

+				RelativePath="..\npapi\npapi.h"

+				>

+			</File>

+			<File

+				RelativePath="..\npapi\nphostapi.h"

+				>

+			</File>

+			<File

+				RelativePath="..\npapi\npruntime.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpconnect\nsAXPCNativeCallContext.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsCOMPtr.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nscore.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nscore.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsCycleCollector.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsDebug.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsError.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\widget\nsEvent.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsICategoryManager.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIClassInfo.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIClassInfoImpl.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIComponentManager.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsID.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsIEnumerator.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsIException.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsIExceptionService.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIFactory.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIGenericFactory.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\necko\nsIHttpProtocolHandler.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsIInterfaceInfo.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsIInterfaceInfoManager.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpconnect\nsIJSContextStack.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIMemory.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIModule.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\caps\nsIPrincipal.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIProgrammingLanguage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\necko\nsIProtocolHandler.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\necko\nsIProxiedProtocolHandler.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpconnect\nsIScriptableInterfaces.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\dom\nsIScriptGlobalObject.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\dom\nsIScriptObjectPrincipal.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\caps\nsISecurityCheckedComponent.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsISerializable.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIServiceManager.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsISimpleEnumerator.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsISimpleEnumerator.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsISupports.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsISupports.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsISupportsBase.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsISupportsBase.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsISupportsImpl.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsISupportsUtils.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsISupportsUtils.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsIURI.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsIVariant.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpconnect\nsIXPConnect.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsMemory.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\necko\nsNetCID.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsrootidl.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\nsrootidl.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsServiceManagerUtils.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsStringAPI.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsTraceRefcnt.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsXPCOM.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsXPCOMCID.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\nsXPCOMStrings.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Platform.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\pratom.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\prcpucfg.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\prinrval.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\prlock.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\prlog.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\prlong.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\obsolete\protypes.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\prthread.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\prtime.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\prtypes.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\QuitMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\ReturnMessage.h"

+				>

+			</File>

+			<File

+				RelativePath="..\RootedObject.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\scoped_ptr\scoped_ptr.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\ServerMethods.h"

+				>

+			</File>

+			<File

+				RelativePath="..\SessionData.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\SessionHandler.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Socket.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Value.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpconnect\xpccomponents.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpconnect\xpcexception.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpconnect\xpcjsid.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\sdk\include\xpcom-config.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\xpt_arena.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\xpt_struct.h"

+				>

+			</File>

+			<File

+				RelativePath="..\..\..\..\xulrunner-sdk-win\include\xpcom\xptinfo.h"

+				>

+			</File>

+		</Filter>

+		<Filter

+			Name="Resource Files"

+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"

+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"

+			>

+			<File

+				RelativePath="..\xpOOPHM.rc"

+				>

+			</File>

+		</Filter>

+		<Filter

+			Name="Source Files"

+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"

+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"

+			>

+			<File

+				RelativePath="..\..\common\AllowedConnections.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Debug.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\ExternalWrapper.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\FFSessionHandler.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\XpcomDebug.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\FreeValueMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\HostChannel.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\InvokeMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\InvokeSpecialMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\JavaObject.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\JSRunner.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\LoadJsniMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\LoadModuleMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\ModuleOOPHM.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\ReturnMessage.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\ServerMethods.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\..\common\Socket.cpp"

+				>

+			</File>

+			<File

+				RelativePath="..\xpOOPHM.def"

+				>

+			</File>

+		</Filter>

+	</Files>

+	<Globals>

+	</Globals>

+</VisualStudioProject>

diff --git a/plugins/xpcom/XpcomDebug.cpp b/plugins/xpcom/XpcomDebug.cpp
new file mode 100644
index 0000000..34ef738
--- /dev/null
+++ b/plugins/xpcom/XpcomDebug.cpp
@@ -0,0 +1,86 @@
+/*
+ * 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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+#include <cstring>
+
+#include "XpcomDebug.h"
+#include "JavaObject.h"
+
+#ifdef _WINDOWS
+// avoid deprecation warnings for strncpy
+#define strncpy(d,s,c) strncpy_s((d),(c),(s),(c))
+
+#include <cstdarg>
+inline int snprintf(char* buf, size_t buflen, const char* fmt, ...) {
+  va_list args;
+  va_start(args, fmt);
+  int n = _vsnprintf_s(buf, buflen, buflen, fmt, args);
+  va_end(args);
+  return n;
+}
+
+#endif
+
+std::string dumpJsVal(JSContext* ctx, jsval v) {
+  char buf[70];
+  if (v == JSVAL_VOID) {
+    strncpy(buf, "undef", sizeof(buf));
+  } else if (v == JSVAL_NULL) {
+    strncpy(buf, "null", sizeof(buf));
+  } else {
+    switch (JSVAL_TAG(v)) {
+      case JSVAL_OBJECT:
+      {
+        JSObject* obj = JSVAL_TO_OBJECT(v);
+        if (JavaObject::isJavaObject(ctx, obj)) {
+          int oid = JavaObject::getObjectId(ctx, obj);
+          snprintf(buf, sizeof(buf), "JavaObj(%d)", oid);
+        } else {
+          JSClass* jsClass = JS_GET_CLASS(ctx, obj);
+          const char* name = jsClass->name ? jsClass->name : "<null>";
+          snprintf(buf, sizeof(buf), "Object(%.20s @ %p)", name, obj);
+        }
+        break;
+      }
+      case JSVAL_INT:
+        snprintf(buf, sizeof(buf), "int(%d)", JSVAL_TO_INT(v));
+        break;
+      case JSVAL_DOUBLE:
+        snprintf(buf, sizeof(buf), "double(%lf)", *JSVAL_TO_DOUBLE(v));
+        break;
+      case JSVAL_STRING:
+      {
+        JSString* str = JSVAL_TO_STRING(v);
+        size_t len = JS_GetStringLength(str);
+        const char* continued = "";
+        if (len > 20) {
+          len = 20;
+          continued = "...";
+        }
+        // TODO: trashes Unicode
+        snprintf(buf, sizeof(buf), "string(%.*s%s)", static_cast<int>(len),
+            JS_GetStringBytes(str), continued);
+        break;
+      }
+      case JSVAL_BOOLEAN:
+        snprintf(buf, sizeof(buf), "bool(%s)", JSVAL_TO_BOOLEAN(v) ? "true"
+            : " false");
+        break;
+    }
+  }
+  buf[sizeof(buf) - 1] = 0;
+  return std::string(buf);
+}
diff --git a/plugins/xpcom/XpcomDebug.h b/plugins/xpcom/XpcomDebug.h
new file mode 100644
index 0000000..4296ad2
--- /dev/null
+++ b/plugins/xpcom/XpcomDebug.h
@@ -0,0 +1,26 @@
+#ifndef _H_XpcomDebug
+#define _H_XpcomDebug
+/*
+ * 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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+#include <string>
+
+#include "mozincludes.h"
+#include "jsapi.h"
+
+std::string dumpJsVal(JSContext* ctx, jsval v);
+
+#endif
diff --git a/plugins/xpcom/getversion b/plugins/xpcom/getversion
new file mode 100755
index 0000000..7557e49
--- /dev/null
+++ b/plugins/xpcom/getversion
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Wrapper to prevent failure if svnversion isn't available
+
+V=`svnversion ${PWD}/.. 2>/dev/null`
+if [ $? -gt 0 -o -z "$V" ]
+then
+  V='?'
+fi
+echo $V
+exit 0
diff --git a/plugins/xpcom/install-template-ff2.rdf b/plugins/xpcom/install-template-ff2.rdf
new file mode 100644
index 0000000..3516812
--- /dev/null
+++ b/plugins/xpcom/install-template-ff2.rdf
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+
+  <Description about="urn:mozilla:install-manifest">
+    <em:id>oophm-xpcom-ff2@gwt.google.com</em:id>
+    <em:name>GWT Hosted Mode Plugin (XPCOM) for FF v1.5-2.x</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>1.5</em:minVersion>
+        <em:maxVersion>2.*</em:maxVersion>
+      </Description>
+    </em:targetApplication>
+
+    <!-- Front End MetaData -->
+    <em:description>A plugin to support hosted-mode development of GWT applications</em:description>
+    <em:creator>Google, Inc.</em:creator>
+    <em:homepageURL>http://code.google.com/webtoolkit/</em:homepageURL>
+    <em:iconURL>chrome://gwt-oophm/skin/icon.png</em:iconURL>
+
+    <em:targetPlatform>Linux_x86-gcc3</em:targetPlatform>
+    <em:targetPlatform>Linux_x86_64-gcc3</em:targetPlatform>
+    <em:targetPlatform>Darwin_x86-gcc3</em:targetPlatform>
+
+    <!-- TODO
+    # prefs dialog
+
+    # replace default about dialog
+    <em:aboutURL>chrome://gwt-oophm/content/about.xul</em:aboutURL>
+
+    # updates, see http://developer.mozilla.org/en/docs/Extension_Versioning%2C_Update_and_Compatibility#Update_RDF_Format
+    <em:updateURL>https://xxx.google.com/.../update.rdf</em:updateURL>
+    <em:updateURL>http://google-web-toolkit.googlecode.com/svn/trunk/plugins/xpcom/prebuilt/update.rdf</em:updateURL>
+
+    # platforms - any others?
+    <em:targetPlatform>WINNT_x86-msvc</em:targetPlatform>
+    <em:targetPlatform>Darwin_ppc-gcc3</em:targetPlatform>
+    <em:targetPlatform>SunOS_sparc-sunc</em:targetPlatform>
+    <em:targetPlatform>SunOS_x86-sunc</em:targetPlatform>
+    -->
+
+  </Description>
+</RDF>
diff --git a/plugins/xpcom/install-template-ff3+.rdf b/plugins/xpcom/install-template-ff3+.rdf
new file mode 100644
index 0000000..e4b39ac
--- /dev/null
+++ b/plugins/xpcom/install-template-ff3+.rdf
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+     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 Hosted Mode Plugin (XPCOM) for FF v3.x</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>
+      </Description>
+    </em:targetApplication>
+
+    <!-- Front End MetaData -->
+    <em:description>A plugin to support hosted-mode development of GWT applications</em:description>
+    <em:creator>Google, Inc.</em:creator>
+    <em:homepageURL>http://code.google.com/webtoolkit/</em:homepageURL>
+    <em:iconURL>chrome://gwt-oophm/skin/icon.png</em:iconURL>
+
+    <em:targetPlatform>Linux_x86-gcc3</em:targetPlatform>
+    <em:targetPlatform>Linux_x86_64-gcc3</em:targetPlatform>
+    <em:targetPlatform>WINNT_x86-msvc</em:targetPlatform>
+    <em:targetPlatform>Darwin_x86-gcc3</em:targetPlatform>
+
+    <!-- TODO
+    # prefs dialog
+
+    # replace default about dialog
+    <em:aboutURL>chrome://gwt-oophm/content/about.xul</em:aboutURL>
+
+    # updates, see http://developer.mozilla.org/en/docs/Extension_Versioning%2C_Update_and_Compatibility#Update_RDF_Format
+    <em:updateURL>https://xxx.google.com/.../update.rdf</em:updateURL>
+    <em:updateURL>http://google-web-toolkit.googlecode.com/svn/trunk/plugins/xpcom/prebuilt/update.rdf</em:updateURL>
+
+    # platforms - any others?
+    <em:targetPlatform>Darwin_ppc-gcc3</em:targetPlatform>
+    <em:targetPlatform>SunOS_sparc-sunc</em:targetPlatform>
+    <em:targetPlatform>SunOS_x86-sunc</em:targetPlatform>
+    -->
+
+  </Description>
+</RDF>
diff --git a/plugins/xpcom/install-template-ff3.rdf b/plugins/xpcom/install-template-ff3.rdf
new file mode 100644
index 0000000..e4b39ac
--- /dev/null
+++ b/plugins/xpcom/install-template-ff3.rdf
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+     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 Hosted Mode Plugin (XPCOM) for FF v3.x</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>
+      </Description>
+    </em:targetApplication>
+
+    <!-- Front End MetaData -->
+    <em:description>A plugin to support hosted-mode development of GWT applications</em:description>
+    <em:creator>Google, Inc.</em:creator>
+    <em:homepageURL>http://code.google.com/webtoolkit/</em:homepageURL>
+    <em:iconURL>chrome://gwt-oophm/skin/icon.png</em:iconURL>
+
+    <em:targetPlatform>Linux_x86-gcc3</em:targetPlatform>
+    <em:targetPlatform>Linux_x86_64-gcc3</em:targetPlatform>
+    <em:targetPlatform>WINNT_x86-msvc</em:targetPlatform>
+    <em:targetPlatform>Darwin_x86-gcc3</em:targetPlatform>
+
+    <!-- TODO
+    # prefs dialog
+
+    # replace default about dialog
+    <em:aboutURL>chrome://gwt-oophm/content/about.xul</em:aboutURL>
+
+    # updates, see http://developer.mozilla.org/en/docs/Extension_Versioning%2C_Update_and_Compatibility#Update_RDF_Format
+    <em:updateURL>https://xxx.google.com/.../update.rdf</em:updateURL>
+    <em:updateURL>http://google-web-toolkit.googlecode.com/svn/trunk/plugins/xpcom/prebuilt/update.rdf</em:updateURL>
+
+    # platforms - any others?
+    <em:targetPlatform>Darwin_ppc-gcc3</em:targetPlatform>
+    <em:targetPlatform>SunOS_sparc-sunc</em:targetPlatform>
+    <em:targetPlatform>SunOS_x86-sunc</em:targetPlatform>
+    -->
+
+  </Description>
+</RDF>
diff --git a/plugins/xpcom/install-template-ff35.rdf b/plugins/xpcom/install-template-ff35.rdf
new file mode 100644
index 0000000..95ab6e8
--- /dev/null
+++ b/plugins/xpcom/install-template-ff35.rdf
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+
+  <Description about="urn:mozilla:install-manifest">
+    <em:id>oophm-xpcom-ff35@gwt.google.com</em:id>
+    <em:name>GWT Hosted Mode Plugin (XPCOM) for FF v3.5+</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.4</em:minVersion>
+        <em:maxVersion>3.*</em:maxVersion>
+      </Description>
+    </em:targetApplication>
+
+    <!-- Front End MetaData -->
+    <em:description>A plugin to support hosted-mode development of GWT applications</em:description>
+    <em:creator>Google, Inc.</em:creator>
+    <em:homepageURL>http://code.google.com/webtoolkit/</em:homepageURL>
+    <em:iconURL>chrome://gwt-oophm/skin/icon.png</em:iconURL>
+
+    <em:targetPlatform>Linux_x86-gcc3</em:targetPlatform>
+    <em:targetPlatform>Linux_x86_64-gcc3</em:targetPlatform>
+    <em:targetPlatform>WINNT_x86-msvc</em:targetPlatform>
+    <em:targetPlatform>Darwin_x86-gcc3</em:targetPlatform>
+
+    <!-- TODO
+    # prefs dialog
+
+    # replace default about dialog
+    <em:aboutURL>chrome://gwt-oophm/content/about.xul</em:aboutURL>
+
+    # updates, see http://developer.mozilla.org/en/docs/Extension_Versioning%2C_Update_and_Compatibility#Update_RDF_Format
+    <em:updateURL>https://xxx.google.com/.../update.rdf</em:updateURL>
+    <em:updateURL>http://google-web-toolkit.googlecode.com/svn/trunk/plugins/xpcom/prebuilt/update.rdf</em:updateURL>
+
+    # platforms - any others?
+    <em:targetPlatform>Darwin_ppc-gcc3</em:targetPlatform>
+    <em:targetPlatform>SunOS_sparc-sunc</em:targetPlatform>
+    <em:targetPlatform>SunOS_x86-sunc</em:targetPlatform>
+    -->
+
+  </Description>
+</RDF>
diff --git a/plugins/xpcom/mozincludes.h b/plugins/xpcom/mozincludes.h
new file mode 100755
index 0000000..14f50e4
--- /dev/null
+++ b/plugins/xpcom/mozincludes.h
@@ -0,0 +1,14 @@
+#ifndef _H_mozincludes
+#define _H_mozincludes
+
+// Defines private prototypes for copy constructor and assigment operator. Do
+// not implement these methods.
+#define DISALLOW_EVIL_CONSTRUCTORS(CLASS) \
+ private:                                 \
+  CLASS(const CLASS&);                    \
+  CLASS& operator=(const CLASS&)
+
+#include "xpcom-config.h"
+#include "mozilla-config.h"
+
+#endif
diff --git a/plugins/xpcom/prebuilt/LICENSE.txt b/plugins/xpcom/prebuilt/LICENSE.txt
new file mode 100644
index 0000000..326366d
--- /dev/null
+++ b/plugins/xpcom/prebuilt/LICENSE.txt
@@ -0,0 +1,13 @@
+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
+License for the specific language governing permissions and limitations under
+the License.
diff --git a/plugins/xpcom/prebuilt/README.txt b/plugins/xpcom/prebuilt/README.txt
new file mode 100644
index 0000000..6f54ad5
--- /dev/null
+++ b/plugins/xpcom/prebuilt/README.txt
@@ -0,0 +1,6 @@
+Files common to all platforms should be placed under extension/...
+Files for FF1.5/2 should go under extension-ff2/...
+Files for FF3 should go under extension-ff3/...
+
+Files such as headers that need to be supplied pre-generated should be under
+ff2/ff3.
diff --git a/plugins/xpcom/prebuilt/extension-ff2/chrome.manifest b/plugins/xpcom/prebuilt/extension-ff2/chrome.manifest
new file mode 100644
index 0000000..38a0fdd
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff2/chrome.manifest
@@ -0,0 +1,2 @@
+content gwt-oophm content/
+skin gwt-oophm classic/1.0 skin/
diff --git a/plugins/xpcom/prebuilt/extension-ff2/components/IOOPHM.xpt b/plugins/xpcom/prebuilt/extension-ff2/components/IOOPHM.xpt
new file mode 100644
index 0000000..4be87b7
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff2/components/IOOPHM.xpt
Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension-ff2/install.rdf b/plugins/xpcom/prebuilt/extension-ff2/install.rdf
new file mode 100644
index 0000000..7feda0c
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff2/install.rdf
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+
+  <Description about="urn:mozilla:install-manifest">
+    <em:id>oophm-xpcom-ff2@gwt.google.com</em:id>
+    <em:name>GWT Hosted Mode Plugin (XPCOM) for FF v1.5-2.x</em:name>
+    <em:version>0.0.-1M.20090803104826</em:version>
+    <em:type>2</em:type>
+    <em:targetApplication>
+      <Description>
+        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+        <em:minVersion>1.5</em:minVersion>
+        <em:maxVersion>2.*</em:maxVersion>
+      </Description>
+    </em:targetApplication>
+
+    <!-- Front End MetaData -->
+    <em:description>A plugin to support hosted-mode development of GWT applications</em:description>
+    <em:creator>Google, Inc.</em:creator>
+    <em:homepageURL>http://code.google.com/webtoolkit/</em:homepageURL>
+    <em:iconURL>chrome://gwt-oophm/skin/icon.png</em:iconURL>
+
+    <em:targetPlatform>Linux_x86-gcc3</em:targetPlatform>
+    <em:targetPlatform>Linux_x86_64-gcc3</em:targetPlatform>
+    <em:targetPlatform>Darwin_x86-gcc3</em:targetPlatform>
+
+    <!-- TODO
+    # prefs dialog
+
+    # replace default about dialog
+    <em:aboutURL>chrome://gwt-oophm/content/about.xul</em:aboutURL>
+
+    # updates, see http://developer.mozilla.org/en/docs/Extension_Versioning%2C_Update_and_Compatibility#Update_RDF_Format
+    <em:updateURL>https://xxx.google.com/.../update.rdf</em:updateURL>
+    <em:updateURL>http://google-web-toolkit.googlecode.com/svn/trunk/plugins/xpcom/prebuilt/update.rdf</em:updateURL>
+
+    # platforms - any others?
+    <em:targetPlatform>WINNT_x86-msvc</em:targetPlatform>
+    <em:targetPlatform>Darwin_ppc-gcc3</em:targetPlatform>
+    <em:targetPlatform>SunOS_sparc-sunc</em:targetPlatform>
+    <em:targetPlatform>SunOS_x86-sunc</em:targetPlatform>
+    -->
+
+  </Description>
+</RDF>
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
new file mode 100755
index 0000000..65b6dd9
--- /dev/null
+++ 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
new file mode 100755
index 0000000..f9dd5d3
--- /dev/null
+++ 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-ff2/skin/icon.png b/plugins/xpcom/prebuilt/extension-ff2/skin/icon.png
new file mode 100644
index 0000000..7ba8270
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff2/skin/icon.png
Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension-ff3+/chrome.manifest b/plugins/xpcom/prebuilt/extension-ff3+/chrome.manifest
new file mode 100644
index 0000000..38a0fdd
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff3+/chrome.manifest
@@ -0,0 +1,2 @@
+content gwt-oophm content/
+skin gwt-oophm classic/1.0 skin/
diff --git a/plugins/xpcom/prebuilt/extension-ff3+/components/IOOPHM.xpt b/plugins/xpcom/prebuilt/extension-ff3+/components/IOOPHM.xpt
new file mode 100644
index 0000000..4be87b7
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff3+/components/IOOPHM.xpt
Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension-ff3+/install.rdf b/plugins/xpcom/prebuilt/extension-ff3+/install.rdf
new file mode 100644
index 0000000..31f4673
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff3+/install.rdf
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+     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 Hosted Mode Plugin (XPCOM) for FF v3.x</em:name>
+    <em:version>0.0.-1M.20090803104811</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>
+      </Description>
+    </em:targetApplication>
+
+    <!-- Front End MetaData -->
+    <em:description>A plugin to support hosted-mode development of GWT applications</em:description>
+    <em:creator>Google, Inc.</em:creator>
+    <em:homepageURL>http://code.google.com/webtoolkit/</em:homepageURL>
+    <em:iconURL>chrome://gwt-oophm/skin/icon.png</em:iconURL>
+
+    <em:targetPlatform>Linux_x86-gcc3</em:targetPlatform>
+    <em:targetPlatform>Linux_x86_64-gcc3</em:targetPlatform>
+    <em:targetPlatform>WINNT_x86-msvc</em:targetPlatform>
+    <em:targetPlatform>Darwin_x86-gcc3</em:targetPlatform>
+
+    <!-- TODO
+    # prefs dialog
+
+    # replace default about dialog
+    <em:aboutURL>chrome://gwt-oophm/content/about.xul</em:aboutURL>
+
+    # updates, see http://developer.mozilla.org/en/docs/Extension_Versioning%2C_Update_and_Compatibility#Update_RDF_Format
+    <em:updateURL>https://xxx.google.com/.../update.rdf</em:updateURL>
+    <em:updateURL>http://google-web-toolkit.googlecode.com/svn/trunk/plugins/xpcom/prebuilt/update.rdf</em:updateURL>
+
+    # platforms - any others?
+    <em:targetPlatform>Darwin_ppc-gcc3</em:targetPlatform>
+    <em:targetPlatform>SunOS_sparc-sunc</em:targetPlatform>
+    <em:targetPlatform>SunOS_x86-sunc</em:targetPlatform>
+    -->
+
+  </Description>
+</RDF>
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
new file mode 100755
index 0000000..2361279
--- /dev/null
+++ 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+/skin/icon.png b/plugins/xpcom/prebuilt/extension-ff3+/skin/icon.png
new file mode 100644
index 0000000..7ba8270
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff3+/skin/icon.png
Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension-ff3/chrome.manifest b/plugins/xpcom/prebuilt/extension-ff3/chrome.manifest
new file mode 100644
index 0000000..38a0fdd
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff3/chrome.manifest
@@ -0,0 +1,2 @@
+content gwt-oophm content/
+skin gwt-oophm classic/1.0 skin/
diff --git a/plugins/xpcom/prebuilt/extension-ff3/components/IOOPHM.xpt b/plugins/xpcom/prebuilt/extension-ff3/components/IOOPHM.xpt
new file mode 100644
index 0000000..4be87b7
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff3/components/IOOPHM.xpt
Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension-ff3/install.rdf b/plugins/xpcom/prebuilt/extension-ff3/install.rdf
new file mode 100644
index 0000000..a782f87
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff3/install.rdf
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+     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 Hosted Mode Plugin (XPCOM) for FF v3.x</em:name>
+    <em:version>0.0.-1M.20090803104821</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>
+      </Description>
+    </em:targetApplication>
+
+    <!-- Front End MetaData -->
+    <em:description>A plugin to support hosted-mode development of GWT applications</em:description>
+    <em:creator>Google, Inc.</em:creator>
+    <em:homepageURL>http://code.google.com/webtoolkit/</em:homepageURL>
+    <em:iconURL>chrome://gwt-oophm/skin/icon.png</em:iconURL>
+
+    <em:targetPlatform>Linux_x86-gcc3</em:targetPlatform>
+    <em:targetPlatform>Linux_x86_64-gcc3</em:targetPlatform>
+    <em:targetPlatform>WINNT_x86-msvc</em:targetPlatform>
+    <em:targetPlatform>Darwin_x86-gcc3</em:targetPlatform>
+
+    <!-- TODO
+    # prefs dialog
+
+    # replace default about dialog
+    <em:aboutURL>chrome://gwt-oophm/content/about.xul</em:aboutURL>
+
+    # updates, see http://developer.mozilla.org/en/docs/Extension_Versioning%2C_Update_and_Compatibility#Update_RDF_Format
+    <em:updateURL>https://xxx.google.com/.../update.rdf</em:updateURL>
+    <em:updateURL>http://google-web-toolkit.googlecode.com/svn/trunk/plugins/xpcom/prebuilt/update.rdf</em:updateURL>
+
+    # platforms - any others?
+    <em:targetPlatform>Darwin_ppc-gcc3</em:targetPlatform>
+    <em:targetPlatform>SunOS_sparc-sunc</em:targetPlatform>
+    <em:targetPlatform>SunOS_x86-sunc</em:targetPlatform>
+    -->
+
+  </Description>
+</RDF>
diff --git a/plugins/xpcom/prebuilt/extension-ff3/platform/Darwin_x86-gcc3/components/liboophm.dylib b/plugins/xpcom/prebuilt/extension-ff3/platform/Darwin_x86-gcc3/components/liboophm.dylib
new file mode 100755
index 0000000..eb3864d
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff3/platform/Darwin_x86-gcc3/components/liboophm.dylib
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
new file mode 100755
index 0000000..a8705e0
--- /dev/null
+++ 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
new file mode 100755
index 0000000..cb26cbe
--- /dev/null
+++ 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/platform/WINNT_x86-msvc/components/xpOOPHM.dll b/plugins/xpcom/prebuilt/extension-ff3/platform/WINNT_x86-msvc/components/xpOOPHM.dll
new file mode 100755
index 0000000..6c8ec68
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff3/platform/WINNT_x86-msvc/components/xpOOPHM.dll
Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension-ff3/skin/icon.png b/plugins/xpcom/prebuilt/extension-ff3/skin/icon.png
new file mode 100644
index 0000000..7ba8270
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff3/skin/icon.png
Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension-ff35/chrome.manifest b/plugins/xpcom/prebuilt/extension-ff35/chrome.manifest
new file mode 100644
index 0000000..38a0fdd
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff35/chrome.manifest
@@ -0,0 +1,2 @@
+content gwt-oophm content/
+skin gwt-oophm classic/1.0 skin/
diff --git a/plugins/xpcom/prebuilt/extension-ff35/components/IOOPHM.xpt b/plugins/xpcom/prebuilt/extension-ff35/components/IOOPHM.xpt
new file mode 100644
index 0000000..4be87b7
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff35/components/IOOPHM.xpt
Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension-ff35/install.rdf b/plugins/xpcom/prebuilt/extension-ff35/install.rdf
new file mode 100644
index 0000000..6148662
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff35/install.rdf
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+
+  <Description about="urn:mozilla:install-manifest">
+    <em:id>oophm-xpcom-ff35@gwt.google.com</em:id>
+    <em:name>GWT Hosted Mode Plugin (XPCOM) for FF v3.5+</em:name>
+    <em:version>0.0.-1M.20090803104256</em:version>
+    <em:type>2</em:type>
+    <em:targetApplication>
+      <Description>
+        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+        <em:minVersion>3.4</em:minVersion>
+        <em:maxVersion>3.*</em:maxVersion>
+      </Description>
+    </em:targetApplication>
+
+    <!-- Front End MetaData -->
+    <em:description>A plugin to support hosted-mode development of GWT applications</em:description>
+    <em:creator>Google, Inc.</em:creator>
+    <em:homepageURL>http://code.google.com/webtoolkit/</em:homepageURL>
+    <em:iconURL>chrome://gwt-oophm/skin/icon.png</em:iconURL>
+
+    <em:targetPlatform>Linux_x86-gcc3</em:targetPlatform>
+    <em:targetPlatform>Linux_x86_64-gcc3</em:targetPlatform>
+    <em:targetPlatform>WINNT_x86-msvc</em:targetPlatform>
+    <em:targetPlatform>Darwin_x86-gcc3</em:targetPlatform>
+
+    <!-- TODO
+    # prefs dialog
+
+    # replace default about dialog
+    <em:aboutURL>chrome://gwt-oophm/content/about.xul</em:aboutURL>
+
+    # updates, see http://developer.mozilla.org/en/docs/Extension_Versioning%2C_Update_and_Compatibility#Update_RDF_Format
+    <em:updateURL>https://xxx.google.com/.../update.rdf</em:updateURL>
+    <em:updateURL>http://google-web-toolkit.googlecode.com/svn/trunk/plugins/xpcom/prebuilt/update.rdf</em:updateURL>
+
+    # platforms - any others?
+    <em:targetPlatform>Darwin_ppc-gcc3</em:targetPlatform>
+    <em:targetPlatform>SunOS_sparc-sunc</em:targetPlatform>
+    <em:targetPlatform>SunOS_x86-sunc</em:targetPlatform>
+    -->
+
+  </Description>
+</RDF>
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
new file mode 100755
index 0000000..1027a07
--- /dev/null
+++ 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-ff35/skin/icon.png b/plugins/xpcom/prebuilt/extension-ff35/skin/icon.png
new file mode 100644
index 0000000..7ba8270
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension-ff35/skin/icon.png
Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension/chrome.manifest b/plugins/xpcom/prebuilt/extension/chrome.manifest
new file mode 100644
index 0000000..38a0fdd
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension/chrome.manifest
@@ -0,0 +1,2 @@
+content gwt-oophm content/
+skin gwt-oophm classic/1.0 skin/
diff --git a/plugins/xpcom/prebuilt/extension/components/IOOPHM.xpt b/plugins/xpcom/prebuilt/extension/components/IOOPHM.xpt
new file mode 100644
index 0000000..4be87b7
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension/components/IOOPHM.xpt
Binary files differ
diff --git a/plugins/xpcom/prebuilt/extension/skin/icon.png b/plugins/xpcom/prebuilt/extension/skin/icon.png
new file mode 100644
index 0000000..7ba8270
--- /dev/null
+++ b/plugins/xpcom/prebuilt/extension/skin/icon.png
Binary files differ
diff --git a/plugins/xpcom/prebuilt/ff2/include/IOOPHM.h b/plugins/xpcom/prebuilt/ff2/include/IOOPHM.h
new file mode 100644
index 0000000..9ab769d
--- /dev/null
+++ b/plugins/xpcom/prebuilt/ff2/include/IOOPHM.h
@@ -0,0 +1,91 @@
+/*
+ * DO NOT EDIT.  THIS FILE IS GENERATED FROM IOOPHM.idl
+ */
+
+#ifndef __gen_IOOPHM_h__
+#define __gen_IOOPHM_h__
+
+
+#ifndef __gen_nsISupports_h__
+#include "nsISupports.h"
+#endif
+
+/* For IDL files that don't want to include root IDL files. */
+#ifndef NS_NO_VTABLE
+#define NS_NO_VTABLE
+#endif
+class nsIDOMWindow; /* forward declaration */
+
+
+/* starting interface:    IOOPHM */
+#define IOOPHM_IID_STR "90cef17b-c3fe-4251-af68-4381b3d938a0"
+
+#define IOOPHM_IID \
+  {0x90cef17b, 0xc3fe, 0x4251, \
+    { 0xaf, 0x68, 0x43, 0x81, 0xb3, 0xd9, 0x38, 0xa0 }}
+
+class NS_NO_VTABLE IOOPHM : public nsISupports {
+ public: 
+
+  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;
+
+};
+
+/* 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); 
+
+/* 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); } 
+
+/* 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); } 
+
+#if 0
+/* Use the code below as a template for the implementation class for this interface. */
+
+/* Header file */
+class _MYCLASS_ : public IOOPHM
+{
+public:
+  NS_DECL_ISUPPORTS
+  NS_DECL_IOOPHM
+
+  _MYCLASS_();
+
+private:
+  ~_MYCLASS_();
+
+protected:
+  /* additional members */
+};
+
+/* Implementation file */
+NS_IMPL_ISUPPORTS1(_MYCLASS_, IOOPHM)
+
+_MYCLASS_::_MYCLASS_()
+{
+  /* member initializers and constructor code */
+}
+
+_MYCLASS_::~_MYCLASS_()
+{
+  /* 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)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* End of implementation class template. */
+#endif
+
+
+#endif /* __gen_IOOPHM_h__ */
diff --git a/plugins/xpcom/prebuilt/ff3+/include/IOOPHM.h b/plugins/xpcom/prebuilt/ff3+/include/IOOPHM.h
new file mode 100644
index 0000000..ba6f481
--- /dev/null
+++ b/plugins/xpcom/prebuilt/ff3+/include/IOOPHM.h
@@ -0,0 +1,93 @@
+/*
+ * DO NOT EDIT.  THIS FILE IS GENERATED FROM IOOPHM.idl
+ */
+
+#ifndef __gen_IOOPHM_h__
+#define __gen_IOOPHM_h__
+
+
+#ifndef __gen_nsISupports_h__
+#include "nsISupports.h"
+#endif
+
+/* For IDL files that don't want to include root IDL files. */
+#ifndef NS_NO_VTABLE
+#define NS_NO_VTABLE
+#endif
+class nsIDOMWindow; /* forward declaration */
+
+
+/* starting interface:    IOOPHM */
+#define IOOPHM_IID_STR "90cef17b-c3fe-4251-af68-4381b3d938a0"
+
+#define IOOPHM_IID \
+  {0x90cef17b, 0xc3fe, 0x4251, \
+    { 0xaf, 0x68, 0x43, 0x81, 0xb3, 0xd9, 0x38, 0xa0 }}
+
+class NS_NO_VTABLE NS_SCRIPTABLE IOOPHM : public nsISupports {
+ public: 
+
+  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;
+
+};
+
+  NS_DEFINE_STATIC_IID_ACCESSOR(IOOPHM, IOOPHM_IID)
+
+/* 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); 
+
+/* 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); } 
+
+/* 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); } 
+
+#if 0
+/* Use the code below as a template for the implementation class for this interface. */
+
+/* Header file */
+class _MYCLASS_ : public IOOPHM
+{
+public:
+  NS_DECL_ISUPPORTS
+  NS_DECL_IOOPHM
+
+  _MYCLASS_();
+
+private:
+  ~_MYCLASS_();
+
+protected:
+  /* additional members */
+};
+
+/* Implementation file */
+NS_IMPL_ISUPPORTS1(_MYCLASS_, IOOPHM)
+
+_MYCLASS_::_MYCLASS_()
+{
+  /* member initializers and constructor code */
+}
+
+_MYCLASS_::~_MYCLASS_()
+{
+  /* 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)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* End of implementation class template. */
+#endif
+
+
+#endif /* __gen_IOOPHM_h__ */
diff --git a/plugins/xpcom/prebuilt/ff3/include/IOOPHM.h b/plugins/xpcom/prebuilt/ff3/include/IOOPHM.h
new file mode 100644
index 0000000..ba6f481
--- /dev/null
+++ b/plugins/xpcom/prebuilt/ff3/include/IOOPHM.h
@@ -0,0 +1,93 @@
+/*
+ * DO NOT EDIT.  THIS FILE IS GENERATED FROM IOOPHM.idl
+ */
+
+#ifndef __gen_IOOPHM_h__
+#define __gen_IOOPHM_h__
+
+
+#ifndef __gen_nsISupports_h__
+#include "nsISupports.h"
+#endif
+
+/* For IDL files that don't want to include root IDL files. */
+#ifndef NS_NO_VTABLE
+#define NS_NO_VTABLE
+#endif
+class nsIDOMWindow; /* forward declaration */
+
+
+/* starting interface:    IOOPHM */
+#define IOOPHM_IID_STR "90cef17b-c3fe-4251-af68-4381b3d938a0"
+
+#define IOOPHM_IID \
+  {0x90cef17b, 0xc3fe, 0x4251, \
+    { 0xaf, 0x68, 0x43, 0x81, 0xb3, 0xd9, 0x38, 0xa0 }}
+
+class NS_NO_VTABLE NS_SCRIPTABLE IOOPHM : public nsISupports {
+ public: 
+
+  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;
+
+};
+
+  NS_DEFINE_STATIC_IID_ACCESSOR(IOOPHM, IOOPHM_IID)
+
+/* 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); 
+
+/* 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); } 
+
+/* 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); } 
+
+#if 0
+/* Use the code below as a template for the implementation class for this interface. */
+
+/* Header file */
+class _MYCLASS_ : public IOOPHM
+{
+public:
+  NS_DECL_ISUPPORTS
+  NS_DECL_IOOPHM
+
+  _MYCLASS_();
+
+private:
+  ~_MYCLASS_();
+
+protected:
+  /* additional members */
+};
+
+/* Implementation file */
+NS_IMPL_ISUPPORTS1(_MYCLASS_, IOOPHM)
+
+_MYCLASS_::_MYCLASS_()
+{
+  /* member initializers and constructor code */
+}
+
+_MYCLASS_::~_MYCLASS_()
+{
+  /* 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)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* End of implementation class template. */
+#endif
+
+
+#endif /* __gen_IOOPHM_h__ */
diff --git a/plugins/xpcom/prebuilt/ff35/include/IOOPHM.h b/plugins/xpcom/prebuilt/ff35/include/IOOPHM.h
new file mode 100644
index 0000000..47d62d2
--- /dev/null
+++ b/plugins/xpcom/prebuilt/ff35/include/IOOPHM.h
@@ -0,0 +1,93 @@
+/*
+ * DO NOT EDIT.  THIS FILE IS GENERATED FROM IOOPHM.idl
+ */
+
+#ifndef __gen_IOOPHM_h__
+#define __gen_IOOPHM_h__
+
+
+#ifndef __gen_nsISupports_h__
+#include "nsISupports.h"
+#endif
+
+/* For IDL files that don't want to include root IDL files. */
+#ifndef NS_NO_VTABLE
+#define NS_NO_VTABLE
+#endif
+class nsIDOMWindow; /* forward declaration */
+
+
+/* starting interface:    IOOPHM */
+#define IOOPHM_IID_STR "90cef17b-c3fe-4251-af68-4381b3d938a0"
+
+#define IOOPHM_IID \
+  {0x90cef17b, 0xc3fe, 0x4251, \
+    { 0xaf, 0x68, 0x43, 0x81, 0xb3, 0xd9, 0x38, 0xa0 }}
+
+class NS_NO_VTABLE NS_SCRIPTABLE IOOPHM : public nsISupports {
+ public: 
+
+  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;
+
+};
+
+  NS_DEFINE_STATIC_IID_ACCESSOR(IOOPHM, IOOPHM_IID)
+
+/* 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); 
+
+/* 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); } 
+
+/* 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); } 
+
+#if 0
+/* Use the code below as a template for the implementation class for this interface. */
+
+/* Header file */
+class _MYCLASS_ : public IOOPHM
+{
+public:
+  NS_DECL_ISUPPORTS
+  NS_DECL_IOOPHM
+
+  _MYCLASS_();
+
+private:
+  ~_MYCLASS_();
+
+protected:
+  /* additional members */
+};
+
+/* Implementation file */
+NS_IMPL_ISUPPORTS1(_MYCLASS_, IOOPHM)
+
+_MYCLASS_::_MYCLASS_()
+{
+  /* member initializers and constructor code */
+}
+
+_MYCLASS_::~_MYCLASS_()
+{
+  /* 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)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* End of implementation class template. */
+#endif
+
+
+#endif /* __gen_IOOPHM_h__ */
diff --git a/plugins/xpcom/prebuilt/oophm-xpcom-ff2.xpi b/plugins/xpcom/prebuilt/oophm-xpcom-ff2.xpi
new file mode 100644
index 0000000..96ae80f
--- /dev/null
+++ b/plugins/xpcom/prebuilt/oophm-xpcom-ff2.xpi
Binary files differ
diff --git a/plugins/xpcom/prebuilt/oophm-xpcom-ff3+.xpi b/plugins/xpcom/prebuilt/oophm-xpcom-ff3+.xpi
new file mode 100644
index 0000000..9e5cabc
--- /dev/null
+++ b/plugins/xpcom/prebuilt/oophm-xpcom-ff3+.xpi
Binary files differ
diff --git a/plugins/xpcom/prebuilt/oophm-xpcom-ff3.xpi b/plugins/xpcom/prebuilt/oophm-xpcom-ff3.xpi
new file mode 100644
index 0000000..d7fd35a
--- /dev/null
+++ b/plugins/xpcom/prebuilt/oophm-xpcom-ff3.xpi
Binary files differ
diff --git a/plugins/xpcom/prebuilt/oophm-xpcom-ff35.xpi b/plugins/xpcom/prebuilt/oophm-xpcom-ff35.xpi
new file mode 100644
index 0000000..3bf14d8
--- /dev/null
+++ b/plugins/xpcom/prebuilt/oophm-xpcom-ff35.xpi
Binary files differ
diff --git a/plugins/xpcom/prebuilt/update.rdf b/plugins/xpcom/prebuilt/update.rdf
new file mode 100644
index 0000000..157aec9
--- /dev/null
+++ b/plugins/xpcom/prebuilt/update.rdf
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+         xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+
+  <RDF:Description about="urn:mozilla:extension:oophm-xpcom-ff2@gwt.google.com">
+    <em:updates>
+      <RDF:Seq>
+
+        <RDF:li>
+          <RDF:Description>
+            <em:version>0.0.4229M.20081202172443</em:version>
+	    <em:targetApplication>
+	      <Description>
+		<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+		<em:minVersion>1.5</em:minVersion>
+		<em:maxVersion>2.*</em:maxVersion>
+                <em:updateLink>http://google-web-toolkit.googlecode.com/svn/changes/jat/oophm-plugins-trunk/plugins/xpcom/prebuilt/oophm-xpcom-ff2.xpi</em:updateLink>
+
+		<!--
+                <em:updateInfoURL>http://www.mysite.com/updateinfo2.2.xhtml</em:updateInfoURL>
+		-->
+	      </Description>
+	    </em:targetApplication>
+          </RDF:Description>
+        </RDF:li>
+
+      </RDF:Seq>
+    </em:updates>
+  </RDF:Description>
+
+  <RDF:Description about="urn:mozilla:extension:oophm-xpcom-ff3@gwt.google.com">
+    <em:updates>
+      <RDF:Seq>
+
+        <RDF:li>
+          <RDF:Description>
+            <em:version>0.0.4229M.20081202172443</em:version>
+	    <em:targetApplication>
+	      <Description>
+		<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+		<em:minVersion>3</em:minVersion>
+		<em:maxVersion>3.4.*</em:maxVersion>
+                <em:updateLink>http://google-web-toolkit.googlecode.com/svn/changes/jat/oophm-plugins-trunk/plugins/xpcom/prebuilt/oophm-xpcom-ff3.xpi</em:updateLink>
+
+		<!--
+                <em:updateInfoURL>http://www.mysite.com/updateinfo2.2.xhtml</em:updateInfoURL>
+		-->
+	      </Description>
+	    </em:targetApplication>
+          </RDF:Description>
+        </RDF:li>
+
+      </RDF:Seq>
+    </em:updates>
+  </RDF:Description>
+
+  <RDF:Description about="urn:mozilla:extension:oophm-xpcom-ff3+@gwt.google.com">
+    <em:updates>
+      <RDF:Seq>
+
+        <RDF:li>
+          <RDF:Description>
+            <em:version>0.0.4229M.20081202172443</em:version>
+	    <em:targetApplication>
+	      <Description>
+		<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+		<em:minVersion>3</em:minVersion>
+		<em:maxVersion>3.4.*</em:maxVersion>
+                <em:updateLink>http://google-web-toolkit.googlecode.com/svn/changes/jat/oophm-plugins-trunk/plugins/xpcom/prebuilt/oophm-xpcom-ff3+.xpi</em:updateLink>
+
+		<!--
+                <em:updateInfoURL>http://www.mysite.com/updateinfo2.2.xhtml</em:updateInfoURL>
+		-->
+	      </Description>
+	    </em:targetApplication>
+          </RDF:Description>
+        </RDF:li>
+
+      </RDF:Seq>
+    </em:updates>
+  </RDF:Description>
+
+  <RDF:Description about="urn:mozilla:extension:oophm-xpcom-ff35@gwt.google.com">
+    <em:updates>
+      <RDF:Seq>
+
+        <RDF:li>
+          <RDF:Description>
+            <em:version>0.0.4229M.20081202172443</em:version>
+	    <em:targetApplication>
+	      <Description>
+		<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+		<em:minVersion>3.5</em:minVersion>
+		<em:maxVersion>3.*</em:maxVersion>
+                <em:updateLink>http://google-web-toolkit.googlecode.com/svn/changes/jat/oophm-plugins-trunk/plugins/xpcom/prebuilt/oophm-xpcom-ff35.xpi</em:updateLink>
+
+		<!--
+                <em:updateInfoURL>http://www.mysite.com/updateinfo2.2.xhtml</em:updateInfoURL>
+		-->
+	      </Description>
+	    </em:targetApplication>
+          </RDF:Description>
+        </RDF:li>
+
+      </RDF:Seq>
+    </em:updates>
+  </RDF:Description>
+</RDF:RDF>
diff --git a/plugins/xpcom/version b/plugins/xpcom/version
new file mode 100644
index 0000000..5a86de9
--- /dev/null
+++ b/plugins/xpcom/version
@@ -0,0 +1 @@
+0.0.3745.20081013203929
diff --git a/plugins/xpcom/xpOOPHM.def b/plugins/xpcom/xpOOPHM.def
new file mode 100644
index 0000000..9b66173
--- /dev/null
+++ b/plugins/xpcom/xpOOPHM.def
@@ -0,0 +1,3 @@
+LIBRARY XPOOPHM
+
+EXPORTS
diff --git a/plugins/xpcom/xpOOPHM.rc b/plugins/xpcom/xpOOPHM.rc
new file mode 100644
index 0000000..e5c007c
--- /dev/null
+++ b/plugins/xpcom/xpOOPHM.rc
@@ -0,0 +1,71 @@
+#define APSTUDIO_READONLY_SYMBOLS
+#include "afxres.h"
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif
+
+1 VERSIONINFO
+  FILEVERSION 0,1,1,0
+  PRODUCTVERSION 0,1,1,0
+  FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+  FILEFLAGS 0x1L
+#else
+  FILEFLAGS 0x0L
+#endif
+  FILEOS 0x40004L
+  FILETYPE 0x2L
+  FILESUBTYPE 0x0L
+BEGIN
+  BLOCK "StringFileInfo"
+  BEGIN
+  	BLOCK "040904e4"
+  	BEGIN
+  	  VALUE "CompanyName", 		"Google Inc"
+  	  VALUE "FileDescription",	"GWT XPCOM OOPHM Plugin"
+#if 0
+  	  VALUE "FileExtents",		""
+#endif
+  	  VALUE "FileOpenName",		"Plugin to allow debugging of GWT applications in hosted mode."
+  	  VALUE "FileVersion",		"0.1a"
+  	  VALUE "InternalName",		"GWT XPCOM OOPHM Plugin"
+  	  VALUE "LegalCopyright",	"Copyright © 2008 Google Inc.  Licensed under Apache 2.0 license."
+  	  VALUE "MIMEType",			"application/x-gwt-hosted-mode"
+  	  VALUE "OriginalFilename",	"xpOOPHM.dll"
+  	  VALUE "ProductName",		"GWT XPCOM OOPHM Plugin"
+  	  VALUE "ProductVersion",	"0.1a"
+  	END
+  END
+  BLOCK "VarFileInfo"
+  BEGIN
+    VALUE "Translation", 0x409, 1252
+  END
+END
+
+#ifdef APSTUDIO_INVOKED
+1 TEXTINCLUDE
+BEGIN
+  "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+  "#include ""afxres.h""\r\n"
+  "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+  "\r\n"
+  "\0"
+END
+
+#endif
+
+#else
+
+#endif