summaryrefslogtreecommitdiffstats
path: root/android_webview/lib/main/webview_entry_point.cc
diff options
context:
space:
mode:
authorboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-12 23:04:31 +0000
committerboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-12 23:04:31 +0000
commit434a1326361f04e671c0f998a60b20bab85ebaa7 (patch)
treecef45711481cadbeea31b12a505763d75ee93c54 /android_webview/lib/main/webview_entry_point.cc
parent50fc3337ba7a6f22f903d8c4235afdddb535f911 (diff)
downloadchromium_src-434a1326361f04e671c0f998a60b20bab85ebaa7.zip
chromium_src-434a1326361f04e671c0f998a60b20bab85ebaa7.tar.gz
chromium_src-434a1326361f04e671c0f998a60b20bab85ebaa7.tar.bz2
Move content/components/web_contents_delegate_android to components/web_contents_delegate_android
Moving files, change namespace from content to components, added/updated DEPS files, and fix builds BUG=169312 Review URL: https://chromiumcodereview.appspot.com/11823046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176598 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/lib/main/webview_entry_point.cc')
-rw-r--r--android_webview/lib/main/webview_entry_point.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/android_webview/lib/main/webview_entry_point.cc b/android_webview/lib/main/webview_entry_point.cc
index 567161e..a7338b1 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;