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