Bug 1637452: Part 1 - Fix JNI includes in widget/android; r=geckoview-reviewers,agi
authorAaron Klotz <aklotz@mozilla.com>
Fri, 15 May 2020 17:04:10 +0000
changeset 530316 7de07715929fdb02ced4c0630a7123e9a4ecb74c
parent 530315 c2a97b6be526fe141dc64feddf08a0994d1dfc4d
child 530317 b28b3a9fcce982b48bd636ae6960f92470967fa6
push id37420
push usernerli@mozilla.com
push dateFri, 15 May 2020 21:52:36 +0000
treeherdermozilla-central@f340bbb582d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgeckoview-reviewers, agi
bugs1637452
milestone78.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 1637452: Part 1 - Fix JNI includes in widget/android; r=geckoview-reviewers,agi Differential Revision: https://phabricator.services.mozilla.com/D75364
widget/android/AndroidAlerts.cpp
widget/android/AndroidAlerts.h
widget/android/AndroidBridge.cpp
widget/android/AndroidBridge.h
widget/android/AndroidUiThread.cpp
widget/android/Base64UtilsSupport.h
widget/android/EventDispatcher.cpp
widget/android/EventDispatcher.h
widget/android/GeckoBatteryManager.h
widget/android/GeckoEditableSupport.cpp
widget/android/GeckoEditableSupport.h
widget/android/GeckoNetworkManager.h
widget/android/GeckoProcessManager.h
widget/android/GeckoScreenOrientation.h
widget/android/GeckoSystemStateListener.h
widget/android/GeckoTelemetryDelegate.h
widget/android/GeckoVRManager.h
widget/android/ImageDecoderSupport.h
widget/android/PrefsHelper.h
widget/android/ScreenHelperAndroid.cpp
widget/android/Telemetry.h
widget/android/WebAuthnTokenManager.cpp
widget/android/WebExecutorSupport.cpp
widget/android/WebExecutorSupport.h
widget/android/jni/GeckoBundleUtils.h
widget/android/jni/GeckoResultUtils.h
widget/android/jni/Utils.cpp
widget/android/nsAndroidProtocolHandler.cpp
widget/android/nsAppShell.cpp
widget/android/nsClipboard.cpp
widget/android/nsLookAndFeel.cpp
widget/android/nsWindow.cpp
widget/android/nsWindow.h
--- a/widget/android/AndroidAlerts.cpp
+++ b/widget/android/AndroidAlerts.cpp
@@ -1,15 +1,16 @@
 /* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "AndroidAlerts.h"
-#include "GeneratedJNIWrappers.h"
+#include "mozilla/java/GeckoRuntimeWrappers.h"
+#include "mozilla/java/WebNotificationWrappers.h"
 #include "nsAlertsUtils.h"
 
 namespace mozilla {
 namespace widget {
 
 NS_IMPL_ISUPPORTS(AndroidAlerts, nsIAlertsService)
 
 StaticAutoPtr<AndroidAlerts::ListenerMap> AndroidAlerts::sListenerMap;
--- a/widget/android/AndroidAlerts.h
+++ b/widget/android/AndroidAlerts.h
@@ -8,17 +8,17 @@
 
 #include "nsDataHashtable.h"
 #include "nsInterfaceHashtable.h"
 #include "nsCOMPtr.h"
 #include "nsHashKeys.h"
 #include "nsIAlertsService.h"
 #include "nsIObserver.h"
 
-#include "GeneratedJNIWrappers.h"
+#include "mozilla/java/WebNotificationWrappers.h"
 
 #include "mozilla/StaticPtr.h"
 
 namespace mozilla {
 namespace widget {
 
 class AndroidAlerts : public nsIAlertsService {
  public:
--- a/widget/android/AndroidBridge.cpp
+++ b/widget/android/AndroidBridge.cpp
@@ -38,17 +38,19 @@
 #include "SurfaceTexture.h"
 #include "GLContextProvider.h"
 
 #include "mozilla/TimeStamp.h"
 #include "mozilla/UniquePtr.h"
 #include "nsIObserverService.h"
 #include "WidgetUtils.h"
 
-#include "GeneratedJNIWrappers.h"
+#include "mozilla/java/EventDispatcherWrappers.h"
+#include "mozilla/java/GeckoAppShellWrappers.h"
+#include "mozilla/java/GeckoThreadWrappers.h"
 #include "mozilla/java/HardwareCodecCapabilityUtilsWrappers.h"
 
 using namespace mozilla;
 using namespace mozilla::gfx;
 
 AndroidBridge* AndroidBridge::sBridge = nullptr;
 static jobject sGlobalContext = nullptr;
 nsDataHashtable<nsStringHashKey, nsString> AndroidBridge::sStoragePaths;
--- a/widget/android/AndroidBridge.h
+++ b/widget/android/AndroidBridge.h
@@ -11,17 +11,17 @@
 #include <cstdlib>
 #include <unistd.h>
 
 #include "APKOpen.h"
 
 #include "nsCOMPtr.h"
 #include "nsCOMArray.h"
 
-#include "GeneratedJNIWrappers.h"
+#include "mozilla/jni/Refs.h"
 
 #include "nsIMutableArray.h"
 #include "nsIMIMEInfo.h"
 #include "nsColor.h"
 #include "gfxRect.h"
 
 #include "nsIAndroidBridge.h"
 
--- a/widget/android/AndroidUiThread.cpp
+++ b/widget/android/AndroidUiThread.cpp
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "base/message_loop.h"
-#include "GeneratedJNIWrappers.h"
 #include "mozilla/Atomics.h"
 #include "mozilla/EventQueue.h"
+#include "mozilla/java/GeckoThreadWrappers.h"
 #include "mozilla/LinkedList.h"
 #include "mozilla/Monitor.h"
 #include "mozilla/Mutex.h"
 #include "mozilla/RefPtr.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/ThreadEventQueue.h"
 #include "mozilla/TimeStamp.h"
 #include "mozilla/UniquePtr.h"
--- a/widget/android/Base64UtilsSupport.h
+++ b/widget/android/Base64UtilsSupport.h
@@ -1,18 +1,18 @@
 /* -*- Mode: c++; c-basic-offset: 2; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef Base64UtilsSupport_h__
 #define Base64UtilsSupport_h__
 
-#include "GeneratedJNINatives.h"
 #include "mozilla/Base64.h"
+#include "mozilla/java/Base64UtilsNatives.h"
 
 namespace mozilla {
 namespace widget {
 
 class Base64UtilsSupport final
     : public java::Base64Utils::Natives<Base64UtilsSupport> {
  public:
   static jni::ByteArray::LocalRef Decode(jni::String::Param data) {
--- a/widget/android/EventDispatcher.cpp
+++ b/widget/android/EventDispatcher.cpp
@@ -10,16 +10,17 @@
 #include "nsAppShell.h"
 #include "nsJSUtils.h"
 #include "js/Array.h"  // JS::GetArrayLength, JS::IsArrayObject, JS::NewArrayObject
 #include "js/Warnings.h"  // JS::WarnUTF8
 #include "xpcpublic.h"
 
 #include "mozilla/ScopeExit.h"
 #include "mozilla/dom/ScriptSettings.h"
+#include "mozilla/java/EventCallbackWrappers.h"
 
 // Disable the C++ 2a warning. See bug #1509926
 #if defined(__clang__)
 #  pragma clang diagnostic push
 #  pragma clang diagnostic ignored "-Wc++2a-compat"
 #endif
 
 namespace mozilla {
--- a/widget/android/EventDispatcher.h
+++ b/widget/android/EventDispatcher.h
@@ -2,24 +2,25 @@
  * vim: set sw=2 ts=4 expandtab:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_widget_EventDispatcher_h
 #define mozilla_widget_EventDispatcher_h
 
-#include "GeneratedJNINatives.h"
 #include "jsapi.h"
 #include "nsClassHashtable.h"
 #include "nsCOMArray.h"
 #include "nsIAndroidBridge.h"
 #include "nsHashKeys.h"
 #include "nsPIDOMWindow.h"
 
+#include "mozilla/java/EventDispatcherNatives.h"
+#include "mozilla/java/GeckoBundleWrappers.h"
 #include "mozilla/Mutex.h"
 
 namespace mozilla {
 namespace widget {
 
 /**
  * EventDispatcher is the Gecko counterpart to the Java EventDispatcher class.
  * Together, they make up a unified event bus. Events dispatched from the Java
--- a/widget/android/GeckoBatteryManager.h
+++ b/widget/android/GeckoBatteryManager.h
@@ -1,20 +1,20 @@
 /* -*- Mode: c++; c-basic-offset: 2; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef GeckoBatteryManager_h
 #define GeckoBatteryManager_h
 
-#include "GeneratedJNINatives.h"
 #include "nsAppShell.h"
 
 #include "mozilla/Hal.h"
+#include "mozilla/java/GeckoBatteryManagerNatives.h"
 
 namespace mozilla {
 
 class GeckoBatteryManager final
     : public java::GeckoBatteryManager::Natives<GeckoBatteryManager> {
  public:
   static void OnBatteryChange(double aLevel, bool aCharging,
                               double aRemainingTime) {
--- a/widget/android/GeckoEditableSupport.cpp
+++ b/widget/android/GeckoEditableSupport.cpp
@@ -8,16 +8,18 @@
 
 #include "AndroidRect.h"
 #include "KeyEvent.h"
 #include "PuppetWidget.h"
 #include "nsIContent.h"
 
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/IMEStateManager.h"
+#include "mozilla/java/GeckoEditableChildWrappers.h"
+#include "mozilla/java/GeckoServiceChildProcessWrappers.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/StaticPrefs_intl.h"
 #include "mozilla/TextComposition.h"
 #include "mozilla/TextEventDispatcherListener.h"
 #include "mozilla/TextEvents.h"
 #include "mozilla/ToString.h"
 #include "mozilla/dom/BrowserChild.h"
 
--- a/widget/android/GeckoEditableSupport.h
+++ b/widget/android/GeckoEditableSupport.h
@@ -1,21 +1,22 @@
 /* -*- Mode: c++; c-basic-offset: 2; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_widget_GeckoEditableSupport_h
 #define mozilla_widget_GeckoEditableSupport_h
 
-#include "GeneratedJNIWrappers.h"
 #include "nsAppShell.h"
 #include "nsIWidget.h"
 #include "nsTArray.h"
 
+#include "mozilla/java/GeckoEditableChildNatives.h"
+#include "mozilla/java/SessionTextInputWrappers.h"
 #include "mozilla/TextEventDispatcher.h"
 #include "mozilla/TextEventDispatcherListener.h"
 #include "mozilla/UniquePtr.h"
 
 class nsWindow;
 
 namespace mozilla {
 
--- a/widget/android/GeckoNetworkManager.h
+++ b/widget/android/GeckoNetworkManager.h
@@ -1,21 +1,21 @@
 /* -*- Mode: c++; c-basic-offset: 2; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef GeckoNetworkManager_h
 #define GeckoNetworkManager_h
 
-#include "GeneratedJNINatives.h"
 #include "nsAppShell.h"
 #include "nsCOMPtr.h"
 #include "nsINetworkLinkService.h"
 
+#include "mozilla/java/GeckoNetworkManagerNatives.h"
 #include "mozilla/Services.h"
 
 namespace mozilla {
 
 class GeckoNetworkManager final
     : public java::GeckoNetworkManager::Natives<GeckoNetworkManager> {
   GeckoNetworkManager() = delete;
 
--- a/widget/android/GeckoProcessManager.h
+++ b/widget/android/GeckoProcessManager.h
@@ -1,23 +1,23 @@
 /* -*- Mode: c++; c-basic-offset: 2; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef GeckoProcessManager_h
 #define GeckoProcessManager_h
 
-#include "GeneratedJNINatives.h"
 #include "WidgetUtils.h"
 #include "nsAppShell.h"
 #include "nsWindow.h"
 
 #include "mozilla/RefPtr.h"
 #include "mozilla/dom/ContentProcessManager.h"
+#include "mozilla/java/GeckoProcessManagerNatives.h"
 
 namespace mozilla {
 
 class GeckoProcessManager final
     : public java::GeckoProcessManager::Natives<GeckoProcessManager> {
   GeckoProcessManager() = delete;
 
   static already_AddRefed<nsIWidget> GetWidget(int64_t aContentId,
--- a/widget/android/GeckoScreenOrientation.h
+++ b/widget/android/GeckoScreenOrientation.h
@@ -1,22 +1,22 @@
 /* -*- Mode: c++; c-basic-offset: 2; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef GeckoScreenOrientation_h
 #define GeckoScreenOrientation_h
 
-#include "GeneratedJNINatives.h"
 #include "nsAppShell.h"
 #include "nsCOMPtr.h"
 #include "nsIScreenManager.h"
 
 #include "mozilla/Hal.h"
+#include "mozilla/java/GeckoScreenOrientationNatives.h"
 
 namespace mozilla {
 
 class GeckoScreenOrientation final
     : public java::GeckoScreenOrientation::Natives<GeckoScreenOrientation> {
   GeckoScreenOrientation() = delete;
 
  public:
--- a/widget/android/GeckoSystemStateListener.h
+++ b/widget/android/GeckoSystemStateListener.h
@@ -1,20 +1,20 @@
 /* -*- Mode: c++; c-basic-offset: 2; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef GeckoSystemStateListener_h
 #define GeckoSystemStateListener_h
 
-#include "GeneratedJNINatives.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/PresShell.h"
 #include "mozilla/dom/Document.h"
+#include "mozilla/java/GeckoSystemStateListenerNatives.h"
 #include "nsIWindowMediator.h"
 #include "nsPIDOMWindow.h"
 
 namespace mozilla {
 
 class GeckoSystemStateListener final
     : public java::GeckoSystemStateListener::Natives<GeckoSystemStateListener> {
   GeckoSystemStateListener() = delete;
--- a/widget/android/GeckoTelemetryDelegate.h
+++ b/widget/android/GeckoTelemetryDelegate.h
@@ -6,18 +6,18 @@
 
 #ifndef GeckoTelemetryDelegate_h__
 #define GeckoTelemetryDelegate_h__
 
 #include "geckoview/streaming/GeckoViewStreamingTelemetry.h"
 
 #include <jni.h>
 
+#include "mozilla/java/RuntimeTelemetryNatives.h"
 #include "mozilla/jni/Natives.h"
-#include "GeneratedJNIWrappers.h"
 
 namespace mozilla {
 namespace widget {
 
 class GeckoTelemetryDelegate final
     : public GeckoViewStreamingTelemetry::StreamingTelemetryDelegate,
       public mozilla::java::RuntimeTelemetry::Proxy::Natives<
           GeckoTelemetryDelegate> {
--- a/widget/android/GeckoVRManager.h
+++ b/widget/android/GeckoVRManager.h
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_GeckoVRManager_h_
 #define mozilla_GeckoVRManager_h_
 
-#include "GeneratedJNINatives.h"
+#include "mozilla/java/GeckoVRManagerWrappers.h"
 #include "mozilla/jni/Utils.h"
 
 namespace mozilla {
 
 class GeckoVRManager {
  public:
   static void* GetExternalContext() {
     return reinterpret_cast<void*>(
--- a/widget/android/ImageDecoderSupport.h
+++ b/widget/android/ImageDecoderSupport.h
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef ImageDecoderSupport_h__
 #define ImageDecoderSupport_h__
 
-#include "GeneratedJNINatives.h"
+#include "mozilla/java/ImageDecoderNatives.h"
 
 class imgIContainerCallback;
 
 namespace mozilla {
 namespace widget {
 
 class ImageDecoderSupport final
     : public java::ImageDecoder::Natives<ImageDecoderSupport> {
--- a/widget/android/PrefsHelper.h
+++ b/widget/android/PrefsHelper.h
@@ -1,22 +1,22 @@
 /* -*- Mode: c++; c-basic-offset: 2; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef PrefsHelper_h
 #define PrefsHelper_h
 
-#include "GeneratedJNINatives.h"
 #include "MainThreadUtils.h"
 #include "nsAppShell.h"
 #include "nsCOMPtr.h"
 #include "nsVariant.h"
 
+#include "mozilla/java/PrefsHelperNatives.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Services.h"
 
 namespace mozilla {
 
 class PrefsHelper : public java::PrefsHelper::Natives<PrefsHelper> {
   PrefsHelper() = delete;
 
--- a/widget/android/ScreenHelperAndroid.cpp
+++ b/widget/android/ScreenHelperAndroid.cpp
@@ -1,22 +1,23 @@
 /* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set sw=2 ts=4 expandtab:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ScreenHelperAndroid.h"
 #include "AndroidRect.h"
-#include "GeneratedJNINatives.h"
 #include "nsThreadUtils.h"
 
 #include <mozilla/jni/Refs.h>
 
 #include "mozilla/Atomics.h"
+#include "mozilla/java/GeckoAppShellWrappers.h"
+#include "mozilla/java/ScreenManagerHelperNatives.h"
 #include "mozilla/widget/ScreenManager.h"
 
 using namespace mozilla;
 using namespace mozilla::widget;
 
 static ScreenHelperAndroid* gHelper = nullptr;
 
 class ScreenHelperAndroid::ScreenHelperSupport final
--- a/widget/android/Telemetry.h
+++ b/widget/android/Telemetry.h
@@ -1,17 +1,17 @@
 /* -*- Mode: c++; c-basic-offset: 2; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_widget_Telemetry_h__
 #define mozilla_widget_Telemetry_h__
 
-#include "GeneratedJNINatives.h"
+#include "mozilla/java/TelemetryUtilsNatives.h"
 #include "nsAppShell.h"
 #include "nsIAndroidBridge.h"
 
 #include "mozilla/Telemetry.h"
 
 namespace mozilla {
 namespace widget {
 
--- a/widget/android/WebAuthnTokenManager.cpp
+++ b/widget/android/WebAuthnTokenManager.cpp
@@ -1,15 +1,17 @@
 /* -*- Mode: c++; c-basic-offset: 2; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/AndroidWebAuthnTokenManager.h"
 
+#include "mozilla/java/WebAuthnTokenManagerNatives.h"
+
 namespace mozilla {
 class WebAuthnTokenManager final
     : public java::WebAuthnTokenManager::Natives<WebAuthnTokenManager> {
  public:
   static void WebAuthnMakeCredentialFinish(
       jni::ByteArray::Param aClientDataJson, jni::ByteArray::Param aKeyHandle,
       jni::ByteArray::Param aAttestationObject) {
     mozilla::dom::AndroidWebAuthnResult result;
--- a/widget/android/WebExecutorSupport.cpp
+++ b/widget/android/WebExecutorSupport.cpp
@@ -18,16 +18,22 @@
 #include "nsIUploadChannel2.h"
 #include "nsIWebProgressListener.h"
 #include "nsIX509Cert.h"
 
 #include "nsIDNSService.h"
 #include "nsIDNSListener.h"
 #include "nsIDNSRecord.h"
 
+#include "mozilla/java/GeckoInputStreamNatives.h"
+#include "mozilla/java/GeckoResultWrappers.h"
+#include "mozilla/java/GeckoWebExecutorWrappers.h"
+#include "mozilla/java/WebMessageWrappers.h"
+#include "mozilla/java/WebRequestErrorWrappers.h"
+#include "mozilla/java/WebResponseWrappers.h"
 #include "mozilla/net/DNS.h"  // for NetAddr
 #include "mozilla/net/CookieJarSettings.h"
 #include "mozilla/Preferences.h"
 
 #include "nsNetUtil.h"  // for NS_NewURI, NS_NewChannel, NS_NewStreamLoader
 
 #include "InetAddress.h"  // for java::sdk::InetAddress and java::sdk::UnknownHostException
 #include "ReferrerInfo.h"
--- a/widget/android/WebExecutorSupport.h
+++ b/widget/android/WebExecutorSupport.h
@@ -1,17 +1,19 @@
 /* -*- Mode: c++; c-basic-offset: 2; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef WebExecutorSupport_h__
 #define WebExecutorSupport_h__
 
-#include "GeneratedJNINatives.h"
+#include "mozilla/java/GeckoWebExecutorNatives.h"
+#include "mozilla/java/GeckoResultWrappers.h"
+#include "mozilla/java/WebRequestWrappers.h"
 
 namespace mozilla {
 namespace widget {
 
 class WebExecutorSupport final
     : public java::GeckoWebExecutor::Natives<WebExecutorSupport> {
  public:
   static void Fetch(jni::Object::Param request, int32_t flags,
--- a/widget/android/jni/GeckoBundleUtils.h
+++ b/widget/android/jni/GeckoBundleUtils.h
@@ -2,16 +2,18 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_jni_GeckoBundleUtils_h
 #define mozilla_jni_GeckoBundleUtils_h
 
+#include "mozilla/java/GeckoBundleWrappers.h"
+
 namespace mozilla {
 namespace jni {
 
 #define GECKOBUNDLE_START(name)                   \
   nsTArray<jni::String::LocalRef> _##name##_keys; \
   nsTArray<jni::Object::LocalRef> _##name##_values;
 
 #define GECKOBUNDLE_PUT(name, key, value)                                 \
--- a/widget/android/jni/GeckoResultUtils.h
+++ b/widget/android/jni/GeckoResultUtils.h
@@ -2,19 +2,18 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_jni_GeckoResultUtils_h
 #define mozilla_jni_GeckoResultUtils_h
 
+#include "mozilla/java/GeckoResultNatives.h"
 #include "mozilla/jni/Conversions.h"
-#include "GeneratedJNIWrappers.h"
-#include "GeneratedJNINatives.h"
 
 namespace mozilla {
 namespace jni {
 
 // C++-side object bound to Java's GeckoResult.GeckoCallback.
 //
 // Note that we can't template this class because that breaks JNI dispatch
 // (surprisingly: it compiles, but selects the wrong method specialization
--- a/widget/android/jni/Utils.cpp
+++ b/widget/android/jni/Utils.cpp
@@ -6,18 +6,19 @@
 
 #include "Utils.h"
 #include "Types.h"
 
 #include <android/log.h>
 #include <pthread.h>
 
 #include "mozilla/Assertions.h"
+#include "mozilla/java/GeckoAppShellWrappers.h"
+#include "mozilla/java/GeckoThreadWrappers.h"
 
-#include "GeneratedJNIWrappers.h"
 #include "AndroidBuild.h"
 #include "nsAppShell.h"
 #include "nsExceptionHandler.h"
 
 namespace mozilla {
 namespace jni {
 
 namespace detail {
--- a/widget/android/nsAndroidProtocolHandler.cpp
+++ b/widget/android/nsAndroidProtocolHandler.cpp
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsAndroidProtocolHandler.h"
 #include "nsCOMPtr.h"
 #include "nsIChannel.h"
 #include "android/log.h"
 #include "nsBaseChannel.h"
 #include "AndroidBridge.h"
-#include "GeneratedJNIWrappers.h"
+#include "mozilla/java/GeckoAppShellWrappers.h"
 
 using namespace mozilla;
 
 class AndroidInputStream : public nsIInputStream {
  public:
   explicit AndroidInputStream(jni::Object::Param connection) {
     mBridgeInputStream = java::GeckoAppShell::CreateInputStream(connection);
     mBridgeChannel = AndroidBridge::ChannelCreate(mBridgeInputStream);
--- a/widget/android/nsAppShell.cpp
+++ b/widget/android/nsAppShell.cpp
@@ -28,23 +28,25 @@
 #include "mozilla/Components.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/Services.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Hal.h"
 #include "mozilla/dom/BrowserChild.h"
 #include "mozilla/intl/OSPreferences.h"
 #include "mozilla/ipc/GeckoChildProcessHost.h"
+#include "mozilla/java/GeckoAppShellNatives.h"
+#include "mozilla/java/GeckoThreadNatives.h"
+#include "mozilla/java/XPCOMEventTargetNatives.h"
 #include "mozilla/widget/ScreenManager.h"
 #include "prenv.h"
 
 #include "AndroidBridge.h"
 #include "AndroidBridgeUtilities.h"
 #include "AndroidSurfaceTexture.h"
-#include "GeneratedJNINatives.h"
 #include <android/log.h>
 #include <pthread.h>
 #include <wchar.h>
 
 #include "GeckoProfiler.h"
 #ifdef MOZ_ANDROID_HISTORY
 #  include "nsNetUtil.h"
 #  include "nsIURI.h"
--- a/widget/android/nsClipboard.cpp
+++ b/widget/android/nsClipboard.cpp
@@ -1,14 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+#include "mozilla/java/ClipboardWrappers.h"
+#include "mozilla/java/GeckoAppShellWrappers.h"
 #include "nsClipboard.h"
-#include "GeneratedJNIWrappers.h"
 #include "nsISupportsPrimitives.h"
 #include "nsCOMPtr.h"
 #include "nsComponentManagerUtils.h"
 #include "nsPrimitiveHelpers.h"
 
 using namespace mozilla;
 
 NS_IMPL_ISUPPORTS(nsClipboard, nsIClipboard)
--- a/widget/android/nsLookAndFeel.cpp
+++ b/widget/android/nsLookAndFeel.cpp
@@ -6,16 +6,18 @@
 #include "mozilla/dom/ContentChild.h"
 #include "nsStyleConsts.h"
 #include "nsXULAppAPI.h"
 #include "nsLookAndFeel.h"
 #include "gfxFont.h"
 #include "gfxFontConstants.h"
 #include "mozilla/FontPropertyTypes.h"
 #include "mozilla/gfx/2D.h"
+#include "mozilla/java/GeckoAppShellWrappers.h"
+#include "mozilla/java/GeckoSystemStateListenerWrappers.h"
 
 using namespace mozilla;
 using mozilla::dom::ContentChild;
 
 bool nsLookAndFeel::mInitializedSystemColors = false;
 AndroidSystemColors nsLookAndFeel::mSystemColors;
 
 bool nsLookAndFeel::mInitializedShowPassword = false;
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -76,19 +76,26 @@ using mozilla::dom::ContentParent;
 #include "mozilla/layers/LayerManagerComposite.h"
 
 #include "nsTArray.h"
 
 #include "AndroidBridge.h"
 #include "AndroidBridgeUtilities.h"
 #include "AndroidUiThread.h"
 #include "GeckoEditableSupport.h"
-#include "GeneratedJNINatives.h"
 #include "KeyEvent.h"
 #include "MotionEvent.h"
+#include "mozilla/java/EventDispatcherWrappers.h"
+#include "mozilla/java/GeckoAppShellWrappers.h"
+#include "mozilla/java/GeckoEditableChildWrappers.h"
+#include "mozilla/java/GeckoResultWrappers.h"
+#include "mozilla/java/GeckoSessionNatives.h"
+#include "mozilla/java/GeckoSystemStateListenerWrappers.h"
+#include "mozilla/java/PanZoomControllerNatives.h"
+#include "mozilla/java/SessionAccessibilityWrappers.h"
 #include "ScreenHelperAndroid.h"
 
 #include "GeckoProfiler.h"  // For AUTO_PROFILER_LABEL
 #include "nsPrintfCString.h"
 #include "nsString.h"
 
 #include "JavaBuiltins.h"
 
--- a/widget/android/nsWindow.h
+++ b/widget/android/nsWindow.h
@@ -7,18 +7,18 @@
 #ifndef NSWINDOW_H_
 #define NSWINDOW_H_
 
 #include "nsBaseWidget.h"
 #include "gfxPoint.h"
 #include "nsIIdleServiceInternal.h"
 #include "nsTArray.h"
 #include "EventDispatcher.h"
-#include "GeneratedJNIWrappers.h"
 #include "mozilla/EventForwards.h"
+#include "mozilla/java/GeckoBundleWrappers.h"
 #include "mozilla/MozPromise.h"
 #include "mozilla/Mutex.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/TextRange.h"
 #include "mozilla/UniquePtr.h"
 
 struct ANPEvent;