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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/native/android_webview_jni_registrar.h" 5 #include "android_webview/native/android_webview_jni_registrar.h"
6 6
7 #include "android_webview/native/android_protocol_handler.h" 7 #include "android_webview/native/android_protocol_handler.h"
8 #include "android_webview/native/android_stream_reader_url_request_job.h" 8 #include "android_webview/native/android_stream_reader_url_request_job.h"
9 #include "android_webview/native/android_web_view_util.h" 9 #include "android_webview/native/android_web_view_util.h"
10 #include "android_webview/native/aw_contents.h" 10 #include "android_webview/native/aw_contents.h"
11 #include "android_webview/native/aw_contents_io_thread_client_impl.h" 11 #include "android_webview/native/aw_contents_io_thread_client_impl.h"
12 #include "android_webview/native/aw_http_auth_handler.h" 12 #include "android_webview/native/aw_http_auth_handler.h"
13 #include "android_webview/native/cookie_manager.h" 13 #include "android_webview/native/cookie_manager.h"
14 #include "android_webview/native/js_result_handler.h" 14 #include "android_webview/native/js_result_handler.h"
15 #include "base/android/jni_android.h" 15 #include "base/android/jni_android.h"
16 #include "base/android/jni_registrar.h" 16 #include "base/android/jni_registrar.h"
17 #include "chrome/browser/component/navigation_interception/component_jni_registr ar.h"
17 #include "chrome/browser/component/web_contents_delegate_android/component_jni_r egistrar.h" 18 #include "chrome/browser/component/web_contents_delegate_android/component_jni_r egistrar.h"
18 19
19 namespace android_webview { 20 namespace android_webview {
20 21
21 static base::android::RegistrationMethod kWebViewRegisteredMethods[] = { 22 static base::android::RegistrationMethod kWebViewRegisteredMethods[] = {
23 // Register JNI for components we depend on.
24 { "navigation_interception", navigation_interception::RegisterJni },
25 { "web_contents_delegate_android",
26 web_contents_delegate_android::RegisterJni },
27 // Register JNI for android_webview classes.
22 { "AndroidProtocolHandler", RegisterAndroidProtocolHandler }, 28 { "AndroidProtocolHandler", RegisterAndroidProtocolHandler },
23 { "AndroidStreamReaderUrlRequestJob", 29 { "AndroidStreamReaderUrlRequestJob",
24 RegisterAndroidStreamReaderUrlRequestJob }, 30 RegisterAndroidStreamReaderUrlRequestJob },
25 { "AndroidWebViewUtil", RegisterAndroidWebViewUtil }, 31 { "AndroidWebViewUtil", RegisterAndroidWebViewUtil },
26 { "AwContents", RegisterAwContents }, 32 { "AwContents", RegisterAwContents },
27 { "AwContentsIoThreadClientImpl", RegisterAwContentsIoThreadClientImpl}, 33 { "AwContentsIoThreadClientImpl", RegisterAwContentsIoThreadClientImpl},
28 { "AwHttpAuthHandler", RegisterAwHttpAuthHandler }, 34 { "AwHttpAuthHandler", RegisterAwHttpAuthHandler },
29 { "CookieManager", RegisterCookieManager }, 35 { "CookieManager", RegisterCookieManager },
30 { "JsResultHandler", RegisterJsResultHandler }, 36 { "JsResultHandler", RegisterJsResultHandler },
31 }; 37 };
32 38
33 bool RegisterJni(JNIEnv* env) { 39 bool RegisterJni(JNIEnv* env) {
34 if (!web_contents_delegate_android::RegisterJni(env))
35 return false;
36
37 return RegisterNativeMethods(env, 40 return RegisterNativeMethods(env,
38 kWebViewRegisteredMethods, arraysize(kWebViewRegisteredMethods)); 41 kWebViewRegisteredMethods, arraysize(kWebViewRegisteredMethods));
39 } 42 }
40 43
41 } // namespace android_webview 44 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698