Bug 1637452: Part 1 - Fix JNI includes in widget/android; r=geckoview-reviewers,agi

Differential Revision: https://phabricator.services.mozilla.com/D75364
This commit is contained in:
Aaron Klotz 2020-05-15 17:04:10 +00:00
parent 7bc7b5ed18
commit 852cd2b63c
33 changed files with 61 additions and 28 deletions

View File

@ -4,7 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "AndroidAlerts.h" #include "AndroidAlerts.h"
#include "GeneratedJNIWrappers.h" #include "mozilla/java/GeckoRuntimeWrappers.h"
#include "mozilla/java/WebNotificationWrappers.h"
#include "nsAlertsUtils.h" #include "nsAlertsUtils.h"
namespace mozilla { namespace mozilla {

View File

@ -13,7 +13,7 @@
#include "nsIAlertsService.h" #include "nsIAlertsService.h"
#include "nsIObserver.h" #include "nsIObserver.h"
#include "GeneratedJNIWrappers.h" #include "mozilla/java/WebNotificationWrappers.h"
#include "mozilla/StaticPtr.h" #include "mozilla/StaticPtr.h"

View File

@ -43,7 +43,9 @@
#include "nsIObserverService.h" #include "nsIObserverService.h"
#include "WidgetUtils.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" #include "mozilla/java/HardwareCodecCapabilityUtilsWrappers.h"
using namespace mozilla; using namespace mozilla;

View File

@ -16,7 +16,7 @@
#include "nsCOMPtr.h" #include "nsCOMPtr.h"
#include "nsCOMArray.h" #include "nsCOMArray.h"
#include "GeneratedJNIWrappers.h" #include "mozilla/jni/Refs.h"
#include "nsIMutableArray.h" #include "nsIMutableArray.h"
#include "nsIMIMEInfo.h" #include "nsIMIMEInfo.h"

View File

@ -4,9 +4,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "base/message_loop.h" #include "base/message_loop.h"
#include "GeneratedJNIWrappers.h"
#include "mozilla/Atomics.h" #include "mozilla/Atomics.h"
#include "mozilla/EventQueue.h" #include "mozilla/EventQueue.h"
#include "mozilla/java/GeckoThreadWrappers.h"
#include "mozilla/LinkedList.h" #include "mozilla/LinkedList.h"
#include "mozilla/Monitor.h" #include "mozilla/Monitor.h"
#include "mozilla/Mutex.h" #include "mozilla/Mutex.h"

View File

@ -6,8 +6,8 @@
#ifndef Base64UtilsSupport_h__ #ifndef Base64UtilsSupport_h__
#define Base64UtilsSupport_h__ #define Base64UtilsSupport_h__
#include "GeneratedJNINatives.h"
#include "mozilla/Base64.h" #include "mozilla/Base64.h"
#include "mozilla/java/Base64UtilsNatives.h"
namespace mozilla { namespace mozilla {
namespace widget { namespace widget {

View File

@ -15,6 +15,7 @@
#include "mozilla/ScopeExit.h" #include "mozilla/ScopeExit.h"
#include "mozilla/dom/ScriptSettings.h" #include "mozilla/dom/ScriptSettings.h"
#include "mozilla/java/EventCallbackWrappers.h"
// Disable the C++ 2a warning. See bug #1509926 // Disable the C++ 2a warning. See bug #1509926
#if defined(__clang__) #if defined(__clang__)

View File

@ -7,7 +7,6 @@
#ifndef mozilla_widget_EventDispatcher_h #ifndef mozilla_widget_EventDispatcher_h
#define mozilla_widget_EventDispatcher_h #define mozilla_widget_EventDispatcher_h
#include "GeneratedJNINatives.h"
#include "jsapi.h" #include "jsapi.h"
#include "nsClassHashtable.h" #include "nsClassHashtable.h"
#include "nsCOMArray.h" #include "nsCOMArray.h"
@ -15,6 +14,8 @@
#include "nsHashKeys.h" #include "nsHashKeys.h"
#include "nsPIDOMWindow.h" #include "nsPIDOMWindow.h"
#include "mozilla/java/EventDispatcherNatives.h"
#include "mozilla/java/GeckoBundleWrappers.h"
#include "mozilla/Mutex.h" #include "mozilla/Mutex.h"
namespace mozilla { namespace mozilla {

View File

@ -6,10 +6,10 @@
#ifndef GeckoBatteryManager_h #ifndef GeckoBatteryManager_h
#define GeckoBatteryManager_h #define GeckoBatteryManager_h
#include "GeneratedJNINatives.h"
#include "nsAppShell.h" #include "nsAppShell.h"
#include "mozilla/Hal.h" #include "mozilla/Hal.h"
#include "mozilla/java/GeckoBatteryManagerNatives.h"
namespace mozilla { namespace mozilla {

View File

@ -13,6 +13,8 @@
#include "mozilla/dom/ContentChild.h" #include "mozilla/dom/ContentChild.h"
#include "mozilla/IMEStateManager.h" #include "mozilla/IMEStateManager.h"
#include "mozilla/java/GeckoEditableChildWrappers.h"
#include "mozilla/java/GeckoServiceChildProcessWrappers.h"
#include "mozilla/Preferences.h" #include "mozilla/Preferences.h"
#include "mozilla/StaticPrefs_intl.h" #include "mozilla/StaticPrefs_intl.h"
#include "mozilla/TextComposition.h" #include "mozilla/TextComposition.h"

View File

@ -6,11 +6,12 @@
#ifndef mozilla_widget_GeckoEditableSupport_h #ifndef mozilla_widget_GeckoEditableSupport_h
#define mozilla_widget_GeckoEditableSupport_h #define mozilla_widget_GeckoEditableSupport_h
#include "GeneratedJNIWrappers.h"
#include "nsAppShell.h" #include "nsAppShell.h"
#include "nsIWidget.h" #include "nsIWidget.h"
#include "nsTArray.h" #include "nsTArray.h"
#include "mozilla/java/GeckoEditableChildNatives.h"
#include "mozilla/java/SessionTextInputWrappers.h"
#include "mozilla/TextEventDispatcher.h" #include "mozilla/TextEventDispatcher.h"
#include "mozilla/TextEventDispatcherListener.h" #include "mozilla/TextEventDispatcherListener.h"
#include "mozilla/UniquePtr.h" #include "mozilla/UniquePtr.h"

View File

@ -6,11 +6,11 @@
#ifndef GeckoNetworkManager_h #ifndef GeckoNetworkManager_h
#define GeckoNetworkManager_h #define GeckoNetworkManager_h
#include "GeneratedJNINatives.h"
#include "nsAppShell.h" #include "nsAppShell.h"
#include "nsCOMPtr.h" #include "nsCOMPtr.h"
#include "nsINetworkLinkService.h" #include "nsINetworkLinkService.h"
#include "mozilla/java/GeckoNetworkManagerNatives.h"
#include "mozilla/Services.h" #include "mozilla/Services.h"
namespace mozilla { namespace mozilla {

View File

@ -6,13 +6,13 @@
#ifndef GeckoProcessManager_h #ifndef GeckoProcessManager_h
#define GeckoProcessManager_h #define GeckoProcessManager_h
#include "GeneratedJNINatives.h"
#include "WidgetUtils.h" #include "WidgetUtils.h"
#include "nsAppShell.h" #include "nsAppShell.h"
#include "nsWindow.h" #include "nsWindow.h"
#include "mozilla/RefPtr.h" #include "mozilla/RefPtr.h"
#include "mozilla/dom/ContentProcessManager.h" #include "mozilla/dom/ContentProcessManager.h"
#include "mozilla/java/GeckoProcessManagerNatives.h"
namespace mozilla { namespace mozilla {

View File

@ -6,12 +6,12 @@
#ifndef GeckoScreenOrientation_h #ifndef GeckoScreenOrientation_h
#define GeckoScreenOrientation_h #define GeckoScreenOrientation_h
#include "GeneratedJNINatives.h"
#include "nsAppShell.h" #include "nsAppShell.h"
#include "nsCOMPtr.h" #include "nsCOMPtr.h"
#include "nsIScreenManager.h" #include "nsIScreenManager.h"
#include "mozilla/Hal.h" #include "mozilla/Hal.h"
#include "mozilla/java/GeckoScreenOrientationNatives.h"
namespace mozilla { namespace mozilla {

View File

@ -6,10 +6,10 @@
#ifndef GeckoSystemStateListener_h #ifndef GeckoSystemStateListener_h
#define GeckoSystemStateListener_h #define GeckoSystemStateListener_h
#include "GeneratedJNINatives.h"
#include "mozilla/Assertions.h" #include "mozilla/Assertions.h"
#include "mozilla/PresShell.h" #include "mozilla/PresShell.h"
#include "mozilla/dom/Document.h" #include "mozilla/dom/Document.h"
#include "mozilla/java/GeckoSystemStateListenerNatives.h"
#include "nsIWindowMediator.h" #include "nsIWindowMediator.h"
#include "nsPIDOMWindow.h" #include "nsPIDOMWindow.h"

View File

@ -11,8 +11,8 @@
#include <jni.h> #include <jni.h>
#include "mozilla/java/RuntimeTelemetryNatives.h"
#include "mozilla/jni/Natives.h" #include "mozilla/jni/Natives.h"
#include "GeneratedJNIWrappers.h"
namespace mozilla { namespace mozilla {
namespace widget { namespace widget {

View File

@ -6,7 +6,7 @@
#ifndef mozilla_GeckoVRManager_h_ #ifndef mozilla_GeckoVRManager_h_
#define mozilla_GeckoVRManager_h_ #define mozilla_GeckoVRManager_h_
#include "GeneratedJNINatives.h" #include "mozilla/java/GeckoVRManagerWrappers.h"
#include "mozilla/jni/Utils.h" #include "mozilla/jni/Utils.h"
namespace mozilla { namespace mozilla {

View File

@ -5,7 +5,7 @@
#ifndef ImageDecoderSupport_h__ #ifndef ImageDecoderSupport_h__
#define ImageDecoderSupport_h__ #define ImageDecoderSupport_h__
#include "GeneratedJNINatives.h" #include "mozilla/java/ImageDecoderNatives.h"
class imgIContainerCallback; class imgIContainerCallback;

View File

@ -6,12 +6,12 @@
#ifndef PrefsHelper_h #ifndef PrefsHelper_h
#define PrefsHelper_h #define PrefsHelper_h
#include "GeneratedJNINatives.h"
#include "MainThreadUtils.h" #include "MainThreadUtils.h"
#include "nsAppShell.h" #include "nsAppShell.h"
#include "nsCOMPtr.h" #include "nsCOMPtr.h"
#include "nsVariant.h" #include "nsVariant.h"
#include "mozilla/java/PrefsHelperNatives.h"
#include "mozilla/Preferences.h" #include "mozilla/Preferences.h"
#include "mozilla/Services.h" #include "mozilla/Services.h"

View File

@ -6,12 +6,13 @@
#include "ScreenHelperAndroid.h" #include "ScreenHelperAndroid.h"
#include "AndroidRect.h" #include "AndroidRect.h"
#include "GeneratedJNINatives.h"
#include "nsThreadUtils.h" #include "nsThreadUtils.h"
#include <mozilla/jni/Refs.h> #include <mozilla/jni/Refs.h>
#include "mozilla/Atomics.h" #include "mozilla/Atomics.h"
#include "mozilla/java/GeckoAppShellWrappers.h"
#include "mozilla/java/ScreenManagerHelperNatives.h"
#include "mozilla/widget/ScreenManager.h" #include "mozilla/widget/ScreenManager.h"
using namespace mozilla; using namespace mozilla;

View File

@ -6,7 +6,7 @@
#ifndef mozilla_widget_Telemetry_h__ #ifndef mozilla_widget_Telemetry_h__
#define mozilla_widget_Telemetry_h__ #define mozilla_widget_Telemetry_h__
#include "GeneratedJNINatives.h" #include "mozilla/java/TelemetryUtilsNatives.h"
#include "nsAppShell.h" #include "nsAppShell.h"
#include "nsIAndroidBridge.h" #include "nsIAndroidBridge.h"

View File

@ -5,6 +5,8 @@
#include "mozilla/dom/AndroidWebAuthnTokenManager.h" #include "mozilla/dom/AndroidWebAuthnTokenManager.h"
#include "mozilla/java/WebAuthnTokenManagerNatives.h"
namespace mozilla { namespace mozilla {
class WebAuthnTokenManager final class WebAuthnTokenManager final
: public java::WebAuthnTokenManager::Natives<WebAuthnTokenManager> { : public java::WebAuthnTokenManager::Natives<WebAuthnTokenManager> {

View File

@ -23,6 +23,12 @@
#include "nsIDNSListener.h" #include "nsIDNSListener.h"
#include "nsIDNSRecord.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/DNS.h" // for NetAddr
#include "mozilla/net/CookieJarSettings.h" #include "mozilla/net/CookieJarSettings.h"
#include "mozilla/Preferences.h" #include "mozilla/Preferences.h"

View File

@ -6,7 +6,9 @@
#ifndef WebExecutorSupport_h__ #ifndef WebExecutorSupport_h__
#define 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 mozilla {
namespace widget { namespace widget {

View File

@ -7,6 +7,8 @@
#ifndef mozilla_jni_GeckoBundleUtils_h #ifndef mozilla_jni_GeckoBundleUtils_h
#define mozilla_jni_GeckoBundleUtils_h #define mozilla_jni_GeckoBundleUtils_h
#include "mozilla/java/GeckoBundleWrappers.h"
namespace mozilla { namespace mozilla {
namespace jni { namespace jni {

View File

@ -7,9 +7,8 @@
#ifndef mozilla_jni_GeckoResultUtils_h #ifndef mozilla_jni_GeckoResultUtils_h
#define mozilla_jni_GeckoResultUtils_h #define mozilla_jni_GeckoResultUtils_h
#include "mozilla/java/GeckoResultNatives.h"
#include "mozilla/jni/Conversions.h" #include "mozilla/jni/Conversions.h"
#include "GeneratedJNIWrappers.h"
#include "GeneratedJNINatives.h"
namespace mozilla { namespace mozilla {
namespace jni { namespace jni {

View File

@ -11,8 +11,9 @@
#include <pthread.h> #include <pthread.h>
#include "mozilla/Assertions.h" #include "mozilla/Assertions.h"
#include "mozilla/java/GeckoAppShellWrappers.h"
#include "mozilla/java/GeckoThreadWrappers.h"
#include "GeneratedJNIWrappers.h"
#include "AndroidBuild.h" #include "AndroidBuild.h"
#include "nsAppShell.h" #include "nsAppShell.h"
#include "nsExceptionHandler.h" #include "nsExceptionHandler.h"

View File

@ -10,7 +10,7 @@
#include "android/log.h" #include "android/log.h"
#include "nsBaseChannel.h" #include "nsBaseChannel.h"
#include "AndroidBridge.h" #include "AndroidBridge.h"
#include "GeneratedJNIWrappers.h" #include "mozilla/java/GeckoAppShellWrappers.h"
using namespace mozilla; using namespace mozilla;

View File

@ -33,13 +33,15 @@
#include "mozilla/dom/BrowserChild.h" #include "mozilla/dom/BrowserChild.h"
#include "mozilla/intl/OSPreferences.h" #include "mozilla/intl/OSPreferences.h"
#include "mozilla/ipc/GeckoChildProcessHost.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 "mozilla/widget/ScreenManager.h"
#include "prenv.h" #include "prenv.h"
#include "AndroidBridge.h" #include "AndroidBridge.h"
#include "AndroidBridgeUtilities.h" #include "AndroidBridgeUtilities.h"
#include "AndroidSurfaceTexture.h" #include "AndroidSurfaceTexture.h"
#include "GeneratedJNINatives.h"
#include <android/log.h> #include <android/log.h>
#include <pthread.h> #include <pthread.h>
#include <wchar.h> #include <wchar.h>

View File

@ -2,8 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * 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 "nsClipboard.h"
#include "GeneratedJNIWrappers.h"
#include "nsISupportsPrimitives.h" #include "nsISupportsPrimitives.h"
#include "nsCOMPtr.h" #include "nsCOMPtr.h"
#include "nsComponentManagerUtils.h" #include "nsComponentManagerUtils.h"

View File

@ -11,6 +11,8 @@
#include "gfxFontConstants.h" #include "gfxFontConstants.h"
#include "mozilla/FontPropertyTypes.h" #include "mozilla/FontPropertyTypes.h"
#include "mozilla/gfx/2D.h" #include "mozilla/gfx/2D.h"
#include "mozilla/java/GeckoAppShellWrappers.h"
#include "mozilla/java/GeckoSystemStateListenerWrappers.h"
using namespace mozilla; using namespace mozilla;
using mozilla::dom::ContentChild; using mozilla::dom::ContentChild;

View File

@ -81,9 +81,16 @@ using mozilla::dom::ContentParent;
#include "AndroidBridgeUtilities.h" #include "AndroidBridgeUtilities.h"
#include "AndroidUiThread.h" #include "AndroidUiThread.h"
#include "GeckoEditableSupport.h" #include "GeckoEditableSupport.h"
#include "GeneratedJNINatives.h"
#include "KeyEvent.h" #include "KeyEvent.h"
#include "MotionEvent.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 "ScreenHelperAndroid.h"
#include "GeckoProfiler.h" // For AUTO_PROFILER_LABEL #include "GeckoProfiler.h" // For AUTO_PROFILER_LABEL

View File

@ -12,8 +12,8 @@
#include "nsIIdleServiceInternal.h" #include "nsIIdleServiceInternal.h"
#include "nsTArray.h" #include "nsTArray.h"
#include "EventDispatcher.h" #include "EventDispatcher.h"
#include "GeneratedJNIWrappers.h"
#include "mozilla/EventForwards.h" #include "mozilla/EventForwards.h"
#include "mozilla/java/GeckoBundleWrappers.h"
#include "mozilla/MozPromise.h" #include "mozilla/MozPromise.h"
#include "mozilla/Mutex.h" #include "mozilla/Mutex.h"
#include "mozilla/StaticPtr.h" #include "mozilla/StaticPtr.h"