| Index: android_webview/lib/main/webview_entry_point.cc
|
| diff --git a/android_webview/lib/main/webview_entry_point.cc b/android_webview/lib/main/webview_entry_point.cc
|
| index 567161edcecc4303492a23f27f1fb679466ecbcc..a7338b16fa0b261e0e3a473a1f89f7cd55c2224a 100644
|
| --- a/android_webview/lib/main/webview_entry_point.cc
|
| +++ b/android_webview/lib/main/webview_entry_point.cc
|
| @@ -5,9 +5,19 @@
|
| #include "android_webview/lib/main/aw_main_delegate.h"
|
| #include "android_webview/native/android_webview_jni_registrar.h"
|
| #include "base/android/jni_android.h"
|
| +#include "base/android/jni_registrar.h"
|
| +#include "components/web_contents_delegate_android/component_jni_registrar.h"
|
| +#include "content/components/navigation_interception/component_jni_registrar.h"
|
| #include "content/public/app/android_library_loader_hooks.h"
|
| #include "content/public/app/content_main.h"
|
|
|
| +static base::android::RegistrationMethod
|
| +kWebViewDependencyRegisteredMethods[] = {
|
| + { "NavigationInterception", content::RegisterNavigationInterceptionJni },
|
| + { "WebContentsDelegateAndroid",
|
| + components::RegisterWebContentsDelegateAndroidJni },
|
| +};
|
| +
|
| // This is called by the VM when the shared library is first loaded.
|
| // Most of the initialization is done in LibraryLoadedOnMainThread(), not here.
|
| JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
| @@ -16,6 +26,13 @@ JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
| if (!content::RegisterLibraryLoaderEntryHook(env))
|
| return -1;
|
|
|
| + // Register JNI for components we depend on.
|
| + if (!RegisterNativeMethods(
|
| + env,
|
| + kWebViewDependencyRegisteredMethods,
|
| + arraysize(kWebViewDependencyRegisteredMethods)))
|
| + return -1;
|
| +
|
| if (!android_webview::RegisterJni(env))
|
| return -1;
|
|
|
|
|