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