Bug 913985: Part 4 - Add new generated code to version control. r=kats
authorChris Kitching <chriskitching@linux.com>
Tue, 12 Nov 2013 10:41:00 -0800
changeset 171524 0d6837452c8c5f3e93bb3cbf922b37436e94d150
parent 171523 693e682cd0d539ada32895cc7286a7a20b60f1f2
child 171525 ea61f08e31d9ffc75fe8f5dcfc63b1715ddd6671
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs913985
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 913985: Part 4 - Add new generated code to version control. r=kats
widget/android/GeneratedJNIWrappers.cpp
widget/android/GeneratedJNIWrappers.h
--- a/widget/android/GeneratedJNIWrappers.cpp
+++ b/widget/android/GeneratedJNIWrappers.cpp
@@ -1,25 +1,100 @@
 // GENERATED CODE
 // Generated by the Java program at /build/annotationProcessors at compile time from
 // annotations on Java methods. To update, change the annotations on the corresponding Java
 // methods and rerun the build. Manually updating this file will cause your build to fail.
 
+#include "GeneratedJNIWrappers.h"
+#include "AndroidBridgeUtilities.h"
 #include "nsXPCOMStrings.h"
 #include "AndroidBridge.h"
-#include "AndroidBridgeUtilities.h"
-
-#ifdef DEBUG
-#define ALOG_BRIDGE(args...) ALOG(args)
-#else
-#define ALOG_BRIDGE(args...) ((void)0)
-#endif
-
-using namespace mozilla;
-void AndroidBridge::InitStubs(JNIEnv *jEnv) {
+
+namespace mozilla {
+namespace widget {
+namespace android {
+jclass GeckoAppShell::mGeckoAppShellClass = 0;
+jmethodID GeckoAppShell::jAcknowledgeEvent = 0;
+jmethodID GeckoAppShell::jAddPluginViewWrapper = 0;
+jmethodID GeckoAppShell::jAlertsProgressListener_OnProgress = 0;
+jmethodID GeckoAppShell::jCancelVibrate = 0;
+jmethodID GeckoAppShell::jCheckURIVisited = 0;
+jmethodID GeckoAppShell::jClearMessageList = 0;
+jmethodID GeckoAppShell::jCloseCamera = 0;
+jmethodID GeckoAppShell::jCloseNotification = 0;
+jmethodID GeckoAppShell::jCreateMessageListWrapper = 0;
+jmethodID GeckoAppShell::jCreateShortcut = 0;
+jmethodID GeckoAppShell::jDeleteMessageWrapper = 0;
+jmethodID GeckoAppShell::jDisableBatteryNotifications = 0;
+jmethodID GeckoAppShell::jDisableNetworkNotifications = 0;
+jmethodID GeckoAppShell::jDisableScreenOrientationNotifications = 0;
+jmethodID GeckoAppShell::jDisableSensor = 0;
+jmethodID GeckoAppShell::jEnableBatteryNotifications = 0;
+jmethodID GeckoAppShell::jEnableLocation = 0;
+jmethodID GeckoAppShell::jEnableLocationHighAccuracy = 0;
+jmethodID GeckoAppShell::jEnableNetworkNotifications = 0;
+jmethodID GeckoAppShell::jEnableScreenOrientationNotifications = 0;
+jmethodID GeckoAppShell::jEnableSensor = 0;
+jmethodID GeckoAppShell::jGetContext = 0;
+jmethodID GeckoAppShell::jGetCurrentBatteryInformationWrapper = 0;
+jmethodID GeckoAppShell::jGetCurrentNetworkInformationWrapper = 0;
+jmethodID GeckoAppShell::jGetDensity = 0;
+jmethodID GeckoAppShell::jGetDpiWrapper = 0;
+jmethodID GeckoAppShell::jGetExtensionFromMimeTypeWrapper = 0;
+jmethodID GeckoAppShell::jGetHandlersForMimeTypeWrapper = 0;
+jmethodID GeckoAppShell::jGetHandlersForURLWrapper = 0;
+jmethodID GeckoAppShell::jGetIconForExtensionWrapper = 0;
+jmethodID GeckoAppShell::jGetMessageWrapper = 0;
+jmethodID GeckoAppShell::jGetMimeTypeFromExtensionsWrapper = 0;
+jmethodID GeckoAppShell::jGetNextMessageInListWrapper = 0;
+jmethodID GeckoAppShell::jGetProxyForURIWrapper = 0;
+jmethodID GeckoAppShell::jGetScreenDepthWrapper = 0;
+jmethodID GeckoAppShell::jGetScreenOrientationWrapper = 0;
+jmethodID GeckoAppShell::jGetShowPasswordSetting = 0;
+jmethodID GeckoAppShell::jGetSystemColoursWrapper = 0;
+jmethodID GeckoAppShell::jHandleGeckoMessageWrapper = 0;
+jmethodID GeckoAppShell::jHideProgressDialog = 0;
+jmethodID GeckoAppShell::jInitCameraWrapper = 0;
+jmethodID GeckoAppShell::jIsNetworkLinkKnown = 0;
+jmethodID GeckoAppShell::jIsNetworkLinkUp = 0;
+jmethodID GeckoAppShell::jIsTablet = 0;
+jmethodID GeckoAppShell::jKillAnyZombies = 0;
+jmethodID GeckoAppShell::jLockScreenOrientation = 0;
+jmethodID GeckoAppShell::jMarkURIVisited = 0;
+jmethodID GeckoAppShell::jMoveTaskToBack = 0;
+jmethodID GeckoAppShell::jNetworkLinkType = 0;
+jmethodID GeckoAppShell::jNotifyDefaultPrevented = 0;
+jmethodID GeckoAppShell::jNotifyIME = 0;
+jmethodID GeckoAppShell::jNotifyIMEChange = 0;
+jmethodID GeckoAppShell::jNotifyIMEContext = 0;
+jmethodID GeckoAppShell::jNotifyWakeLockChanged = 0;
+jmethodID GeckoAppShell::jNotifyXreExit = 0;
+jmethodID GeckoAppShell::jOpenUriExternal = 0;
+jmethodID GeckoAppShell::jPerformHapticFeedback = 0;
+jmethodID GeckoAppShell::jPumpMessageLoop = 0;
+jmethodID GeckoAppShell::jRegisterSurfaceTextureFrameListener = 0;
+jmethodID GeckoAppShell::jRemovePluginView = 0;
+jmethodID GeckoAppShell::jScanMedia = 0;
+jmethodID GeckoAppShell::jScheduleRestart = 0;
+jmethodID GeckoAppShell::jSendMessageWrapper = 0;
+jmethodID GeckoAppShell::jSetFullScreen = 0;
+jmethodID GeckoAppShell::jSetKeepScreenOn = 0;
+jmethodID GeckoAppShell::jSetSelectedLocale = 0;
+jmethodID GeckoAppShell::jSetURITitle = 0;
+jmethodID GeckoAppShell::jShowAlertNotificationWrapper = 0;
+jmethodID GeckoAppShell::jShowFilePickerAsyncWrapper = 0;
+jmethodID GeckoAppShell::jShowFilePickerForExtensionsWrapper = 0;
+jmethodID GeckoAppShell::jShowFilePickerForMimeTypeWrapper = 0;
+jmethodID GeckoAppShell::jShowInputMethodPicker = 0;
+jmethodID GeckoAppShell::jUnlockProfile = 0;
+jmethodID GeckoAppShell::jUnlockScreenOrientation = 0;
+jmethodID GeckoAppShell::jUnregisterSurfaceTextureFrameListener = 0;
+jmethodID GeckoAppShell::jVibrate1 = 0;
+jmethodID GeckoAppShell::jVibrateA = 0;
+void GeckoAppShell::InitStubs(JNIEnv *jEnv) {
     initInit();
 
     mGeckoAppShellClass = getClassGlobalRef("org/mozilla/gecko/GeckoAppShell");
     jAcknowledgeEvent = getStaticMethod("acknowledgeEvent", "()V");
     jAddPluginViewWrapper = getStaticMethod("addPluginView", "(Landroid/view/View;FFFFZ)V");
     jAlertsProgressListener_OnProgress = getStaticMethod("alertsProgressListener_OnProgress", "(Ljava/lang/String;JJLjava/lang/String;)V");
     jCancelVibrate = getStaticMethod("cancelVibrate", "()V");
     jCheckURIVisited = getStaticMethod("checkUriVisited", "(Ljava/lang/String;)V");
@@ -90,46 +165,33 @@ void AndroidBridge::InitStubs(JNIEnv *jE
     jShowFilePickerForExtensionsWrapper = getStaticMethod("showFilePickerForExtensions", "(Ljava/lang/String;)Ljava/lang/String;");
     jShowFilePickerForMimeTypeWrapper = getStaticMethod("showFilePickerForMimeType", "(Ljava/lang/String;)Ljava/lang/String;");
     jShowInputMethodPicker = getStaticMethod("showInputMethodPicker", "()V");
     jUnlockProfile = getStaticMethod("unlockProfile", "()Z");
     jUnlockScreenOrientation = getStaticMethod("unlockScreenOrientation", "()V");
     jUnregisterSurfaceTextureFrameListener = getStaticMethod("unregisterSurfaceTextureFrameListener", "(Ljava/lang/Object;)V");
     jVibrate1 = getStaticMethod("vibrate", "(J)V");
     jVibrateA = getStaticMethod("vibrate", "([JI)V");
-
-    mGeckoJavaSamplerClass = getClassGlobalRef("org/mozilla/gecko/GeckoJavaSampler");
-    jGetFrameNameJavaProfilingWrapper = getStaticMethod("getFrameName", "(III)Ljava/lang/String;");
-    jGetSampleTimeJavaProfiling = getStaticMethod("getSampleTime", "(II)D");
-    jGetThreadNameJavaProfilingWrapper = getStaticMethod("getThreadName", "(I)Ljava/lang/String;");
-    jPauseJavaProfiling = getStaticMethod("pause", "()V");
-    jStartJavaProfiling = getStaticMethod("start", "(II)V");
-    jStopJavaProfiling = getStaticMethod("stop", "()V");
-    jUnpauseJavaProfiling = getStaticMethod("unpause", "()V");
-
-    mThumbnailHelperClass = getClassGlobalRef("org/mozilla/gecko/ThumbnailHelper");
-    jSendThumbnail = getStaticMethod("notifyThumbnail", "(Ljava/nio/ByteBuffer;IZ)V");
-
-    mGLControllerClass = getClassGlobalRef("org/mozilla/gecko/gfx/GLController");
-    jCreateEGLSurfaceForCompositorWrapper = getMethod("createEGLSurfaceForCompositor", "()Ljavax/microedition/khronos/egl/EGLSurface;");
-
-    mLayerViewClass = getClassGlobalRef("org/mozilla/gecko/gfx/LayerView");
-    jRegisterCompositorWrapper = getStaticMethod("registerCxxCompositor", "()Lorg/mozilla/gecko/gfx/GLController;");
-
-    mNativePanZoomControllerClass = getClassGlobalRef("org/mozilla/gecko/gfx/NativePanZoomController");
-    jPostDelayedCallbackWrapper = getMethod("postDelayedCallback", "(J)V");
-    jRequestContentRepaintWrapper = getMethod("requestContentRepaint", "(FFFFF)V");
-
-    mClipboardClass = getClassGlobalRef("org/mozilla/gecko/util/Clipboard");
-    jGetClipboardTextWrapper = getStaticMethod("getText", "()Ljava/lang/String;");
-    jSetClipboardText = getStaticMethod("setText", "(Ljava/lang/CharSequence;)V");
 }
 
-void AndroidBridge::AcknowledgeEvent() {
-    JNIEnv *env = GetJNIEnv();
+GeckoAppShell* GeckoAppShell::Wrap(jobject obj) {
+    JNIEnv *env = GetJNIForThread();
+
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return NULL;
+    }
+
+    GeckoAppShell* ret = new GeckoAppShell(obj, env);
+    env->DeleteLocalRef(obj);
+    return ret;
+}
+
+void GeckoAppShell::AcknowledgeEvent() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -141,21 +203,22 @@ void AndroidBridge::AcknowledgeEvent() {
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::AddPluginViewWrapper(jobject a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, bool a5) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::AddPluginViewWrapper(jobject a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, bool a5) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -175,53 +238,55 @@ void AndroidBridge::AddPluginViewWrapper
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::AlertsProgressListener_OnProgress(const nsAString& a0, int64_t a1, int64_t a2, const nsAString& a3) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::AlertsProgressListener_OnProgress(const nsAString& a0, int64_t a1, int64_t a2, const nsAString& a3) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(2) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
     jvalue args[4];
-    args[0].l = NewJavaString(env, a0);
+    args[0].l = AndroidBridge::NewJavaString(env, a0);
     args[1].j = a1;
     args[2].j = a2;
-    args[3].l = NewJavaString(env, a3);
+    args[3].l = AndroidBridge::NewJavaString(env, a3);
 
     env->CallStaticVoidMethodA(mGeckoAppShellClass, jAlertsProgressListener_OnProgress, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::CancelVibrate() {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::CancelVibrate() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -233,49 +298,51 @@ void AndroidBridge::CancelVibrate() {
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::CheckURIVisited(const nsAString& a0) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::CheckURIVisited(const nsAString& a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
-    jstring j0 = NewJavaString(env, a0);
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jCheckURIVisited, j0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::ClearMessageList(int32_t a0) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::ClearMessageList(int32_t a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -287,21 +354,22 @@ void AndroidBridge::ClearMessageList(int
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::CloseCamera() {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::CloseCamera() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -313,49 +381,51 @@ void AndroidBridge::CloseCamera() {
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::CloseNotification(const nsAString& a0) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::CloseNotification(const nsAString& a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
-    jstring j0 = NewJavaString(env, a0);
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jCloseNotification, j0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::CreateMessageListWrapper(int64_t a0, int64_t a1, jobjectArray a2, int32_t a3, int32_t a4, bool a5, int32_t a6) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::CreateMessageListWrapper(int64_t a0, int64_t a1, jobjectArray a2, int32_t a3, int32_t a4, bool a5, int32_t a6) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -376,53 +446,55 @@ void AndroidBridge::CreateMessageListWra
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::CreateShortcut(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::CreateShortcut(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(4) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
     jvalue args[4];
-    args[0].l = NewJavaString(env, a0);
-    args[1].l = NewJavaString(env, a1);
-    args[2].l = NewJavaString(env, a2);
-    args[3].l = NewJavaString(env, a3);
+    args[0].l = AndroidBridge::NewJavaString(env, a0);
+    args[1].l = AndroidBridge::NewJavaString(env, a1);
+    args[2].l = AndroidBridge::NewJavaString(env, a2);
+    args[3].l = AndroidBridge::NewJavaString(env, a3);
 
     env->CallStaticVoidMethodA(mGeckoAppShellClass, jCreateShortcut, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::DeleteMessageWrapper(int32_t a0, int32_t a1) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::DeleteMessageWrapper(int32_t a0, int32_t a1) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -434,21 +506,22 @@ void AndroidBridge::DeleteMessageWrapper
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::DisableBatteryNotifications() {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::DisableBatteryNotifications() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -460,21 +533,22 @@ void AndroidBridge::DisableBatteryNotifi
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::DisableNetworkNotifications() {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::DisableNetworkNotifications() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -486,21 +560,22 @@ void AndroidBridge::DisableNetworkNotifi
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::DisableScreenOrientationNotifications() {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::DisableScreenOrientationNotifications() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -512,21 +587,22 @@ void AndroidBridge::DisableScreenOrienta
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::DisableSensor(int32_t a0) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::DisableSensor(int32_t a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -538,21 +614,22 @@ void AndroidBridge::DisableSensor(int32_
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::EnableBatteryNotifications() {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::EnableBatteryNotifications() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -564,21 +641,22 @@ void AndroidBridge::EnableBatteryNotific
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::EnableLocation(bool a0) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::EnableLocation(bool a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -590,21 +668,22 @@ void AndroidBridge::EnableLocation(bool 
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::EnableLocationHighAccuracy(bool a0) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::EnableLocationHighAccuracy(bool a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -616,21 +695,22 @@ void AndroidBridge::EnableLocationHighAc
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::EnableNetworkNotifications() {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::EnableNetworkNotifications() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -642,21 +722,22 @@ void AndroidBridge::EnableNetworkNotific
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::EnableScreenOrientationNotifications() {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::EnableScreenOrientationNotifications() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -668,21 +749,22 @@ void AndroidBridge::EnableScreenOrientat
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::EnableSensor(int32_t a0) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::EnableSensor(int32_t a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -694,20 +776,21 @@ void AndroidBridge::EnableSensor(int32_t
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-jobject AndroidBridge::GetContext() {
+jobject GeckoAppShell::GetContext() {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
@@ -720,22 +803,23 @@ jobject AndroidBridge::GetContext() {
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
     return ret;
 }
 
-jdoubleArray AndroidBridge::GetCurrentBatteryInformationWrapper() {
-    JNIEnv *env = GetJNIEnv();
+jdoubleArray GeckoAppShell::GetCurrentBatteryInformationWrapper() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -747,22 +831,23 @@ jdoubleArray AndroidBridge::GetCurrentBa
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jdoubleArray ret = static_cast<jdoubleArray>(env->PopLocalFrame(temp));
     return ret;
 }
 
-jdoubleArray AndroidBridge::GetCurrentNetworkInformationWrapper() {
-    JNIEnv *env = GetJNIEnv();
+jdoubleArray GeckoAppShell::GetCurrentNetworkInformationWrapper() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -774,22 +859,23 @@ jdoubleArray AndroidBridge::GetCurrentNe
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jdoubleArray ret = static_cast<jdoubleArray>(env->PopLocalFrame(temp));
     return ret;
 }
 
-jfloat AndroidBridge::GetDensity() {
-    JNIEnv *env = GetJNIEnv();
+jfloat GeckoAppShell::GetDensity() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return 0.0;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -801,22 +887,23 @@ jfloat AndroidBridge::GetDensity() {
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return 0.0;
     }
+
     env->PopLocalFrame(NULL);
     return temp;
 }
 
-int32_t AndroidBridge::GetDpiWrapper() {
-    JNIEnv *env = GetJNIEnv();
+int32_t GeckoAppShell::GetDpiWrapper() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return 0;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -828,140 +915,145 @@ int32_t AndroidBridge::GetDpiWrapper() {
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return 0;
     }
+
     env->PopLocalFrame(NULL);
     return temp;
 }
 
-jstring AndroidBridge::GetExtensionFromMimeTypeWrapper(const nsAString& a0) {
-    JNIEnv *env = GetJNIEnv();
+jstring GeckoAppShell::GetExtensionFromMimeTypeWrapper(const nsAString& a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(2) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return nullptr;
     }
 
-    jstring j0 = NewJavaString(env, a0);
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
 
     jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetExtensionFromMimeTypeWrapper, j0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
-jobjectArray AndroidBridge::GetHandlersForMimeTypeWrapper(const nsAString& a0, const nsAString& a1) {
-    JNIEnv *env = GetJNIEnv();
+jobjectArray GeckoAppShell::GetHandlersForMimeTypeWrapper(const nsAString& a0, const nsAString& a1) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(3) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return nullptr;
     }
 
-    jstring j0 = NewJavaString(env, a0);
-    jstring j1 = NewJavaString(env, a1);
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
+    jstring j1 = AndroidBridge::NewJavaString(env, a1);
 
     jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetHandlersForMimeTypeWrapper, j0, j1);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jobjectArray ret = static_cast<jobjectArray>(env->PopLocalFrame(temp));
     return ret;
 }
 
-jobjectArray AndroidBridge::GetHandlersForURLWrapper(const nsAString& a0, const nsAString& a1) {
-    JNIEnv *env = GetJNIEnv();
+jobjectArray GeckoAppShell::GetHandlersForURLWrapper(const nsAString& a0, const nsAString& a1) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(3) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return nullptr;
     }
 
-    jstring j0 = NewJavaString(env, a0);
-    jstring j1 = NewJavaString(env, a1);
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
+    jstring j1 = AndroidBridge::NewJavaString(env, a1);
 
     jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetHandlersForURLWrapper, j0, j1);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jobjectArray ret = static_cast<jobjectArray>(env->PopLocalFrame(temp));
     return ret;
 }
 
-jbyteArray AndroidBridge::GetIconForExtensionWrapper(const nsAString& a0, int32_t a1) {
-    JNIEnv *env = GetJNIEnv();
+jbyteArray GeckoAppShell::GetIconForExtensionWrapper(const nsAString& a0, int32_t a1) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(2) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return nullptr;
     }
 
-    jstring j0 = NewJavaString(env, a0);
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
 
     jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetIconForExtensionWrapper, j0, a1);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jbyteArray ret = static_cast<jbyteArray>(env->PopLocalFrame(temp));
     return ret;
 }
 
-void AndroidBridge::GetMessageWrapper(int32_t a0, int32_t a1) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::GetMessageWrapper(int32_t a0, int32_t a1) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -973,50 +1065,52 @@ void AndroidBridge::GetMessageWrapper(in
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-jstring AndroidBridge::GetMimeTypeFromExtensionsWrapper(const nsAString& a0) {
-    JNIEnv *env = GetJNIEnv();
+jstring GeckoAppShell::GetMimeTypeFromExtensionsWrapper(const nsAString& a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(2) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return nullptr;
     }
 
-    jstring j0 = NewJavaString(env, a0);
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
 
     jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetMimeTypeFromExtensionsWrapper, j0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
-void AndroidBridge::GetNextMessageInListWrapper(int32_t a0, int32_t a1) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::GetNextMessageInListWrapper(int32_t a0, int32_t a1) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1028,54 +1122,56 @@ void AndroidBridge::GetNextMessageInList
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-jstring AndroidBridge::GetProxyForURIWrapper(const nsAString& a0, const nsAString& a1, const nsAString& a2, int32_t a3) {
-    JNIEnv *env = GetJNIEnv();
+jstring GeckoAppShell::GetProxyForURIWrapper(const nsAString& a0, const nsAString& a1, const nsAString& a2, int32_t a3) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(4) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return nullptr;
     }
 
     jvalue args[4];
-    args[0].l = NewJavaString(env, a0);
-    args[1].l = NewJavaString(env, a1);
-    args[2].l = NewJavaString(env, a2);
+    args[0].l = AndroidBridge::NewJavaString(env, a0);
+    args[1].l = AndroidBridge::NewJavaString(env, a1);
+    args[2].l = AndroidBridge::NewJavaString(env, a2);
     args[3].i = a3;
 
     jobject temp = env->CallStaticObjectMethodA(mGeckoAppShellClass, jGetProxyForURIWrapper, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
-int32_t AndroidBridge::GetScreenDepthWrapper() {
-    JNIEnv *env = GetJNIEnv();
+int32_t GeckoAppShell::GetScreenDepthWrapper() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return 0;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1087,22 +1183,23 @@ int32_t AndroidBridge::GetScreenDepthWra
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return 0;
     }
+
     env->PopLocalFrame(NULL);
     return temp;
 }
 
-int16_t AndroidBridge::GetScreenOrientationWrapper() {
-    JNIEnv *env = GetJNIEnv();
+int16_t GeckoAppShell::GetScreenOrientationWrapper() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return 0;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1114,22 +1211,23 @@ int16_t AndroidBridge::GetScreenOrientat
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return 0;
     }
+
     env->PopLocalFrame(NULL);
     return temp;
 }
 
-bool AndroidBridge::GetShowPasswordSetting() {
-    JNIEnv *env = GetJNIEnv();
+bool GeckoAppShell::GetShowPasswordSetting() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return false;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1141,22 +1239,23 @@ bool AndroidBridge::GetShowPasswordSetti
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return false;
     }
+
     env->PopLocalFrame(NULL);
     return temp;
 }
 
-jintArray AndroidBridge::GetSystemColoursWrapper() {
-    JNIEnv *env = GetJNIEnv();
+jintArray GeckoAppShell::GetSystemColoursWrapper() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1168,51 +1267,53 @@ jintArray AndroidBridge::GetSystemColour
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jintArray ret = static_cast<jintArray>(env->PopLocalFrame(temp));
     return ret;
 }
 
-jstring AndroidBridge::HandleGeckoMessageWrapper(const nsAString& a0) {
-    JNIEnv *env = GetJNIEnv();
+jstring GeckoAppShell::HandleGeckoMessageWrapper(const nsAString& a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(2) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return nullptr;
     }
 
-    jstring j0 = NewJavaString(env, a0);
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
 
     jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jHandleGeckoMessageWrapper, j0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
-void AndroidBridge::HideProgressDialog() {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::HideProgressDialog() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1224,54 +1325,56 @@ void AndroidBridge::HideProgressDialog()
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-jintArray AndroidBridge::InitCameraWrapper(const nsAString& a0, int32_t a1, int32_t a2, int32_t a3) {
-    JNIEnv *env = GetJNIEnv();
+jintArray GeckoAppShell::InitCameraWrapper(const nsAString& a0, int32_t a1, int32_t a2, int32_t a3) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(2) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return nullptr;
     }
 
     jvalue args[4];
-    args[0].l = NewJavaString(env, a0);
+    args[0].l = AndroidBridge::NewJavaString(env, a0);
     args[1].i = a1;
     args[2].i = a2;
     args[3].i = a3;
 
     jobject temp = env->CallStaticObjectMethodA(mGeckoAppShellClass, jInitCameraWrapper, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jintArray ret = static_cast<jintArray>(env->PopLocalFrame(temp));
     return ret;
 }
 
-bool AndroidBridge::IsNetworkLinkKnown() {
-    JNIEnv *env = GetJNIEnv();
+bool GeckoAppShell::IsNetworkLinkKnown() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return false;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1283,22 +1386,23 @@ bool AndroidBridge::IsNetworkLinkKnown()
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return false;
     }
+
     env->PopLocalFrame(NULL);
     return temp;
 }
 
-bool AndroidBridge::IsNetworkLinkUp() {
-    JNIEnv *env = GetJNIEnv();
+bool GeckoAppShell::IsNetworkLinkUp() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return false;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1310,22 +1414,23 @@ bool AndroidBridge::IsNetworkLinkUp() {
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return false;
     }
+
     env->PopLocalFrame(NULL);
     return temp;
 }
 
-bool AndroidBridge::IsTablet() {
-    JNIEnv *env = GetJNIEnv();
+bool GeckoAppShell::IsTablet() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return false;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1337,22 +1442,23 @@ bool AndroidBridge::IsTablet() {
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return false;
     }
+
     env->PopLocalFrame(NULL);
     return temp;
 }
 
-void AndroidBridge::KillAnyZombies() {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::KillAnyZombies() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1364,21 +1470,22 @@ void AndroidBridge::KillAnyZombies() {
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::LockScreenOrientation(int32_t a0) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::LockScreenOrientation(int32_t a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1390,49 +1497,51 @@ void AndroidBridge::LockScreenOrientatio
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::MarkURIVisited(const nsAString& a0) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::MarkURIVisited(const nsAString& a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
-    jstring j0 = NewJavaString(env, a0);
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jMarkURIVisited, j0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::MoveTaskToBack() {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::MoveTaskToBack() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1444,21 +1553,22 @@ void AndroidBridge::MoveTaskToBack() {
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-int32_t AndroidBridge::NetworkLinkType() {
-    JNIEnv *env = GetJNIEnv();
+int32_t GeckoAppShell::NetworkLinkType() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return 0;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1470,22 +1580,23 @@ int32_t AndroidBridge::NetworkLinkType()
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return 0;
     }
+
     env->PopLocalFrame(NULL);
     return temp;
 }
 
-void AndroidBridge::NotifyDefaultPrevented(bool a0) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::NotifyDefaultPrevented(bool a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1497,155 +1608,145 @@ void AndroidBridge::NotifyDefaultPrevent
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::NotifyIME(int32_t a0) {
-    if (!sBridge) {
-        ALOG_BRIDGE("Aborted: No sBridge - %s", __PRETTY_FUNCTION__);
-        return;
-    }
-
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::NotifyIME(int32_t a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
-    env->CallStaticVoidMethod(sBridge->mGeckoAppShellClass, sBridge->jNotifyIME, a0);
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jNotifyIME, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::NotifyIMEChange(const nsAString& a0, int32_t a1, int32_t a2, int32_t a3) {
-    if (!sBridge) {
-        ALOG_BRIDGE("Aborted: No sBridge - %s", __PRETTY_FUNCTION__);
-        return;
-    }
-
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::NotifyIMEChange(const nsAString& a0, int32_t a1, int32_t a2, int32_t a3) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
     jvalue args[4];
-    args[0].l = NewJavaString(env, a0);
+    args[0].l = AndroidBridge::NewJavaString(env, a0);
     args[1].i = a1;
     args[2].i = a2;
     args[3].i = a3;
 
-    env->CallStaticVoidMethodA(sBridge->mGeckoAppShellClass, sBridge->jNotifyIMEChange, args);
+    env->CallStaticVoidMethodA(mGeckoAppShellClass, jNotifyIMEChange, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::NotifyIMEContext(int32_t a0, const nsAString& a1, const nsAString& a2, const nsAString& a3) {
-    if (!sBridge) {
-        ALOG_BRIDGE("Aborted: No sBridge - %s", __PRETTY_FUNCTION__);
-        return;
-    }
-
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::NotifyIMEContext(int32_t a0, const nsAString& a1, const nsAString& a2, const nsAString& a3) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(3) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
     jvalue args[4];
     args[0].i = a0;
-    args[1].l = NewJavaString(env, a1);
-    args[2].l = NewJavaString(env, a2);
-    args[3].l = NewJavaString(env, a3);
-
-    env->CallStaticVoidMethodA(sBridge->mGeckoAppShellClass, sBridge->jNotifyIMEContext, args);
+    args[1].l = AndroidBridge::NewJavaString(env, a1);
+    args[2].l = AndroidBridge::NewJavaString(env, a2);
+    args[3].l = AndroidBridge::NewJavaString(env, a3);
+
+    env->CallStaticVoidMethodA(mGeckoAppShellClass, jNotifyIMEContext, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::NotifyWakeLockChanged(const nsAString& a0, const nsAString& a1) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::NotifyWakeLockChanged(const nsAString& a0, const nsAString& a1) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(2) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
-    jstring j0 = NewJavaString(env, a0);
-    jstring j1 = NewJavaString(env, a1);
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
+    jstring j1 = AndroidBridge::NewJavaString(env, a1);
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jNotifyWakeLockChanged, j0, j1);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::NotifyXreExit() {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::NotifyXreExit() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1657,56 +1758,58 @@ void AndroidBridge::NotifyXreExit() {
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-bool AndroidBridge::OpenUriExternal(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3, const nsAString& a4, const nsAString& a5) {
-    JNIEnv *env = GetJNIEnv();
+bool GeckoAppShell::OpenUriExternal(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3, const nsAString& a4, const nsAString& a5) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return false;
     }
 
     if (env->PushLocalFrame(6) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return false;
     }
 
     jvalue args[6];
-    args[0].l = NewJavaString(env, a0);
-    args[1].l = NewJavaString(env, a1);
-    args[2].l = NewJavaString(env, a2);
-    args[3].l = NewJavaString(env, a3);
-    args[4].l = NewJavaString(env, a4);
-    args[5].l = NewJavaString(env, a5);
+    args[0].l = AndroidBridge::NewJavaString(env, a0);
+    args[1].l = AndroidBridge::NewJavaString(env, a1);
+    args[2].l = AndroidBridge::NewJavaString(env, a2);
+    args[3].l = AndroidBridge::NewJavaString(env, a3);
+    args[4].l = AndroidBridge::NewJavaString(env, a4);
+    args[5].l = AndroidBridge::NewJavaString(env, a5);
 
     bool temp = env->CallStaticBooleanMethodA(mGeckoAppShellClass, jOpenUriExternal, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return false;
     }
+
     env->PopLocalFrame(NULL);
     return temp;
 }
 
-void AndroidBridge::PerformHapticFeedback(bool a0) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::PerformHapticFeedback(bool a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1718,21 +1821,22 @@ void AndroidBridge::PerformHapticFeedbac
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-bool AndroidBridge::PumpMessageLoop() {
-    JNIEnv *env = GetJNIEnv();
+bool GeckoAppShell::PumpMessageLoop() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return false;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1744,22 +1848,23 @@ bool AndroidBridge::PumpMessageLoop() {
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return false;
     }
+
     env->PopLocalFrame(NULL);
     return temp;
 }
 
-void AndroidBridge::RegisterSurfaceTextureFrameListener(jobject a0, int32_t a1) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::RegisterSurfaceTextureFrameListener(jobject a0, int32_t a1) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1771,21 +1876,22 @@ void AndroidBridge::RegisterSurfaceTextu
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::RemovePluginView(jobject a0, bool a1) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::RemovePluginView(jobject a0, bool a1) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1797,50 +1903,52 @@ void AndroidBridge::RemovePluginView(job
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::ScanMedia(const nsAString& a0, const nsAString& a1) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::ScanMedia(const nsAString& a0, const nsAString& a1) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(2) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
-    jstring j0 = NewJavaString(env, a0);
-    jstring j1 = NewJavaString(env, a1);
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
+    jstring j1 = AndroidBridge::NewJavaString(env, a1);
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jScanMedia, j0, j1);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::ScheduleRestart() {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::ScheduleRestart() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1852,52 +1960,54 @@ void AndroidBridge::ScheduleRestart() {
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::SendMessageWrapper(const nsAString& a0, const nsAString& a1, int32_t a2) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::SendMessageWrapper(const nsAString& a0, const nsAString& a1, int32_t a2) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(2) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
     jvalue args[3];
-    args[0].l = NewJavaString(env, a0);
-    args[1].l = NewJavaString(env, a1);
+    args[0].l = AndroidBridge::NewJavaString(env, a0);
+    args[1].l = AndroidBridge::NewJavaString(env, a1);
     args[2].i = a2;
 
     env->CallStaticVoidMethodA(mGeckoAppShellClass, jSendMessageWrapper, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::SetFullScreen(bool a0) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::SetFullScreen(bool a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1909,21 +2019,22 @@ void AndroidBridge::SetFullScreen(bool a
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::SetKeepScreenOn(bool a0) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::SetKeepScreenOn(bool a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -1935,197 +2046,204 @@ void AndroidBridge::SetKeepScreenOn(bool
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::SetSelectedLocale(const nsAString& a0) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::SetSelectedLocale(const nsAString& a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
-    jstring j0 = NewJavaString(env, a0);
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jSetSelectedLocale, j0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::SetURITitle(const nsAString& a0, const nsAString& a1) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::SetURITitle(const nsAString& a0, const nsAString& a1) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(2) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
-    jstring j0 = NewJavaString(env, a0);
-    jstring j1 = NewJavaString(env, a1);
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
+    jstring j1 = AndroidBridge::NewJavaString(env, a1);
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jSetURITitle, j0, j1);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::ShowAlertNotificationWrapper(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3, const nsAString& a4) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::ShowAlertNotificationWrapper(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3, const nsAString& a4) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(5) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
     jvalue args[5];
-    args[0].l = NewJavaString(env, a0);
-    args[1].l = NewJavaString(env, a1);
-    args[2].l = NewJavaString(env, a2);
-    args[3].l = NewJavaString(env, a3);
-    args[4].l = NewJavaString(env, a4);
+    args[0].l = AndroidBridge::NewJavaString(env, a0);
+    args[1].l = AndroidBridge::NewJavaString(env, a1);
+    args[2].l = AndroidBridge::NewJavaString(env, a2);
+    args[3].l = AndroidBridge::NewJavaString(env, a3);
+    args[4].l = AndroidBridge::NewJavaString(env, a4);
 
     env->CallStaticVoidMethodA(mGeckoAppShellClass, jShowAlertNotificationWrapper, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::ShowFilePickerAsyncWrapper(const nsAString& a0, int64_t a1) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::ShowFilePickerAsyncWrapper(const nsAString& a0, int64_t a1) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
-    jstring j0 = NewJavaString(env, a0);
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jShowFilePickerAsyncWrapper, j0, a1);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-jstring AndroidBridge::ShowFilePickerForExtensionsWrapper(const nsAString& a0) {
-    JNIEnv *env = GetJNIEnv();
+jstring GeckoAppShell::ShowFilePickerForExtensionsWrapper(const nsAString& a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(2) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return nullptr;
     }
 
-    jstring j0 = NewJavaString(env, a0);
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
 
     jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jShowFilePickerForExtensionsWrapper, j0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
-jstring AndroidBridge::ShowFilePickerForMimeTypeWrapper(const nsAString& a0) {
-    JNIEnv *env = GetJNIEnv();
+jstring GeckoAppShell::ShowFilePickerForMimeTypeWrapper(const nsAString& a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(2) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return nullptr;
     }
 
-    jstring j0 = NewJavaString(env, a0);
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
 
     jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jShowFilePickerForMimeTypeWrapper, j0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
-void AndroidBridge::ShowInputMethodPicker() {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::ShowInputMethodPicker() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -2137,21 +2255,22 @@ void AndroidBridge::ShowInputMethodPicke
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-bool AndroidBridge::UnlockProfile() {
-    JNIEnv *env = GetJNIEnv();
+bool GeckoAppShell::UnlockProfile() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return false;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -2163,22 +2282,23 @@ bool AndroidBridge::UnlockProfile() {
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return false;
     }
+
     env->PopLocalFrame(NULL);
     return temp;
 }
 
-void AndroidBridge::UnlockScreenOrientation() {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::UnlockScreenOrientation() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -2190,20 +2310,21 @@ void AndroidBridge::UnlockScreenOrientat
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::UnregisterSurfaceTextureFrameListener(jobject a0) {
+void GeckoAppShell::UnregisterSurfaceTextureFrameListener(jobject a0) {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
@@ -2216,21 +2337,22 @@ void AndroidBridge::UnregisterSurfaceTex
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::Vibrate1(int64_t a0) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::Vibrate1(int64_t a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -2242,21 +2364,22 @@ void AndroidBridge::Vibrate1(int64_t a0)
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::VibrateA(jlongArray a0, int32_t a1) {
-    JNIEnv *env = GetJNIEnv();
+void GeckoAppShell::VibrateA(jlongArray a0, int32_t a1) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -2268,20 +2391,219 @@ void AndroidBridge::VibrateA(jlongArray 
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
-
-jstring AndroidBridge::GetFrameNameJavaProfilingWrapper(int32_t a0, int32_t a1, int32_t a2) {
+jclass JavaDomKeyLocation::mDomKeyLocationClass = 0;
+jmethodID JavaDomKeyLocation::jvalueOf = 0;
+jmethodID JavaDomKeyLocation::jvalues = 0;
+jfieldID JavaDomKeyLocation::jDOM_KEY_LOCATION_JOYSTICK = 0;
+jfieldID JavaDomKeyLocation::jDOM_KEY_LOCATION_LEFT = 0;
+jfieldID JavaDomKeyLocation::jDOM_KEY_LOCATION_MOBILE = 0;
+jfieldID JavaDomKeyLocation::jDOM_KEY_LOCATION_NUMPAD = 0;
+jfieldID JavaDomKeyLocation::jDOM_KEY_LOCATION_RIGHT = 0;
+jfieldID JavaDomKeyLocation::jDOM_KEY_LOCATION_STANDARD = 0;
+jfieldID JavaDomKeyLocation::jvalue = 0;
+void JavaDomKeyLocation::InitStubs(JNIEnv *jEnv) {
+    initInit();
+
+    mDomKeyLocationClass = getClassGlobalRef("org/mozilla/gecko/GeckoEvent$DomKeyLocation");
+    jvalueOf = getStaticMethod("valueOf", "(Ljava/lang/String;)Lorg/mozilla/gecko/GeckoEvent$DomKeyLocation;");
+    jvalues = getStaticMethod("values", "()[Lorg/mozilla/gecko/GeckoEvent$DomKeyLocation;");
+    jDOM_KEY_LOCATION_JOYSTICK = getStaticField("DOM_KEY_LOCATION_JOYSTICK", "Lorg/mozilla/gecko/GeckoEvent$DomKeyLocation;");
+    jDOM_KEY_LOCATION_LEFT = getStaticField("DOM_KEY_LOCATION_LEFT", "Lorg/mozilla/gecko/GeckoEvent$DomKeyLocation;");
+    jDOM_KEY_LOCATION_MOBILE = getStaticField("DOM_KEY_LOCATION_MOBILE", "Lorg/mozilla/gecko/GeckoEvent$DomKeyLocation;");
+    jDOM_KEY_LOCATION_NUMPAD = getStaticField("DOM_KEY_LOCATION_NUMPAD", "Lorg/mozilla/gecko/GeckoEvent$DomKeyLocation;");
+    jDOM_KEY_LOCATION_RIGHT = getStaticField("DOM_KEY_LOCATION_RIGHT", "Lorg/mozilla/gecko/GeckoEvent$DomKeyLocation;");
+    jDOM_KEY_LOCATION_STANDARD = getStaticField("DOM_KEY_LOCATION_STANDARD", "Lorg/mozilla/gecko/GeckoEvent$DomKeyLocation;");
+    jvalue = getField("value", "I");
+}
+
+JavaDomKeyLocation* JavaDomKeyLocation::Wrap(jobject obj) {
+    JNIEnv *env = GetJNIForThread();
+
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return NULL;
+    }
+
+    JavaDomKeyLocation* ret = new JavaDomKeyLocation(obj, env);
+    env->DeleteLocalRef(obj);
+    return ret;
+}
+
+jobject JavaDomKeyLocation::valueOf(const nsAString& a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(2) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
+
+    jobject temp = env->CallStaticObjectMethod(mDomKeyLocationClass, jvalueOf, j0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+
+    jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
+    return ret;
+}
+
+jobjectArray JavaDomKeyLocation::values() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jobject temp = env->CallStaticObjectMethod(mDomKeyLocationClass, jvalues);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+
+    jobjectArray ret = static_cast<jobjectArray>(env->PopLocalFrame(temp));
+    return ret;
+}
+
+jobject JavaDomKeyLocation::getDOM_KEY_LOCATION_JOYSTICK() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    return static_cast<jobject>(env->GetStaticObjectField(mDomKeyLocationClass, jDOM_KEY_LOCATION_JOYSTICK));
+}
+
+jobject JavaDomKeyLocation::getDOM_KEY_LOCATION_LEFT() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    return static_cast<jobject>(env->GetStaticObjectField(mDomKeyLocationClass, jDOM_KEY_LOCATION_LEFT));
+}
+
+jobject JavaDomKeyLocation::getDOM_KEY_LOCATION_MOBILE() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    return static_cast<jobject>(env->GetStaticObjectField(mDomKeyLocationClass, jDOM_KEY_LOCATION_MOBILE));
+}
+
+jobject JavaDomKeyLocation::getDOM_KEY_LOCATION_NUMPAD() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    return static_cast<jobject>(env->GetStaticObjectField(mDomKeyLocationClass, jDOM_KEY_LOCATION_NUMPAD));
+}
+
+jobject JavaDomKeyLocation::getDOM_KEY_LOCATION_RIGHT() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    return static_cast<jobject>(env->GetStaticObjectField(mDomKeyLocationClass, jDOM_KEY_LOCATION_RIGHT));
+}
+
+jobject JavaDomKeyLocation::getDOM_KEY_LOCATION_STANDARD() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    return static_cast<jobject>(env->GetStaticObjectField(mDomKeyLocationClass, jDOM_KEY_LOCATION_STANDARD));
+}
+
+int32_t JavaDomKeyLocation::getvalue() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0;
+    }
+
+    return env->GetIntField(wrapped_obj, jvalue);
+}
+jclass GeckoJavaSampler::mGeckoJavaSamplerClass = 0;
+jmethodID GeckoJavaSampler::jGetFrameNameJavaProfilingWrapper = 0;
+jmethodID GeckoJavaSampler::jGetSampleTimeJavaProfiling = 0;
+jmethodID GeckoJavaSampler::jGetThreadNameJavaProfilingWrapper = 0;
+jmethodID GeckoJavaSampler::jPauseJavaProfiling = 0;
+jmethodID GeckoJavaSampler::jStartJavaProfiling = 0;
+jmethodID GeckoJavaSampler::jStopJavaProfiling = 0;
+jmethodID GeckoJavaSampler::jUnpauseJavaProfiling = 0;
+void GeckoJavaSampler::InitStubs(JNIEnv *jEnv) {
+    initInit();
+
+    mGeckoJavaSamplerClass = getClassGlobalRef("org/mozilla/gecko/GeckoJavaSampler");
+    jGetFrameNameJavaProfilingWrapper = getStaticMethod("getFrameName", "(III)Ljava/lang/String;");
+    jGetSampleTimeJavaProfiling = getStaticMethod("getSampleTime", "(II)D");
+    jGetThreadNameJavaProfilingWrapper = getStaticMethod("getThreadName", "(I)Ljava/lang/String;");
+    jPauseJavaProfiling = getStaticMethod("pause", "()V");
+    jStartJavaProfiling = getStaticMethod("start", "(II)V");
+    jStopJavaProfiling = getStaticMethod("stop", "()V");
+    jUnpauseJavaProfiling = getStaticMethod("unpause", "()V");
+}
+
+GeckoJavaSampler* GeckoJavaSampler::Wrap(jobject obj) {
+    JNIEnv *env = GetJNIForThread();
+
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return NULL;
+    }
+
+    GeckoJavaSampler* ret = new GeckoJavaSampler(obj, env);
+    env->DeleteLocalRef(obj);
+    return ret;
+}
+
+jstring GeckoJavaSampler::GetFrameNameJavaProfilingWrapper(int32_t a0, int32_t a1, int32_t a2) {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
@@ -2299,21 +2621,22 @@ jstring AndroidBridge::GetFrameNameJavaP
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
-jdouble AndroidBridge::GetSampleTimeJavaProfiling(int32_t a0, int32_t a1) {
+jdouble GeckoJavaSampler::GetSampleTimeJavaProfiling(int32_t a0, int32_t a1) {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return 0.0;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
@@ -2326,21 +2649,22 @@ jdouble AndroidBridge::GetSampleTimeJava
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return 0.0;
     }
+
     env->PopLocalFrame(NULL);
     return temp;
 }
 
-jstring AndroidBridge::GetThreadNameJavaProfilingWrapper(int32_t a0) {
+jstring GeckoJavaSampler::GetThreadNameJavaProfilingWrapper(int32_t a0) {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
@@ -2353,21 +2677,22 @@ jstring AndroidBridge::GetThreadNameJava
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
-void AndroidBridge::PauseJavaProfiling() {
+void GeckoJavaSampler::PauseJavaProfiling() {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
@@ -2380,20 +2705,21 @@ void AndroidBridge::PauseJavaProfiling()
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::StartJavaProfiling(int32_t a0, int32_t a1) {
+void GeckoJavaSampler::StartJavaProfiling(int32_t a0, int32_t a1) {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
@@ -2406,20 +2732,21 @@ void AndroidBridge::StartJavaProfiling(i
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::StopJavaProfiling() {
+void GeckoJavaSampler::StopJavaProfiling() {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
@@ -2432,20 +2759,21 @@ void AndroidBridge::StopJavaProfiling() 
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::UnpauseJavaProfiling() {
+void GeckoJavaSampler::UnpauseJavaProfiling() {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
@@ -2458,21 +2786,170 @@ void AndroidBridge::UnpauseJavaProfiling
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
+    env->PopLocalFrame(NULL);
+}
+jclass SurfaceBits::mSurfaceBitsClass = 0;
+jmethodID SurfaceBits::jSurfaceBits = 0;
+jfieldID SurfaceBits::jbuffer = 0;
+jfieldID SurfaceBits::jformat = 0;
+jfieldID SurfaceBits::jheight = 0;
+jfieldID SurfaceBits::jwidth = 0;
+void SurfaceBits::InitStubs(JNIEnv *jEnv) {
+    initInit();
+
+    mSurfaceBitsClass = getClassGlobalRef("org/mozilla/gecko/SurfaceBits");
+    jSurfaceBits = getMethod("<init>", "()V");
+    jbuffer = getField("buffer", "Ljava/nio/ByteBuffer;");
+    jformat = getField("format", "I");
+    jheight = getField("height", "I");
+    jwidth = getField("width", "I");
+}
+
+SurfaceBits* SurfaceBits::Wrap(jobject obj) {
+    JNIEnv *env = GetJNIForThread();
+
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return NULL;
+    }
+
+    SurfaceBits* ret = new SurfaceBits(obj, env);
+    env->DeleteLocalRef(obj);
+    return ret;
+}
+
+SurfaceBits::SurfaceBits() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    Init(env->NewObject(mSurfaceBitsClass, jSurfaceBits), env);
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::SendThumbnail(jobject a0, int32_t a1, bool a2) {
-    JNIEnv *env = GetJNIEnv();
+jobject SurfaceBits::getbuffer() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    return static_cast<jobject>(env->GetObjectField(wrapped_obj, jbuffer));
+}
+
+void SurfaceBits::setbuffer(jobject a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetObjectField(wrapped_obj, jbuffer, a0);
+}
+
+int32_t SurfaceBits::getformat() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0;
+    }
+
+    return env->GetIntField(wrapped_obj, jformat);
+}
+
+void SurfaceBits::setformat(int32_t a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetIntField(wrapped_obj, jformat, a0);
+}
+
+int32_t SurfaceBits::getheight() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0;
+    }
+
+    return env->GetIntField(wrapped_obj, jheight);
+}
+
+void SurfaceBits::setheight(int32_t a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetIntField(wrapped_obj, jheight, a0);
+}
+
+int32_t SurfaceBits::getwidth() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0;
+    }
+
+    return env->GetIntField(wrapped_obj, jwidth);
+}
+
+void SurfaceBits::setwidth(int32_t a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetIntField(wrapped_obj, jwidth, a0);
+}
+jclass ThumbnailHelper::mThumbnailHelperClass = 0;
+jmethodID ThumbnailHelper::jSendThumbnail = 0;
+void ThumbnailHelper::InitStubs(JNIEnv *jEnv) {
+    initInit();
+
+    mThumbnailHelperClass = getClassGlobalRef("org/mozilla/gecko/ThumbnailHelper");
+    jSendThumbnail = getStaticMethod("notifyThumbnail", "(Ljava/nio/ByteBuffer;IZ)V");
+}
+
+ThumbnailHelper* ThumbnailHelper::Wrap(jobject obj) {
+    JNIEnv *env = GetJNIForThread();
+
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return NULL;
+    }
+
+    ThumbnailHelper* ret = new ThumbnailHelper(obj, env);
+    env->DeleteLocalRef(obj);
+    return ret;
+}
+
+void ThumbnailHelper::SendThumbnail(jobject a0, int32_t a1, bool a2) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -2489,47 +2966,613 @@ void AndroidBridge::SendThumbnail(jobjec
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
+    env->PopLocalFrame(NULL);
+}
+jclass DisplayPortMetrics::mDisplayPortMetricsClass = 0;
+jmethodID DisplayPortMetrics::jDisplayPortMetrics = 0;
+jfieldID DisplayPortMetrics::jMPosition = 0;
+jfieldID DisplayPortMetrics::jResolution = 0;
+void DisplayPortMetrics::InitStubs(JNIEnv *jEnv) {
+    initInit();
+
+    mDisplayPortMetricsClass = getClassGlobalRef("org/mozilla/gecko/gfx/DisplayPortMetrics");
+    jDisplayPortMetrics = getMethod("<init>", "(FFFFF)V");
+    jMPosition = getField("mPosition", "Landroid/graphics/RectF;");
+    jResolution = getField("resolution", "F");
+}
+
+DisplayPortMetrics* DisplayPortMetrics::Wrap(jobject obj) {
+    JNIEnv *env = GetJNIForThread();
+
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return NULL;
+    }
+
+    DisplayPortMetrics* ret = new DisplayPortMetrics(obj, env);
+    env->DeleteLocalRef(obj);
+    return ret;
+}
+
+DisplayPortMetrics::DisplayPortMetrics(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jvalue args[5];
+    args[0].f = a0;
+    args[1].f = a1;
+    args[2].f = a2;
+    args[3].f = a3;
+    args[4].f = a4;
+
+    Init(env->NewObjectA(mDisplayPortMetricsClass, jDisplayPortMetrics, args), env);
     env->PopLocalFrame(NULL);
 }
 
-jobject AndroidBridge::CreateEGLSurfaceForCompositorWrapper(jobject aTarget) {
+jobject DisplayPortMetrics::getMPosition() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    return static_cast<jobject>(env->GetObjectField(wrapped_obj, jMPosition));
+}
+
+jfloat DisplayPortMetrics::getResolution() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0.0;
+    }
+
+    return env->GetFloatField(wrapped_obj, jResolution);
+}
+jclass GLController::mGLControllerClass = 0;
+jmethodID GLController::jCreateEGLSurfaceForCompositorWrapper = 0;
+void GLController::InitStubs(JNIEnv *jEnv) {
+    initInit();
+
+    mGLControllerClass = getClassGlobalRef("org/mozilla/gecko/gfx/GLController");
+    jCreateEGLSurfaceForCompositorWrapper = getMethod("createEGLSurfaceForCompositor", "()Ljavax/microedition/khronos/egl/EGLSurface;");
+}
+
+GLController* GLController::Wrap(jobject obj) {
+    JNIEnv *env = GetJNIForThread();
+
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return NULL;
+    }
+
+    GLController* ret = new GLController(obj, env);
+    env->DeleteLocalRef(obj);
+    return ret;
+}
+
+jobject GLController::CreateEGLSurfaceForCompositorWrapper() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jobject temp = env->CallObjectMethod(wrapped_obj, jCreateEGLSurfaceForCompositorWrapper);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+
+    jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
+    return ret;
+}
+jclass GeckoLayerClient::mGeckoLayerClientClass = 0;
+jmethodID GeckoLayerClient::jActivateProgram = 0;
+jmethodID GeckoLayerClient::jContentDocumentChanged = 0;
+jmethodID GeckoLayerClient::jCreateFrame = 0;
+jmethodID GeckoLayerClient::jDeactivateProgram = 0;
+jmethodID GeckoLayerClient::jGetDisplayPort = 0;
+jmethodID GeckoLayerClient::jIsContentDocumentDisplayed = 0;
+jmethodID GeckoLayerClient::jProgressiveUpdateCallback = 0;
+jmethodID GeckoLayerClient::jSetFirstPaintViewport = 0;
+jmethodID GeckoLayerClient::jSetPageRect = 0;
+jmethodID GeckoLayerClient::jSyncFrameMetrics = 0;
+jmethodID GeckoLayerClient::jSyncViewportInfo = 0;
+void GeckoLayerClient::InitStubs(JNIEnv *jEnv) {
+    initInit();
+
+    mGeckoLayerClientClass = getClassGlobalRef("org/mozilla/gecko/gfx/GeckoLayerClient");
+    jActivateProgram = getMethod("activateProgram", "()V");
+    jContentDocumentChanged = getMethod("contentDocumentChanged", "()V");
+    jCreateFrame = getMethod("createFrame", "()Lorg/mozilla/gecko/gfx/LayerRenderer$Frame;");
+    jDeactivateProgram = getMethod("deactivateProgram", "()V");
+    jGetDisplayPort = getMethod("getDisplayPort", "(ZZILorg/mozilla/gecko/gfx/ImmutableViewportMetrics;)Lorg/mozilla/gecko/gfx/DisplayPortMetrics;");
+    jIsContentDocumentDisplayed = getMethod("isContentDocumentDisplayed", "()Z");
+    jProgressiveUpdateCallback = getMethod("progressiveUpdateCallback", "(ZFFFFFZ)Lorg/mozilla/gecko/gfx/ProgressiveUpdateData;");
+    jSetFirstPaintViewport = getMethod("setFirstPaintViewport", "(FFFFFFF)V");
+    jSetPageRect = getMethod("setPageRect", "(FFFF)V");
+    jSyncFrameMetrics = getMethod("syncFrameMetrics", "(FFFFFFFZIIIIFZ)Lorg/mozilla/gecko/gfx/ViewTransform;");
+    jSyncViewportInfo = getMethod("syncViewportInfo", "(IIIIFZ)Lorg/mozilla/gecko/gfx/ViewTransform;");
+}
+
+GeckoLayerClient* GeckoLayerClient::Wrap(jobject obj) {
+    JNIEnv *env = GetJNIForThread();
+
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return NULL;
+    }
+
+    GeckoLayerClient* ret = new GeckoLayerClient(obj, env);
+    env->DeleteLocalRef(obj);
+    return ret;
+}
+
+void GeckoLayerClient::ActivateProgram() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallVoidMethod(wrapped_obj, jActivateProgram);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+
+    env->PopLocalFrame(NULL);
+}
+
+void GeckoLayerClient::ContentDocumentChanged() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallVoidMethod(wrapped_obj, jContentDocumentChanged);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+
+    env->PopLocalFrame(NULL);
+}
+
+jobject GeckoLayerClient::CreateFrame() {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return nullptr;
     }
 
-    jobject temp = env->CallObjectMethod(aTarget, jCreateEGLSurfaceForCompositorWrapper);
+    jobject temp = env->CallObjectMethod(wrapped_obj, jCreateFrame);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+
+    jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
+    return ret;
+}
+
+void GeckoLayerClient::DeactivateProgram() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallVoidMethod(wrapped_obj, jDeactivateProgram);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+
+    env->PopLocalFrame(NULL);
+}
+
+jobject GeckoLayerClient::GetDisplayPort(bool a0, bool a1, int32_t a2, jobject a3) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(2) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jvalue args[4];
+    args[0].z = a0;
+    args[1].z = a1;
+    args[2].i = a2;
+    args[3].l = a3;
+
+    jobject temp = env->CallObjectMethodA(wrapped_obj, jGetDisplayPort, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+
+    jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
+    return ret;
+}
+
+bool GeckoLayerClient::IsContentDocumentDisplayed() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return false;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return false;
+    }
+
+    bool temp = env->CallBooleanMethod(wrapped_obj, jIsContentDocumentDisplayed);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return false;
+    }
+
+    env->PopLocalFrame(NULL);
+    return temp;
+}
+
+jobject GeckoLayerClient::ProgressiveUpdateCallback(bool a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, jfloat a5, bool a6) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jvalue args[7];
+    args[0].z = a0;
+    args[1].f = a1;
+    args[2].f = a2;
+    args[3].f = a3;
+    args[4].f = a4;
+    args[5].f = a5;
+    args[6].z = a6;
+
+    jobject temp = env->CallObjectMethodA(wrapped_obj, jProgressiveUpdateCallback, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
     return ret;
 }
 
-jobject AndroidBridge::RegisterCompositorWrapper() {
+void GeckoLayerClient::SetFirstPaintViewport(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, jfloat a5, jfloat a6) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jvalue args[7];
+    args[0].f = a0;
+    args[1].f = a1;
+    args[2].f = a2;
+    args[3].f = a3;
+    args[4].f = a4;
+    args[5].f = a5;
+    args[6].f = a6;
+
+    env->CallVoidMethodA(wrapped_obj, jSetFirstPaintViewport, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+
+    env->PopLocalFrame(NULL);
+}
+
+void GeckoLayerClient::SetPageRect(jfloat a0, jfloat a1, jfloat a2, jfloat a3) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jvalue args[4];
+    args[0].f = a0;
+    args[1].f = a1;
+    args[2].f = a2;
+    args[3].f = a3;
+
+    env->CallVoidMethodA(wrapped_obj, jSetPageRect, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+
+    env->PopLocalFrame(NULL);
+}
+
+jobject GeckoLayerClient::SyncFrameMetrics(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, jfloat a5, jfloat a6, bool a7, int32_t a8, int32_t a9, int32_t a10, int32_t a11, jfloat a12, bool a13) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jvalue args[14];
+    args[0].f = a0;
+    args[1].f = a1;
+    args[2].f = a2;
+    args[3].f = a3;
+    args[4].f = a4;
+    args[5].f = a5;
+    args[6].f = a6;
+    args[7].z = a7;
+    args[8].i = a8;
+    args[9].i = a9;
+    args[10].i = a10;
+    args[11].i = a11;
+    args[12].f = a12;
+    args[13].z = a13;
+
+    jobject temp = env->CallObjectMethodA(wrapped_obj, jSyncFrameMetrics, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+
+    jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
+    return ret;
+}
+
+jobject GeckoLayerClient::SyncViewportInfo(int32_t a0, int32_t a1, int32_t a2, int32_t a3, jfloat a4, bool a5) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jvalue args[6];
+    args[0].i = a0;
+    args[1].i = a1;
+    args[2].i = a2;
+    args[3].i = a3;
+    args[4].f = a4;
+    args[5].z = a5;
+
+    jobject temp = env->CallObjectMethodA(wrapped_obj, jSyncViewportInfo, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+
+    jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
+    return ret;
+}
+jclass ImmutableViewportMetrics::mImmutableViewportMetricsClass = 0;
+jmethodID ImmutableViewportMetrics::jImmutableViewportMetrics = 0;
+void ImmutableViewportMetrics::InitStubs(JNIEnv *jEnv) {
+    initInit();
+
+    mImmutableViewportMetricsClass = getClassGlobalRef("org/mozilla/gecko/gfx/ImmutableViewportMetrics");
+    jImmutableViewportMetrics = getMethod("<init>", "(FFFFFFFFFFFFF)V");
+}
+
+ImmutableViewportMetrics* ImmutableViewportMetrics::Wrap(jobject obj) {
+    JNIEnv *env = GetJNIForThread();
+
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return NULL;
+    }
+
+    ImmutableViewportMetrics* ret = new ImmutableViewportMetrics(obj, env);
+    env->DeleteLocalRef(obj);
+    return ret;
+}
+
+ImmutableViewportMetrics::ImmutableViewportMetrics(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, jfloat a5, jfloat a6, jfloat a7, jfloat a8, jfloat a9, jfloat a10, jfloat a11, jfloat a12) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jvalue args[13];
+    args[0].f = a0;
+    args[1].f = a1;
+    args[2].f = a2;
+    args[3].f = a3;
+    args[4].f = a4;
+    args[5].f = a5;
+    args[6].f = a6;
+    args[7].f = a7;
+    args[8].f = a8;
+    args[9].f = a9;
+    args[10].f = a10;
+    args[11].f = a11;
+    args[12].f = a12;
+
+    Init(env->NewObjectA(mImmutableViewportMetricsClass, jImmutableViewportMetrics, args), env);
+    env->PopLocalFrame(NULL);
+}
+jclass LayerView::mLayerViewClass = 0;
+jmethodID LayerView::jRegisterCompositorWrapper = 0;
+void LayerView::InitStubs(JNIEnv *jEnv) {
+    initInit();
+
+    mLayerViewClass = getClassGlobalRef("org/mozilla/gecko/gfx/LayerView");
+    jRegisterCompositorWrapper = getStaticMethod("registerCxxCompositor", "()Lorg/mozilla/gecko/gfx/GLController;");
+}
+
+LayerView* LayerView::Wrap(jobject obj) {
+    JNIEnv *env = GetJNIForThread();
+
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return NULL;
+    }
+
+    LayerView* ret = new LayerView(obj, env);
+    env->DeleteLocalRef(obj);
+    return ret;
+}
+
+jobject LayerView::RegisterCompositorWrapper() {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
@@ -2542,47 +3585,72 @@ jobject AndroidBridge::RegisterComposito
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
     return ret;
 }
-
-void AndroidBridge::PostDelayedCallbackWrapper(jobject aTarget, int64_t a0) {
+jclass NativePanZoomController::mNativePanZoomControllerClass = 0;
+jmethodID NativePanZoomController::jPostDelayedCallbackWrapper = 0;
+jmethodID NativePanZoomController::jRequestContentRepaintWrapper = 0;
+void NativePanZoomController::InitStubs(JNIEnv *jEnv) {
+    initInit();
+
+    mNativePanZoomControllerClass = getClassGlobalRef("org/mozilla/gecko/gfx/NativePanZoomController");
+    jPostDelayedCallbackWrapper = getMethod("postDelayedCallback", "(J)V");
+    jRequestContentRepaintWrapper = getMethod("requestContentRepaint", "(FFFFF)V");
+}
+
+NativePanZoomController* NativePanZoomController::Wrap(jobject obj) {
+    JNIEnv *env = GetJNIForThread();
+
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return NULL;
+    }
+
+    NativePanZoomController* ret = new NativePanZoomController(obj, env);
+    env->DeleteLocalRef(obj);
+    return ret;
+}
+
+void NativePanZoomController::PostDelayedCallbackWrapper(int64_t a0) {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
-    env->CallVoidMethod(aTarget, jPostDelayedCallbackWrapper, a0);
+    env->CallVoidMethod(wrapped_obj, jPostDelayedCallbackWrapper, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
 
-void AndroidBridge::RequestContentRepaintWrapper(jobject aTarget, jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4) {
+void NativePanZoomController::RequestContentRepaintWrapper(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4) {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
@@ -2593,30 +3661,795 @@ void AndroidBridge::RequestContentRepain
 
     jvalue args[5];
     args[0].f = a0;
     args[1].f = a1;
     args[2].f = a2;
     args[3].f = a3;
     args[4].f = a4;
 
-    env->CallVoidMethodA(aTarget, jRequestContentRepaintWrapper, args);
+    env->CallVoidMethodA(wrapped_obj, jRequestContentRepaintWrapper, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+
+    env->PopLocalFrame(NULL);
+}
+jclass ProgressiveUpdateData::mProgressiveUpdateDataClass = 0;
+jmethodID ProgressiveUpdateData::jProgressiveUpdateData = 0;
+jmethodID ProgressiveUpdateData::jsetViewport = 0;
+jfieldID ProgressiveUpdateData::jabort = 0;
+jfieldID ProgressiveUpdateData::jheight = 0;
+jfieldID ProgressiveUpdateData::jscale = 0;
+jfieldID ProgressiveUpdateData::jwidth = 0;
+jfieldID ProgressiveUpdateData::jx = 0;
+jfieldID ProgressiveUpdateData::jy = 0;
+void ProgressiveUpdateData::InitStubs(JNIEnv *jEnv) {
+    initInit();
+
+    mProgressiveUpdateDataClass = getClassGlobalRef("org/mozilla/gecko/gfx/ProgressiveUpdateData");
+    jProgressiveUpdateData = getMethod("<init>", "()V");
+    jsetViewport = getMethod("setViewport", "(Lorg/mozilla/gecko/gfx/ImmutableViewportMetrics;)V");
+    jabort = getField("abort", "Z");
+    jheight = getField("height", "F");
+    jscale = getField("scale", "F");
+    jwidth = getField("width", "F");
+    jx = getField("x", "F");
+    jy = getField("y", "F");
+}
+
+ProgressiveUpdateData* ProgressiveUpdateData::Wrap(jobject obj) {
+    JNIEnv *env = GetJNIForThread();
+
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return NULL;
+    }
+
+    ProgressiveUpdateData* ret = new ProgressiveUpdateData(obj, env);
+    env->DeleteLocalRef(obj);
+    return ret;
+}
+
+ProgressiveUpdateData::ProgressiveUpdateData() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    Init(env->NewObject(mProgressiveUpdateDataClass, jProgressiveUpdateData), env);
+    env->PopLocalFrame(NULL);
+}
+
+void ProgressiveUpdateData::setViewport(jobject a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallVoidMethod(wrapped_obj, jsetViewport, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
+    env->PopLocalFrame(NULL);
+}
+
+bool ProgressiveUpdateData::getabort() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return false;
+    }
+
+    return env->GetBooleanField(wrapped_obj, jabort);
+}
+
+void ProgressiveUpdateData::setabort(bool a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetBooleanField(wrapped_obj, jabort, a0);
+}
+
+jfloat ProgressiveUpdateData::getheight() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0.0;
+    }
+
+    return env->GetFloatField(wrapped_obj, jheight);
+}
+
+void ProgressiveUpdateData::setheight(jfloat a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetFloatField(wrapped_obj, jheight, a0);
+}
+
+jfloat ProgressiveUpdateData::getscale() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0.0;
+    }
+
+    return env->GetFloatField(wrapped_obj, jscale);
+}
+
+void ProgressiveUpdateData::setscale(jfloat a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetFloatField(wrapped_obj, jscale, a0);
+}
+
+jfloat ProgressiveUpdateData::getwidth() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0.0;
+    }
+
+    return env->GetFloatField(wrapped_obj, jwidth);
+}
+
+void ProgressiveUpdateData::setwidth(jfloat a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetFloatField(wrapped_obj, jwidth, a0);
+}
+
+jfloat ProgressiveUpdateData::getx() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0.0;
+    }
+
+    return env->GetFloatField(wrapped_obj, jx);
+}
+
+void ProgressiveUpdateData::setx(jfloat a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetFloatField(wrapped_obj, jx, a0);
+}
+
+jfloat ProgressiveUpdateData::gety() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0.0;
+    }
+
+    return env->GetFloatField(wrapped_obj, jy);
+}
+
+void ProgressiveUpdateData::sety(jfloat a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetFloatField(wrapped_obj, jy, a0);
+}
+jclass ViewTransform::mViewTransformClass = 0;
+jmethodID ViewTransform::jViewTransform = 0;
+jfieldID ViewTransform::jfixedLayerMarginBottom = 0;
+jfieldID ViewTransform::jfixedLayerMarginLeft = 0;
+jfieldID ViewTransform::jfixedLayerMarginRight = 0;
+jfieldID ViewTransform::jfixedLayerMarginTop = 0;
+jfieldID ViewTransform::joffsetX = 0;
+jfieldID ViewTransform::joffsetY = 0;
+jfieldID ViewTransform::jscale = 0;
+jfieldID ViewTransform::jx = 0;
+jfieldID ViewTransform::jy = 0;
+void ViewTransform::InitStubs(JNIEnv *jEnv) {
+    initInit();
+
+    mViewTransformClass = getClassGlobalRef("org/mozilla/gecko/gfx/ViewTransform");
+    jViewTransform = getMethod("<init>", "(FFF)V");
+    jfixedLayerMarginBottom = getField("fixedLayerMarginBottom", "F");
+    jfixedLayerMarginLeft = getField("fixedLayerMarginLeft", "F");
+    jfixedLayerMarginRight = getField("fixedLayerMarginRight", "F");
+    jfixedLayerMarginTop = getField("fixedLayerMarginTop", "F");
+    joffsetX = getField("offsetX", "F");
+    joffsetY = getField("offsetY", "F");
+    jscale = getField("scale", "F");
+    jx = getField("x", "F");
+    jy = getField("y", "F");
+}
+
+ViewTransform* ViewTransform::Wrap(jobject obj) {
+    JNIEnv *env = GetJNIForThread();
+
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return NULL;
+    }
+
+    ViewTransform* ret = new ViewTransform(obj, env);
+    env->DeleteLocalRef(obj);
+    return ret;
+}
+
+ViewTransform::ViewTransform(jfloat a0, jfloat a1, jfloat a2) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jvalue args[3];
+    args[0].f = a0;
+    args[1].f = a1;
+    args[2].f = a2;
+
+    Init(env->NewObjectA(mViewTransformClass, jViewTransform, args), env);
     env->PopLocalFrame(NULL);
 }
 
-jstring AndroidBridge::GetClipboardTextWrapper() {
-    JNIEnv *env = GetJNIEnv();
+jfloat ViewTransform::getfixedLayerMarginBottom() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0.0;
+    }
+
+    return env->GetFloatField(wrapped_obj, jfixedLayerMarginBottom);
+}
+
+void ViewTransform::setfixedLayerMarginBottom(jfloat a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetFloatField(wrapped_obj, jfixedLayerMarginBottom, a0);
+}
+
+jfloat ViewTransform::getfixedLayerMarginLeft() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0.0;
+    }
+
+    return env->GetFloatField(wrapped_obj, jfixedLayerMarginLeft);
+}
+
+void ViewTransform::setfixedLayerMarginLeft(jfloat a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetFloatField(wrapped_obj, jfixedLayerMarginLeft, a0);
+}
+
+jfloat ViewTransform::getfixedLayerMarginRight() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0.0;
+    }
+
+    return env->GetFloatField(wrapped_obj, jfixedLayerMarginRight);
+}
+
+void ViewTransform::setfixedLayerMarginRight(jfloat a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetFloatField(wrapped_obj, jfixedLayerMarginRight, a0);
+}
+
+jfloat ViewTransform::getfixedLayerMarginTop() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0.0;
+    }
+
+    return env->GetFloatField(wrapped_obj, jfixedLayerMarginTop);
+}
+
+void ViewTransform::setfixedLayerMarginTop(jfloat a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetFloatField(wrapped_obj, jfixedLayerMarginTop, a0);
+}
+
+jfloat ViewTransform::getoffsetX() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0.0;
+    }
+
+    return env->GetFloatField(wrapped_obj, joffsetX);
+}
+
+void ViewTransform::setoffsetX(jfloat a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetFloatField(wrapped_obj, joffsetX, a0);
+}
+
+jfloat ViewTransform::getoffsetY() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0.0;
+    }
+
+    return env->GetFloatField(wrapped_obj, joffsetY);
+}
+
+void ViewTransform::setoffsetY(jfloat a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetFloatField(wrapped_obj, joffsetY, a0);
+}
+
+jfloat ViewTransform::getscale() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0.0;
+    }
+
+    return env->GetFloatField(wrapped_obj, jscale);
+}
+
+void ViewTransform::setscale(jfloat a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetFloatField(wrapped_obj, jscale, a0);
+}
+
+jfloat ViewTransform::getx() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0.0;
+    }
+
+    return env->GetFloatField(wrapped_obj, jx);
+}
+
+void ViewTransform::setx(jfloat a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetFloatField(wrapped_obj, jx, a0);
+}
+
+jfloat ViewTransform::gety() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0.0;
+    }
+
+    return env->GetFloatField(wrapped_obj, jy);
+}
+
+void ViewTransform::sety(jfloat a0) {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    env->SetFloatField(wrapped_obj, jy, a0);
+}
+jclass NativeZip::mNativeZipClass = 0;
+jmethodID NativeZip::jCreateInputStream = 0;
+void NativeZip::InitStubs(JNIEnv *jEnv) {
+    initInit();
+
+    mNativeZipClass = getClassGlobalRef("org/mozilla/gecko/mozglue/NativeZip");
+    jCreateInputStream = getMethod("createInputStream", "(Ljava/nio/ByteBuffer;I)Ljava/io/InputStream;");
+}
+
+NativeZip* NativeZip::Wrap(jobject obj) {
+    JNIEnv *env = GetJNIForThread();
+
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return NULL;
+    }
+
+    NativeZip* ret = new NativeZip(obj, env);
+    env->DeleteLocalRef(obj);
+    return ret;
+}
+
+jobject NativeZip::CreateInputStream(jobject a0, int32_t a1) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(2) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jobject temp = env->CallObjectMethod(wrapped_obj, jCreateInputStream, a0, a1);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+
+    jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
+    return ret;
+}
+jclass MatrixBlobCursor::mMatrixBlobCursorClass = 0;
+jmethodID MatrixBlobCursor::jMatrixBlobCursor = 0;
+jmethodID MatrixBlobCursor::jMatrixBlobCursor0 = 0;
+jmethodID MatrixBlobCursor::jAddRow = 0;
+jmethodID MatrixBlobCursor::jAddRow1 = 0;
+jmethodID MatrixBlobCursor::jAddRow2 = 0;
+void MatrixBlobCursor::InitStubs(JNIEnv *jEnv) {
+    initInit();
+
+    mMatrixBlobCursorClass = getClassGlobalRef("org/mozilla/gecko/sqlite/MatrixBlobCursor");
+    jMatrixBlobCursor = getMethod("<init>", "([Ljava/lang/String;)V");
+    jMatrixBlobCursor0 = getMethod("<init>", "([Ljava/lang/String;I)V");
+    jAddRow = getMethod("addRow", "(Ljava/lang/Iterable;)V");
+    jAddRow1 = getMethod("addRow", "(Ljava/util/ArrayList;I)V");
+    jAddRow2 = getMethod("addRow", "([Ljava/lang/Object;)V");
+}
+
+MatrixBlobCursor* MatrixBlobCursor::Wrap(jobject obj) {
+    JNIEnv *env = GetJNIForThread();
+
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return NULL;
+    }
+
+    MatrixBlobCursor* ret = new MatrixBlobCursor(obj, env);
+    env->DeleteLocalRef(obj);
+    return ret;
+}
+
+MatrixBlobCursor::MatrixBlobCursor(jobjectArray a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    Init(env->NewObject(mMatrixBlobCursorClass, jMatrixBlobCursor, a0), env);
+    env->PopLocalFrame(NULL);
+}
+
+MatrixBlobCursor::MatrixBlobCursor(jobjectArray a0, int32_t a1) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    Init(env->NewObject(mMatrixBlobCursorClass, jMatrixBlobCursor0, a0, a1), env);
+    env->PopLocalFrame(NULL);
+}
+
+void MatrixBlobCursor::AddRow(jobject a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallVoidMethod(wrapped_obj, jAddRow, a0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+
+    env->PopLocalFrame(NULL);
+}
+
+void MatrixBlobCursor::AddRow(jobject a0, int32_t a1) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallVoidMethod(wrapped_obj, jAddRow1, a0, a1);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+
+    env->PopLocalFrame(NULL);
+}
+
+void MatrixBlobCursor::AddRow(jobjectArray a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallVoidMethod(wrapped_obj, jAddRow2, a0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+
+    env->PopLocalFrame(NULL);
+}
+jclass SQLiteBridgeException::mSQLiteBridgeExceptionClass = 0;
+jmethodID SQLiteBridgeException::jSQLiteBridgeException = 0;
+jmethodID SQLiteBridgeException::jSQLiteBridgeException0 = 0;
+jfieldID SQLiteBridgeException::jserialVersionUID = 0;
+void SQLiteBridgeException::InitStubs(JNIEnv *jEnv) {
+    initInit();
+
+    mSQLiteBridgeExceptionClass = getClassGlobalRef("org/mozilla/gecko/sqlite/SQLiteBridgeException");
+    jSQLiteBridgeException = getMethod("<init>", "()V");
+    jSQLiteBridgeException0 = getMethod("<init>", "(Ljava/lang/String;)V");
+    jserialVersionUID = getStaticField("serialVersionUID", "J");
+}
+
+SQLiteBridgeException* SQLiteBridgeException::Wrap(jobject obj) {
+    JNIEnv *env = GetJNIForThread();
+
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return NULL;
+    }
+
+    SQLiteBridgeException* ret = new SQLiteBridgeException(obj, env);
+    env->DeleteLocalRef(obj);
+    return ret;
+}
+
+SQLiteBridgeException::SQLiteBridgeException() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    Init(env->NewObject(mSQLiteBridgeExceptionClass, jSQLiteBridgeException), env);
+    env->PopLocalFrame(NULL);
+}
+
+SQLiteBridgeException::SQLiteBridgeException(const nsAString& a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
+
+    Init(env->NewObject(mSQLiteBridgeExceptionClass, jSQLiteBridgeException0, j0), env);
+    env->PopLocalFrame(NULL);
+}
+
+int64_t SQLiteBridgeException::getserialVersionUID() {
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0;
+    }
+
+    return env->GetStaticLongField(mSQLiteBridgeExceptionClass, jserialVersionUID);
+}
+jclass Clipboard::mClipboardClass = 0;
+jmethodID Clipboard::jClearText = 0;
+jmethodID Clipboard::jGetClipboardTextWrapper = 0;
+jmethodID Clipboard::jHasText = 0;
+jmethodID Clipboard::jSetClipboardText = 0;
+void Clipboard::InitStubs(JNIEnv *jEnv) {
+    initInit();
+
+    mClipboardClass = getClassGlobalRef("org/mozilla/gecko/util/Clipboard");
+    jClearText = getStaticMethod("clearText", "()V");
+    jGetClipboardTextWrapper = getStaticMethod("getText", "()Ljava/lang/String;");
+    jHasText = getStaticMethod("hasText", "()Z");
+    jSetClipboardText = getStaticMethod("setText", "(Ljava/lang/CharSequence;)V");
+}
+
+Clipboard* Clipboard::Wrap(jobject obj) {
+    JNIEnv *env = GetJNIForThread();
+
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return NULL;
+    }
+
+    Clipboard* ret = new Clipboard(obj, env);
+    env->DeleteLocalRef(obj);
+    return ret;
+}
+
+void Clipboard::ClearText() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mClipboardClass, jClearText);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+
+    env->PopLocalFrame(NULL);
+}
+
+jstring Clipboard::GetClipboardTextWrapper() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
@@ -2628,39 +4461,92 @@ jstring AndroidBridge::GetClipboardTextW
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return nullptr;
     }
