Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: android_webview/lib/main/webview_entry_point.cc

Issue 11823046: Move content/components/web_contents_delegate_android to components/web_contents_delegate_android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (win7_aura so slow!!) Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/lib/DEPS ('k') | android_webview/native/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « android_webview/lib/DEPS ('k') | android_webview/native/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698