OLD | NEW |
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/aw_contents.h" | 9 #include "android_webview/native/aw_contents.h" |
10 #include "android_webview/native/aw_contents_io_thread_client_impl.h" | 10 #include "android_webview/native/aw_contents_io_thread_client_impl.h" |
11 #include "android_webview/native/aw_http_auth_handler.h" | 11 #include "android_webview/native/aw_http_auth_handler.h" |
12 #include "android_webview/native/aw_resource.h" | 12 #include "android_webview/native/aw_resource.h" |
| 13 #include "android_webview/native/aw_web_contents_delegate.h" |
13 #include "android_webview/native/cookie_manager.h" | 14 #include "android_webview/native/cookie_manager.h" |
14 #include "android_webview/native/intercepted_request_data_impl.h" | 15 #include "android_webview/native/intercepted_request_data_impl.h" |
15 #include "android_webview/native/js_result_handler.h" | 16 #include "android_webview/native/js_result_handler.h" |
16 #include "base/android/jni_android.h" | 17 #include "base/android/jni_android.h" |
17 #include "base/android/jni_registrar.h" | 18 #include "base/android/jni_registrar.h" |
18 #include "content/components/navigation_interception/component_jni_registrar.h" | 19 #include "content/components/navigation_interception/component_jni_registrar.h" |
19 #include "content/components/web_contents_delegate_android/component_jni_registr
ar.h" | 20 #include "content/components/web_contents_delegate_android/component_jni_registr
ar.h" |
20 | 21 |
21 namespace android_webview { | 22 namespace android_webview { |
22 | 23 |
23 static base::android::RegistrationMethod kWebViewRegisteredMethods[] = { | 24 static base::android::RegistrationMethod kWebViewRegisteredMethods[] = { |
24 // Register JNI for components we depend on. | 25 // Register JNI for components we depend on. |
25 { "navigation_interception", content::RegisterNavigationInterceptionJni }, | 26 { "navigation_interception", content::RegisterNavigationInterceptionJni }, |
26 { "web_contents_delegate_android", | 27 { "web_contents_delegate_android", |
27 content::RegisterWebContentsDelegateAndroidJni }, | 28 content::RegisterWebContentsDelegateAndroidJni }, |
28 // Register JNI for android_webview classes. | 29 // Register JNI for android_webview classes. |
29 { "AndroidProtocolHandler", RegisterAndroidProtocolHandler }, | 30 { "AndroidProtocolHandler", RegisterAndroidProtocolHandler }, |
30 { "AndroidStreamReaderUrlRequestJob", | 31 { "AndroidStreamReaderUrlRequestJob", |
31 RegisterAndroidStreamReaderUrlRequestJob }, | 32 RegisterAndroidStreamReaderUrlRequestJob }, |
32 { "AwContents", RegisterAwContents }, | 33 { "AwContents", RegisterAwContents }, |
33 { "AwContentsIoThreadClientImpl", RegisterAwContentsIoThreadClientImpl}, | 34 { "AwContentsIoThreadClientImpl", RegisterAwContentsIoThreadClientImpl}, |
34 { "AwHttpAuthHandler", RegisterAwHttpAuthHandler }, | 35 { "AwHttpAuthHandler", RegisterAwHttpAuthHandler }, |
35 { "AwResource", AwResource::RegisterAwResource }, | 36 { "AwResource", AwResource::RegisterAwResource }, |
| 37 { "AwWebContentsDelegate", RegisterAwWebContentsDelegate }, |
36 { "CookieManager", RegisterCookieManager }, | 38 { "CookieManager", RegisterCookieManager }, |
37 { "InterceptedRequestDataImpl", RegisterInterceptedRequestData }, | 39 { "InterceptedRequestDataImpl", RegisterInterceptedRequestData }, |
38 { "JsResultHandler", RegisterJsResultHandler }, | 40 { "JsResultHandler", RegisterJsResultHandler }, |
39 }; | 41 }; |
40 | 42 |
41 bool RegisterJni(JNIEnv* env) { | 43 bool RegisterJni(JNIEnv* env) { |
42 return RegisterNativeMethods(env, | 44 return RegisterNativeMethods(env, |
43 kWebViewRegisteredMethods, arraysize(kWebViewRegisteredMethods)); | 45 kWebViewRegisteredMethods, arraysize(kWebViewRegisteredMethods)); |
44 } | 46 } |
45 | 47 |
46 } // namespace android_webview | 48 } // namespace android_webview |
OLD | NEW |