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/aw_autofill_manager_delegate.h" | 8 #include "android_webview/native/aw_autofill_manager_delegate.h" |
9 #include "android_webview/native/aw_contents.h" | 9 #include "android_webview/native/aw_contents.h" |
10 #include "android_webview/native/aw_contents_client_bridge.h" | 10 #include "android_webview/native/aw_contents_client_bridge.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_form_database.h" | 12 #include "android_webview/native/aw_form_database.h" |
13 #include "android_webview/native/aw_http_auth_handler.h" | 13 #include "android_webview/native/aw_http_auth_handler.h" |
| 14 #include "android_webview/native/aw_picture.h" |
14 #include "android_webview/native/aw_quota_manager_bridge_impl.h" | 15 #include "android_webview/native/aw_quota_manager_bridge_impl.h" |
15 #include "android_webview/native/aw_resource.h" | 16 #include "android_webview/native/aw_resource.h" |
16 #include "android_webview/native/aw_settings.h" | 17 #include "android_webview/native/aw_settings.h" |
17 #include "android_webview/native/aw_web_contents_delegate.h" | 18 #include "android_webview/native/aw_web_contents_delegate.h" |
18 #include "android_webview/native/cookie_manager.h" | 19 #include "android_webview/native/cookie_manager.h" |
19 #include "android_webview/native/input_stream_impl.h" | 20 #include "android_webview/native/input_stream_impl.h" |
20 #include "android_webview/native/intercepted_request_data_impl.h" | 21 #include "android_webview/native/intercepted_request_data_impl.h" |
21 #include "android_webview/native/java_browser_view_renderer_helper.h" | 22 #include "android_webview/native/java_browser_view_renderer_helper.h" |
22 #include "base/android/jni_android.h" | 23 #include "base/android/jni_android.h" |
23 #include "base/android/jni_registrar.h" | 24 #include "base/android/jni_registrar.h" |
24 #include "base/debug/trace_event.h" | 25 #include "base/debug/trace_event.h" |
25 | 26 |
26 namespace android_webview { | 27 namespace android_webview { |
27 | 28 |
28 static base::android::RegistrationMethod kWebViewRegisteredMethods[] = { | 29 static base::android::RegistrationMethod kWebViewRegisteredMethods[] = { |
29 // Register JNI for android_webview classes. | 30 // Register JNI for android_webview classes. |
30 { "AndroidProtocolHandler", RegisterAndroidProtocolHandler }, | 31 { "AndroidProtocolHandler", RegisterAndroidProtocolHandler }, |
31 { "AwAutofillManagerDelegate", RegisterAwAutofillManagerDelegate }, | 32 { "AwAutofillManagerDelegate", RegisterAwAutofillManagerDelegate }, |
32 { "AwContents", RegisterAwContents }, | 33 { "AwContents", RegisterAwContents }, |
33 { "AwContentsClientBridge", RegisterAwContentsClientBridge }, | 34 { "AwContentsClientBridge", RegisterAwContentsClientBridge }, |
34 { "AwContentsIoThreadClientImpl", RegisterAwContentsIoThreadClientImpl}, | 35 { "AwContentsIoThreadClientImpl", RegisterAwContentsIoThreadClientImpl }, |
35 { "AwFormDatabase", RegisterAwFormDatabase}, | 36 { "AwFormDatabase", RegisterAwFormDatabase }, |
| 37 { "AwPicture", RegisterAwPicture }, |
36 { "AwSettings", RegisterAwSettings }, | 38 { "AwSettings", RegisterAwSettings }, |
37 { "AwHttpAuthHandler", RegisterAwHttpAuthHandler }, | 39 { "AwHttpAuthHandler", RegisterAwHttpAuthHandler }, |
38 { "AwQuotaManagerBridge", RegisterAwQuotaManagerBridge }, | 40 { "AwQuotaManagerBridge", RegisterAwQuotaManagerBridge }, |
39 { "AwResource", AwResource::RegisterAwResource }, | 41 { "AwResource", AwResource::RegisterAwResource }, |
40 { "AwWebContentsDelegate", RegisterAwWebContentsDelegate }, | 42 { "AwWebContentsDelegate", RegisterAwWebContentsDelegate }, |
41 { "CookieManager", RegisterCookieManager }, | 43 { "CookieManager", RegisterCookieManager }, |
42 { "InterceptedRequestDataImpl", RegisterInterceptedRequestData }, | 44 { "InterceptedRequestDataImpl", RegisterInterceptedRequestData }, |
43 { "InputStream", RegisterInputStream }, | 45 { "InputStream", RegisterInputStream }, |
44 { "JavaBrowserViewRendererHelper", RegisterJavaBrowserViewRendererHelper }, | 46 { "JavaBrowserViewRendererHelper", RegisterJavaBrowserViewRendererHelper }, |
45 }; | 47 }; |
46 | 48 |
47 bool RegisterJni(JNIEnv* env) { | 49 bool RegisterJni(JNIEnv* env) { |
48 TRACE_EVENT0("startup", "android_webview::RegisterJni"); | 50 TRACE_EVENT0("startup", "android_webview::RegisterJni"); |
49 return RegisterNativeMethods(env, | 51 return RegisterNativeMethods(env, |
50 kWebViewRegisteredMethods, arraysize(kWebViewRegisteredMethods)); | 52 kWebViewRegisteredMethods, arraysize(kWebViewRegisteredMethods)); |
51 } | 53 } |
52 | 54 |
53 } // namespace android_webview | 55 } // namespace android_webview |
OLD | NEW |