+
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
-void AndroidBridge::SetClipboardText(const nsAString& a0) {
-    JNIEnv *env = GetJNIEnv();
+bool Clipboard::HasText() {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return false;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return false;
+    }
+
+    bool temp = env->CallStaticBooleanMethod(mClipboardClass, jHasText);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return false;
+    }
+
+    env->PopLocalFrame(NULL);
+    return temp;
+}
+
+void Clipboard::SetClipboardText(const nsAString& a0) {
+    JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
 
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
-    jstring j0 = NewJavaString(env, a0);
+    jstring j0 = AndroidBridge::NewJavaString(env, a0);
 
     env->CallStaticVoidMethod(mClipboardClass, jSetClipboardText, j0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         env->PopLocalFrame(NULL);
         return;
     }
+
     env->PopLocalFrame(NULL);
 }
+
+void InitStubs(JNIEnv *jEnv) {
+    GeckoAppShell::InitStubs(jEnv);
+    JavaDomKeyLocation::InitStubs(jEnv);
+    GeckoJavaSampler::InitStubs(jEnv);
+    SurfaceBits::InitStubs(jEnv);
+    ThumbnailHelper::InitStubs(jEnv);
+    DisplayPortMetrics::InitStubs(jEnv);
+    GLController::InitStubs(jEnv);
+    GeckoLayerClient::InitStubs(jEnv);
+    ImmutableViewportMetrics::InitStubs(jEnv);
+    LayerView::InitStubs(jEnv);
+    NativePanZoomController::InitStubs(jEnv);
+    ProgressiveUpdateData::InitStubs(jEnv);
+    ViewTransform::InitStubs(jEnv);
+    NativeZip::InitStubs(jEnv);
+    MatrixBlobCursor::InitStubs(jEnv);
+    SQLiteBridgeException::InitStubs(jEnv);
+    Clipboard::InitStubs(jEnv);
+}
+} /* android */
+} /* widget */
+} /* mozilla */
--- a/widget/android/GeneratedJNIWrappers.h
+++ b/widget/android/GeneratedJNIWrappers.h
@@ -1,206 +1,505 @@
-protected:
-
-
-jclass mGeckoAppShellClass;
-jmethodID jAcknowledgeEvent;
-jmethodID jAddPluginViewWrapper;
-jmethodID jAlertsProgressListener_OnProgress;
-jmethodID jCancelVibrate;
-jmethodID jCheckURIVisited;
-jmethodID jClearMessageList;
-jmethodID jCloseCamera;
-jmethodID jCloseNotification;
-jmethodID jCreateMessageListWrapper;
-jmethodID jCreateShortcut;
-jmethodID jDeleteMessageWrapper;
-jmethodID jDisableBatteryNotifications;
-jmethodID jDisableNetworkNotifications;
-jmethodID jDisableScreenOrientationNotifications;
-jmethodID jDisableSensor;
-jmethodID jEnableBatteryNotifications;
-jmethodID jEnableLocation;
-jmethodID jEnableLocationHighAccuracy;
-jmethodID jEnableNetworkNotifications;
-jmethodID jEnableScreenOrientationNotifications;
-jmethodID jEnableSensor;
-jmethodID jGetContext;
-jmethodID jGetCurrentBatteryInformationWrapper;
-jmethodID jGetCurrentNetworkInformationWrapper;
-jmethodID jGetDensity;
-jmethodID jGetDpiWrapper;
-jmethodID jGetExtensionFromMimeTypeWrapper;
-jmethodID jGetHandlersForMimeTypeWrapper;
-jmethodID jGetHandlersForURLWrapper;
-jmethodID jGetIconForExtensionWrapper;
-jmethodID jGetMessageWrapper;
-jmethodID jGetMimeTypeFromExtensionsWrapper;
-jmethodID jGetNextMessageInListWrapper;
-jmethodID jGetProxyForURIWrapper;
-jmethodID jGetScreenDepthWrapper;
-jmethodID jGetScreenOrientationWrapper;
-jmethodID jGetShowPasswordSetting;
-jmethodID jGetSystemColoursWrapper;
-jmethodID jHandleGeckoMessageWrapper;
-jmethodID jHideProgressDialog;
-jmethodID jInitCameraWrapper;
-jmethodID jIsNetworkLinkKnown;
-jmethodID jIsNetworkLinkUp;
-jmethodID jIsTablet;
-jmethodID jKillAnyZombies;
-jmethodID jLockScreenOrientation;
-jmethodID jMarkURIVisited;
-jmethodID jMoveTaskToBack;
-jmethodID jNetworkLinkType;
-jmethodID jNotifyDefaultPrevented;
-jmethodID jNotifyIME;
-jmethodID jNotifyIMEChange;
-jmethodID jNotifyIMEContext;
-jmethodID jNotifyWakeLockChanged;
-jmethodID jNotifyXreExit;
-jmethodID jOpenUriExternal;
-jmethodID jPerformHapticFeedback;
-jmethodID jPumpMessageLoop;
-jmethodID jRegisterSurfaceTextureFrameListener;
-jmethodID jRemovePluginView;
-jmethodID jScanMedia;
-jmethodID jScheduleRestart;
-jmethodID jSendMessageWrapper;
-jmethodID jSetFullScreen;
-jmethodID jSetKeepScreenOn;
-jmethodID jSetSelectedLocale;
-jmethodID jSetURITitle;
-jmethodID jShowAlertNotificationWrapper;
-jmethodID jShowFilePickerAsyncWrapper;
-jmethodID jShowFilePickerForExtensionsWrapper;
-jmethodID jShowFilePickerForMimeTypeWrapper;
-jmethodID jShowInputMethodPicker;
-jmethodID jUnlockProfile;
-jmethodID jUnlockScreenOrientation;
-jmethodID jUnregisterSurfaceTextureFrameListener;
-jmethodID jVibrate1;
-jmethodID jVibrateA;
-
-jclass mGeckoJavaSamplerClass;
-jmethodID jGetFrameNameJavaProfilingWrapper;
-jmethodID jGetSampleTimeJavaProfiling;
-jmethodID jGetThreadNameJavaProfilingWrapper;
-jmethodID jPauseJavaProfiling;
-jmethodID jStartJavaProfiling;
-jmethodID jStopJavaProfiling;
-jmethodID jUnpauseJavaProfiling;
-
-jclass mThumbnailHelperClass;
-jmethodID jSendThumbnail;
-
-jclass mGLControllerClass;
-jmethodID jCreateEGLSurfaceForCompositorWrapper;
-
-jclass mLayerViewClass;
-jmethodID jRegisterCompositorWrapper;
-
-jclass mNativePanZoomControllerClass;
-jmethodID jPostDelayedCallbackWrapper;
-jmethodID jRequestContentRepaintWrapper;
-
-jclass mClipboardClass;
-jmethodID jGetClipboardTextWrapper;
-jmethodID jSetClipboardText;
-
 // GENERATED CODE
 // Generated by the Java program at /build/annotationProcessors at compile time from
 // annotations on Java methods. To update, change the annotations on the corresponding Java
 // methods and rerun the build. Manually updating this file will cause your build to fail.
 
