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

Unified Diff: android_webview/native/android_webview_jni_registrar.cc

Issue 10946008: Componentize IgnoreNavigationResourceThrottle and add chrome and webview specific implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved jni to component, added Java test code Created 8 years, 2 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
Index: android_webview/native/android_webview_jni_registrar.cc
diff --git a/android_webview/native/android_webview_jni_registrar.cc b/android_webview/native/android_webview_jni_registrar.cc
index f041015fe4628474eb389244eafbccaefff7f434..bec2cb658b96d17cfe8ee1b8358b2b5a47a505b2 100644
--- a/android_webview/native/android_webview_jni_registrar.cc
+++ b/android_webview/native/android_webview_jni_registrar.cc
@@ -14,11 +14,17 @@
#include "android_webview/native/js_result_handler.h"
#include "base/android/jni_android.h"
#include "base/android/jni_registrar.h"
+#include "chrome/browser/component/navigation_interception/component_jni_registrar.h"
#include "chrome/browser/component/web_contents_delegate_android/component_jni_registrar.h"
namespace android_webview {
static base::android::RegistrationMethod kWebViewRegisteredMethods[] = {
+ // Register JNI for components we depend on.
+ { "navigation_interception", navigation_interception::RegisterJni },
+ { "web_contents_delegate_android",
+ web_contents_delegate_android::RegisterJni },
+ // Register JNI for android_webview classes.
{ "AndroidProtocolHandler", RegisterAndroidProtocolHandler },
{ "AndroidStreamReaderUrlRequestJob",
RegisterAndroidStreamReaderUrlRequestJob },
@@ -31,9 +37,6 @@ static base::android::RegistrationMethod kWebViewRegisteredMethods[] = {
};
bool RegisterJni(JNIEnv* env) {
- if (!web_contents_delegate_android::RegisterJni(env))
- return false;
-
return RegisterNativeMethods(env,
kWebViewRegisteredMethods, arraysize(kWebViewRegisteredMethods));
}

Powered by Google App Engine
This is Rietveld 408576698