+#ifndef GeneratedJNIWrappers_h__
+#define GeneratedJNIWrappers_h__
+
+#include "nsXPCOMStrings.h"
+#include "AndroidJavaWrappers.h"
+
+namespace mozilla {
+namespace widget {
+namespace android {
+void InitStubs(JNIEnv *jEnv);
+
+class GeckoAppShell : public AutoGlobalWrappedJavaObject {
 public:
+    static void InitStubs(JNIEnv *jEnv);
+    static GeckoAppShell* Wrap(jobject obj);
+    GeckoAppShell(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};
+    static void AcknowledgeEvent();
+    static void AddPluginViewWrapper(jobject a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, bool a5);
+    static void AlertsProgressListener_OnProgress(const nsAString& a0, int64_t a1, int64_t a2, const nsAString& a3);
+    static void CancelVibrate();
+    static void CheckURIVisited(const nsAString& a0);
+    static void ClearMessageList(int32_t a0);
+    static void CloseCamera();
+    static void CloseNotification(const nsAString& a0);
+    static void CreateMessageListWrapper(int64_t a0, int64_t a1, jobjectArray a2, int32_t a3, int32_t a4, bool a5, int32_t a6);
+    static void CreateShortcut(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3);
+    static void DeleteMessageWrapper(int32_t a0, int32_t a1);
+    static void DisableBatteryNotifications();
+    static void DisableNetworkNotifications();
+    static void DisableScreenOrientationNotifications();
+    static void DisableSensor(int32_t a0);
+    static void EnableBatteryNotifications();
+    static void EnableLocation(bool a0);
+    static void EnableLocationHighAccuracy(bool a0);
+    static void EnableNetworkNotifications();
+    static void EnableScreenOrientationNotifications();
+    static void EnableSensor(int32_t a0);
+    static jobject GetContext();
+    static jdoubleArray GetCurrentBatteryInformationWrapper();
+    static jdoubleArray GetCurrentNetworkInformationWrapper();
+    static jfloat GetDensity();
+    static int32_t GetDpiWrapper();
+    static jstring GetExtensionFromMimeTypeWrapper(const nsAString& a0);
+    static jobjectArray GetHandlersForMimeTypeWrapper(const nsAString& a0, const nsAString& a1);
+    static jobjectArray GetHandlersForURLWrapper(const nsAString& a0, const nsAString& a1);
+    static jbyteArray GetIconForExtensionWrapper(const nsAString& a0, int32_t a1);
+    static void GetMessageWrapper(int32_t a0, int32_t a1);
+    static jstring GetMimeTypeFromExtensionsWrapper(const nsAString& a0);
+    static void GetNextMessageInListWrapper(int32_t a0, int32_t a1);
+    static jstring GetProxyForURIWrapper(const nsAString& a0, const nsAString& a1, const nsAString& a2, int32_t a3);
+    static int32_t GetScreenDepthWrapper();
+    static int16_t GetScreenOrientationWrapper();
+    static bool GetShowPasswordSetting();
+    static jintArray GetSystemColoursWrapper();
+    static jstring HandleGeckoMessageWrapper(const nsAString& a0);
+    static void HideProgressDialog();
+    static jintArray InitCameraWrapper(const nsAString& a0, int32_t a1, int32_t a2, int32_t a3);
+    static bool IsNetworkLinkKnown();
+    static bool IsNetworkLinkUp();
+    static bool IsTablet();
+    static void KillAnyZombies();
+    static void LockScreenOrientation(int32_t a0);
+    static void MarkURIVisited(const nsAString& a0);
+    static void MoveTaskToBack();
+    static int32_t NetworkLinkType();
+    static void NotifyDefaultPrevented(bool a0);
+    static void NotifyIME(int32_t a0);
+    static void NotifyIMEChange(const nsAString& a0, int32_t a1, int32_t a2, int32_t a3);
+    static void NotifyIMEContext(int32_t a0, const nsAString& a1, const nsAString& a2, const nsAString& a3);
+    static void NotifyWakeLockChanged(const nsAString& a0, const nsAString& a1);
+    static void NotifyXreExit();
+    static bool OpenUriExternal(const nsAString& a0, const nsAString& a1, const nsAString& a2 = EmptyString(), const nsAString& a3 = EmptyString(), const nsAString& a4 = EmptyString(), const nsAString& a5 = EmptyString());
+    static void PerformHapticFeedback(bool a0);
+    static bool PumpMessageLoop();
+    static void RegisterSurfaceTextureFrameListener(jobject a0, int32_t a1);
+    static void RemovePluginView(jobject a0, bool a1);
+    static void ScanMedia(const nsAString& a0, const nsAString& a1);
+    static void ScheduleRestart();
+    static void SendMessageWrapper(const nsAString& a0, const nsAString& a1, int32_t a2);
+    static void SetFullScreen(bool a0);
+    static void SetKeepScreenOn(bool a0);
+    static void SetSelectedLocale(const nsAString& a0);
+    static void SetURITitle(const nsAString& a0, const nsAString& a1);
+    static void ShowAlertNotificationWrapper(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3, const nsAString& a4);
+    static void ShowFilePickerAsyncWrapper(const nsAString& a0, int64_t a1);
+    static jstring ShowFilePickerForExtensionsWrapper(const nsAString& a0);
+    static jstring ShowFilePickerForMimeTypeWrapper(const nsAString& a0);
+    static void ShowInputMethodPicker();
+    static bool UnlockProfile();
+    static void UnlockScreenOrientation();
+    static void UnregisterSurfaceTextureFrameListener(jobject a0);
+    static void Vibrate1(int64_t a0);
+    static void VibrateA(jlongArray a0, int32_t a1);
+    GeckoAppShell() : AutoGlobalWrappedJavaObject() {};
+protected:
+    static jclass mGeckoAppShellClass;
+    static jmethodID jAcknowledgeEvent;
+    static jmethodID jAddPluginViewWrapper;
+    static jmethodID jAlertsProgressListener_OnProgress;
+    static jmethodID jCancelVibrate;
+    static jmethodID jCheckURIVisited;
+    static jmethodID jClearMessageList;
+    static jmethodID jCloseCamera;
+    static jmethodID jCloseNotification;
+    static jmethodID jCreateMessageListWrapper;
+    static jmethodID jCreateShortcut;
+    static jmethodID jDeleteMessageWrapper;
+    static jmethodID jDisableBatteryNotifications;
+    static jmethodID jDisableNetworkNotifications;
+    static jmethodID jDisableScreenOrientationNotifications;
+    static jmethodID jDisableSensor;
+    static jmethodID jEnableBatteryNotifications;
+    static jmethodID jEnableLocation;
+    static jmethodID jEnableLocationHighAccuracy;
+    static jmethodID jEnableNetworkNotifications;
+    static jmethodID jEnableScreenOrientationNotifications;
+    static jmethodID jEnableSensor;
+    static jmethodID jGetContext;
+    static jmethodID jGetCurrentBatteryInformationWrapper;
+    static jmethodID jGetCurrentNetworkInformationWrapper;
+    static jmethodID jGetDensity;
+    static jmethodID jGetDpiWrapper;
+    static jmethodID jGetExtensionFromMimeTypeWrapper;
+    static jmethodID jGetHandlersForMimeTypeWrapper;
+    static jmethodID jGetHandlersForURLWrapper;
+    static jmethodID jGetIconForExtensionWrapper;
+    static jmethodID jGetMessageWrapper;
+    static jmethodID jGetMimeTypeFromExtensionsWrapper;
+    static jmethodID jGetNextMessageInListWrapper;
+    static jmethodID jGetProxyForURIWrapper;
+    static jmethodID jGetScreenDepthWrapper;
+    static jmethodID jGetScreenOrientationWrapper;
+    static jmethodID jGetShowPasswordSetting;
+    static jmethodID jGetSystemColoursWrapper;
+    static jmethodID jHandleGeckoMessageWrapper;
+    static jmethodID jHideProgressDialog;
+    static jmethodID jInitCameraWrapper;
+    static jmethodID jIsNetworkLinkKnown;
+    static jmethodID jIsNetworkLinkUp;
+    static jmethodID jIsTablet;
+    static jmethodID jKillAnyZombies;
+    static jmethodID jLockScreenOrientation;
+    static jmethodID jMarkURIVisited;
+    static jmethodID jMoveTaskToBack;
+    static jmethodID jNetworkLinkType;
+    static jmethodID jNotifyDefaultPrevented;
+    static jmethodID jNotifyIME;
+    static jmethodID jNotifyIMEChange;
+    static jmethodID jNotifyIMEContext;
+    static jmethodID jNotifyWakeLockChanged;
+    static jmethodID jNotifyXreExit;
+    static jmethodID jOpenUriExternal;
+    static jmethodID jPerformHapticFeedback;
+    static jmethodID jPumpMessageLoop;
+    static jmethodID jRegisterSurfaceTextureFrameListener;
+    static jmethodID jRemovePluginView;
+    static jmethodID jScanMedia;
+    static jmethodID jScheduleRestart;
+    static jmethodID jSendMessageWrapper;
+    static jmethodID jSetFullScreen;
+    static jmethodID jSetKeepScreenOn;
+    static jmethodID jSetSelectedLocale;
+    static jmethodID jSetURITitle;
+    static jmethodID jShowAlertNotificationWrapper;
+    static jmethodID jShowFilePickerAsyncWrapper;
+    static jmethodID jShowFilePickerForExtensionsWrapper;
+    static jmethodID jShowFilePickerForMimeTypeWrapper;
+    static jmethodID jShowInputMethodPicker;
+    static jmethodID jUnlockProfile;
+    static jmethodID jUnlockScreenOrientation;
+    static jmethodID jUnregisterSurfaceTextureFrameListener;
+    static jmethodID jVibrate1;
+    static jmethodID jVibrateA;
+};
+
+class JavaDomKeyLocation : public AutoGlobalWrappedJavaObject {
+public:
+    static void InitStubs(JNIEnv *jEnv);
+    static JavaDomKeyLocation* Wrap(jobject obj);
+    JavaDomKeyLocation(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};
+    static jobject valueOf(const nsAString& a0);
+    static jobjectArray values();
+    static jobject getDOM_KEY_LOCATION_JOYSTICK();
+    static jobject getDOM_KEY_LOCATION_LEFT();
+    static jobject getDOM_KEY_LOCATION_MOBILE();
+    static jobject getDOM_KEY_LOCATION_NUMPAD();
+    static jobject getDOM_KEY_LOCATION_RIGHT();
+    static jobject getDOM_KEY_LOCATION_STANDARD();
+    int32_t getvalue();
+    JavaDomKeyLocation() : AutoGlobalWrappedJavaObject() {};
+protected:
+    static jclass mDomKeyLocationClass;
+    static jmethodID jvalueOf;
+    static jmethodID jvalues;
+    static jfieldID jDOM_KEY_LOCATION_JOYSTICK;
+    static jfieldID jDOM_KEY_LOCATION_LEFT;
+    static jfieldID jDOM_KEY_LOCATION_MOBILE;
+    static jfieldID jDOM_KEY_LOCATION_NUMPAD;
+    static jfieldID jDOM_KEY_LOCATION_RIGHT;
+    static jfieldID jDOM_KEY_LOCATION_STANDARD;
+    static jfieldID jvalue;
+};
+
+class GeckoJavaSampler : public AutoGlobalWrappedJavaObject {
+public:
+    static void InitStubs(JNIEnv *jEnv);
+    static GeckoJavaSampler* Wrap(jobject obj);
+    GeckoJavaSampler(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};
+    static jstring GetFrameNameJavaProfilingWrapper(int32_t a0, int32_t a1, int32_t a2);
+    static jdouble GetSampleTimeJavaProfiling(int32_t a0, int32_t a1);
+    static jstring GetThreadNameJavaProfilingWrapper(int32_t a0);
+    static void PauseJavaProfiling();
+    static void StartJavaProfiling(int32_t a0, int32_t a1);
+    static void StopJavaProfiling();
+    static void UnpauseJavaProfiling();
+    GeckoJavaSampler() : AutoGlobalWrappedJavaObject() {};
+protected:
+    static jclass mGeckoJavaSamplerClass;
+    static jmethodID jGetFrameNameJavaProfilingWrapper;
+    static jmethodID jGetSampleTimeJavaProfiling;
+    static jmethodID jGetThreadNameJavaProfilingWrapper;
+    static jmethodID jPauseJavaProfiling;
+    static jmethodID jStartJavaProfiling;
+    static jmethodID jStopJavaProfiling;
+    static jmethodID jUnpauseJavaProfiling;
+};
+
+class SurfaceBits : public AutoGlobalWrappedJavaObject {
+public:
+    static void InitStubs(JNIEnv *jEnv);
+    static SurfaceBits* Wrap(jobject obj);
+    SurfaceBits(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};
+    SurfaceBits();
+    jobject getbuffer();
+    void setbuffer(jobject a0);
+    int32_t getformat();
+    void setformat(int32_t a0);
+    int32_t getheight();
+    void setheight(int32_t a0);
+    int32_t getwidth();
+    void setwidth(int32_t a0);
+protected:
+    static jclass mSurfaceBitsClass;
+    static jmethodID jSurfaceBits;
+    static jfieldID jbuffer;
+    static jfieldID jformat;
+    static jfieldID jheight;
+    static jfieldID jwidth;
+};
 
-void AcknowledgeEvent();
-void AddPluginViewWrapper(jobject a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, bool a5);
-void AlertsProgressListener_OnProgress(const nsAString& a0, int64_t a1, int64_t a2, const nsAString& a3);
-void CancelVibrate();
-void CheckURIVisited(const nsAString& a0);
-void ClearMessageList(int32_t a0);
-void CloseCamera();
-void CloseNotification(const nsAString& a0);
-void CreateMessageListWrapper(int64_t a0, int64_t a1, jobjectArray a2, int32_t a3, int32_t a4, bool a5, int32_t a6);
-void CreateShortcut(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3);
-void DeleteMessageWrapper(int32_t a0, int32_t a1);
-void DisableBatteryNotifications();
-void DisableNetworkNotifications();
-void DisableScreenOrientationNotifications();
-void DisableSensor(int32_t a0);
-void EnableBatteryNotifications();
-void EnableLocation(bool a0);
-void EnableLocationHighAccuracy(bool a0);
-void EnableNetworkNotifications();
-void EnableScreenOrientationNotifications();
-void EnableSensor(int32_t a0);
-jobject GetContext();
-jdoubleArray GetCurrentBatteryInformationWrapper();
-jdoubleArray GetCurrentNetworkInformationWrapper();
-jfloat GetDensity();
-int32_t GetDpiWrapper();
-jstring GetExtensionFromMimeTypeWrapper(const nsAString& a0);
-jobjectArray GetHandlersForMimeTypeWrapper(const nsAString& a0, const nsAString& a1);
-jobjectArray GetHandlersForURLWrapper(const nsAString& a0, const nsAString& a1);
-jbyteArray GetIconForExtensionWrapper(const nsAString& a0, int32_t a1);
-void GetMessageWrapper(int32_t a0, int32_t a1);
-jstring GetMimeTypeFromExtensionsWrapper(const nsAString& a0);
-void GetNextMessageInListWrapper(int32_t a0, int32_t a1);
-jstring GetProxyForURIWrapper(const nsAString& a0, const nsAString& a1, const nsAString& a2, int32_t a3);
-int32_t GetScreenDepthWrapper();
-int16_t GetScreenOrientationWrapper();
-bool GetShowPasswordSetting();
-jintArray GetSystemColoursWrapper();
-jstring HandleGeckoMessageWrapper(const nsAString& a0);
-void HideProgressDialog();
-jintArray InitCameraWrapper(const nsAString& a0, int32_t a1, int32_t a2, int32_t a3);
-bool IsNetworkLinkKnown();
-bool IsNetworkLinkUp();
-bool IsTablet();
-void KillAnyZombies();
-void LockScreenOrientation(int32_t a0);
-void MarkURIVisited(const nsAString& a0);
-void MoveTaskToBack();
-int32_t NetworkLinkType();
-void NotifyDefaultPrevented(bool a0);
-static void NotifyIME(int32_t a0);
-static void NotifyIMEChange(const nsAString& a0, int32_t a1, int32_t a2, int32_t a3);
-static void NotifyIMEContext(int32_t a0, const nsAString& a1, const nsAString& a2, const nsAString& a3);
-void NotifyWakeLockChanged(const nsAString& a0, const nsAString& a1);
-void NotifyXreExit();
-bool OpenUriExternal(const nsAString& a0, const nsAString& a1, const nsAString& a2 = EmptyString(), const nsAString& a3 = EmptyString(), const nsAString& a4 = EmptyString(), const nsAString& a5 = EmptyString());
-void PerformHapticFeedback(bool a0);
-bool PumpMessageLoop();
-void RegisterSurfaceTextureFrameListener(jobject a0, int32_t a1);
-void RemovePluginView(jobject a0, bool a1);
-void ScanMedia(const nsAString& a0, const nsAString& a1);
-void ScheduleRestart();
-void SendMessageWrapper(const nsAString& a0, const nsAString& a1, int32_t a2);
-void SetFullScreen(bool a0);
-void SetKeepScreenOn(bool a0);
-void SetSelectedLocale(const nsAString& a0);
-void SetURITitle(const nsAString& a0, const nsAString& a1);
-void ShowAlertNotificationWrapper(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3, const nsAString& a4);
-void ShowFilePickerAsyncWrapper(const nsAString& a0, int64_t a1);
-jstring ShowFilePickerForExtensionsWrapper(const nsAString& a0);
-jstring ShowFilePickerForMimeTypeWrapper(const nsAString& a0);
-void ShowInputMethodPicker();
-bool UnlockProfile();
-void UnlockScreenOrientation();
-void UnregisterSurfaceTextureFrameListener(jobject a0);
-void Vibrate1(int64_t a0);
-void VibrateA(jlongArray a0, int32_t a1);
-jstring GetFrameNameJavaProfilingWrapper(int32_t a0, int32_t a1, int32_t a2);
-jdouble GetSampleTimeJavaProfiling(int32_t a0, int32_t a1);
-jstring GetThreadNameJavaProfilingWrapper(int32_t a0);
-void PauseJavaProfiling();
-void StartJavaProfiling(int32_t a0, int32_t a1);
-void StopJavaProfiling();
-void UnpauseJavaProfiling();
-void SendThumbnail(jobject a0, int32_t a1, bool a2);
-jobject CreateEGLSurfaceForCompositorWrapper(jobject aTarget);
-jobject RegisterCompositorWrapper();
-void PostDelayedCallbackWrapper(jobject aTarget, int64_t a0);
-void RequestContentRepaintWrapper(jobject aTarget, jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4);
-jstring GetClipboardTextWrapper();
-void SetClipboardText(const nsAString& a0);
+class ThumbnailHelper : public AutoGlobalWrappedJavaObject {
+public:
+    static void InitStubs(JNIEnv *jEnv);
+    static ThumbnailHelper* Wrap(jobject obj);
+    ThumbnailHelper(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};
+    static void SendThumbnail(jobject a0, int32_t a1, bool a2);
+    ThumbnailHelper() : AutoGlobalWrappedJavaObject() {};
+protected:
+    static jclass mThumbnailHelperClass;
+    static jmethodID jSendThumbnail;
+};
+
+class DisplayPortMetrics : public AutoGlobalWrappedJavaObject {
+public:
+    static void InitStubs(JNIEnv *jEnv);
+    static DisplayPortMetrics* Wrap(jobject obj);
+    DisplayPortMetrics(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};
+    DisplayPortMetrics(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4);
+    jobject getMPosition();
+    jfloat getResolution();
+    DisplayPortMetrics() : AutoGlobalWrappedJavaObject() {};
+protected:
+    static jclass mDisplayPortMetricsClass;
+    static jmethodID jDisplayPortMetrics;
+    static jfieldID jMPosition;
+    static jfieldID jResolution;
+};
+
+class GLController : public AutoGlobalWrappedJavaObject {
+public:
+    static void InitStubs(JNIEnv *jEnv);
+    static GLController* Wrap(jobject obj);
+    GLController(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};
+    jobject CreateEGLSurfaceForCompositorWrapper();
+    GLController() : AutoGlobalWrappedJavaObject() {};
+protected:
+    static jclass mGLControllerClass;
+    static jmethodID jCreateEGLSurfaceForCompositorWrapper;
+};
+
+class GeckoLayerClient : public AutoGlobalWrappedJavaObject {
+public:
+    static void InitStubs(JNIEnv *jEnv);
+    static GeckoLayerClient* Wrap(jobject obj);
+    GeckoLayerClient(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};
+    void ActivateProgram();
+    void ContentDocumentChanged();
+    jobject CreateFrame();
+    void DeactivateProgram();
+    jobject GetDisplayPort(bool a0, bool a1, int32_t a2, jobject a3);
+    bool IsContentDocumentDisplayed();
+    jobject ProgressiveUpdateCallback(bool a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, jfloat a5, bool a6);
+    void SetFirstPaintViewport(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, jfloat a5, jfloat a6);
+    void SetPageRect(jfloat a0, jfloat a1, jfloat a2, jfloat a3);
+    jobject SyncFrameMetrics(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, jfloat a5, jfloat a6, bool a7, int32_t a8, int32_t a9, int32_t a10, int32_t a11, jfloat a12, bool a13);
+    jobject SyncViewportInfo(int32_t a0, int32_t a1, int32_t a2, int32_t a3, jfloat a4, bool a5);
+    GeckoLayerClient() : AutoGlobalWrappedJavaObject() {};
+protected:
+    static jclass mGeckoLayerClientClass;
+    static jmethodID jActivateProgram;
+    static jmethodID jContentDocumentChanged;
+    static jmethodID jCreateFrame;
+    static jmethodID jDeactivateProgram;
+    static jmethodID jGetDisplayPort;
+    static jmethodID jIsContentDocumentDisplayed;
+    static jmethodID jProgressiveUpdateCallback;
+    static jmethodID jSetFirstPaintViewport;
+    static jmethodID jSetPageRect;
+    static jmethodID jSyncFrameMetrics;
+    static jmethodID jSyncViewportInfo;
+};
+
+class ImmutableViewportMetrics : public AutoGlobalWrappedJavaObject {
+public:
+    static void InitStubs(JNIEnv *jEnv);
+    static ImmutableViewportMetrics* Wrap(jobject obj);
+    ImmutableViewportMetrics(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};
+    ImmutableViewportMetrics(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, jfloat a5, jfloat a6, jfloat a7, jfloat a8, jfloat a9, jfloat a10, jfloat a11, jfloat a12);
+    ImmutableViewportMetrics() : AutoGlobalWrappedJavaObject() {};
+protected:
+    static jclass mImmutableViewportMetricsClass;
+    static jmethodID jImmutableViewportMetrics;
+};
+
+class LayerView : public AutoGlobalWrappedJavaObject {
+public:
+    static void InitStubs(JNIEnv *jEnv);
+    static LayerView* Wrap(jobject obj);
+    LayerView(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};
+    static jobject RegisterCompositorWrapper();
+    LayerView() : AutoGlobalWrappedJavaObject() {};
+protected:
+    static jclass mLayerViewClass;
+    static jmethodID jRegisterCompositorWrapper;
+};
+
+class NativePanZoomController : public AutoGlobalWrappedJavaObject {
+public:
+    static void InitStubs(JNIEnv *jEnv);
+    static NativePanZoomController* Wrap(jobject obj);
+    NativePanZoomController(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};
+    void PostDelayedCallbackWrapper(int64_t a0);
+    void RequestContentRepaintWrapper(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4);
+    NativePanZoomController() : AutoGlobalWrappedJavaObject() {};
+protected:
+    static jclass mNativePanZoomControllerClass;
+    static jmethodID jPostDelayedCallbackWrapper;
+    static jmethodID jRequestContentRepaintWrapper;
+};
+
+class ProgressiveUpdateData : public AutoGlobalWrappedJavaObject {
+public:
+    static void InitStubs(JNIEnv *jEnv);
+    static ProgressiveUpdateData* Wrap(jobject obj);
+    ProgressiveUpdateData(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};
+    ProgressiveUpdateData();
+    void setViewport(jobject a0);
+    bool getabort();
+    void setabort(bool a0);
+    jfloat getheight();
+    void setheight(jfloat a0);
+    jfloat getscale();
+    void setscale(jfloat a0);
+    jfloat getwidth();
+    void setwidth(jfloat a0);
+    jfloat getx();
+    void setx(jfloat a0);
+    jfloat gety();
+    void sety(jfloat a0);
+protected:
+    static jclass mProgressiveUpdateDataClass;
+    static jmethodID jProgressiveUpdateData;
+    static jmethodID jsetViewport;
+    static jfieldID jabort;
+    static jfieldID jheight;
+    static jfieldID jscale;
+    static jfieldID jwidth;
+    static jfieldID jx;
+    static jfieldID jy;
+};
+
+class ViewTransform : public AutoGlobalWrappedJavaObject {
+public:
+    static void InitStubs(JNIEnv *jEnv);
+    static ViewTransform* Wrap(jobject obj);
+    ViewTransform(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};
+    ViewTransform(jfloat a0, jfloat a1, jfloat a2);
+    jfloat getfixedLayerMarginBottom();
+    void setfixedLayerMarginBottom(jfloat a0);
+    jfloat getfixedLayerMarginLeft();
+    void setfixedLayerMarginLeft(jfloat a0);
+    jfloat getfixedLayerMarginRight();
+    void setfixedLayerMarginRight(jfloat a0);
+    jfloat getfixedLayerMarginTop();
+    void setfixedLayerMarginTop(jfloat a0);
+    jfloat getoffsetX();
+    void setoffsetX(jfloat a0);
+    jfloat getoffsetY();
+    void setoffsetY(jfloat a0);
+    jfloat getscale();
+    void setscale(jfloat a0);
+    jfloat getx();
+    void setx(jfloat a0);
+    jfloat gety();
+    void sety(jfloat a0);
+    ViewTransform() : AutoGlobalWrappedJavaObject() {};
+protected:
+    static jclass mViewTransformClass;
+    static jmethodID jViewTransform;
+    static jfieldID jfixedLayerMarginBottom;
+    static jfieldID jfixedLayerMarginLeft;
+    static jfieldID jfixedLayerMarginRight;
+    static jfieldID jfixedLayerMarginTop;
+    static jfieldID joffsetX;
+    static jfieldID joffsetY;
+    static jfieldID jscale;
+    static jfieldID jx;
+    static jfieldID jy;
+};
+
+class NativeZip : public AutoGlobalWrappedJavaObject {
+public:
+    static void InitStubs(JNIEnv *jEnv);
+    static NativeZip* Wrap(jobject obj);
+    NativeZip(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};
+    jobject CreateInputStream(jobject a0, int32_t a1);
+    NativeZip() : AutoGlobalWrappedJavaObject() {};
+protected:
+    static jclass mNativeZipClass;
+    static jmethodID jCreateInputStream;
+};
+
+class MatrixBlobCursor : public AutoGlobalWrappedJavaObject {
+public:
+    static void InitStubs(JNIEnv *jEnv);
+    static MatrixBlobCursor* Wrap(jobject obj);
+    MatrixBlobCursor(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};
+    MatrixBlobCursor(jobjectArray a0);
+    MatrixBlobCursor(jobjectArray a0, int32_t a1);
+    void AddRow(jobject a0);
+    void AddRow(jobject a0, int32_t a1);
+    void AddRow(jobjectArray a0);
+    MatrixBlobCursor() : AutoGlobalWrappedJavaObject() {};
+protected:
+    static jclass mMatrixBlobCursorClass;
+    static jmethodID jMatrixBlobCursor;
+    static jmethodID jMatrixBlobCursor0;
+    static jmethodID jAddRow;
+    static jmethodID jAddRow1;
+    static jmethodID jAddRow2;
+};
+
+class SQLiteBridgeException : public AutoGlobalWrappedJavaObject {
+public:
+    static void InitStubs(JNIEnv *jEnv);
+    static SQLiteBridgeException* Wrap(jobject obj);
+    SQLiteBridgeException(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};
+    SQLiteBridgeException();
+    SQLiteBridgeException(const nsAString& a0);
+    static int64_t getserialVersionUID();
+protected:
+    static jclass mSQLiteBridgeExceptionClass;
+    static jmethodID jSQLiteBridgeException;
+    static jmethodID jSQLiteBridgeException0;
+    static jfieldID jserialVersionUID;
+};
+
+class Clipboard : public AutoGlobalWrappedJavaObject {
+public:
+    static void InitStubs(JNIEnv *jEnv);
+    static Clipboard* Wrap(jobject obj);
+    Clipboard(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};
+    static void ClearText();
+    static jstring GetClipboardTextWrapper();
+    static bool HasText();
+    static void SetClipboardText(const nsAString& a0);
+    Clipboard() : AutoGlobalWrappedJavaObject() {};
+protected:
+    static jclass mClipboardClass;
+    static jmethodID jClearText;
+    static jmethodID jGetClipboardTextWrapper;
+    static jmethodID jHasText;
+    static jmethodID jSetClipboardText;
+};
+
+
+} /* android */
+} /* widget */
+} /* mozilla */
+#endif