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_client.h" | 8 #include "android_webview/native/aw_autofill_client.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_statics.h" | 11 #include "android_webview/native/aw_contents_statics.h" |
12 #include "android_webview/native/aw_debug.h" | 12 #include "android_webview/native/aw_debug.h" |
13 #include "android_webview/native/aw_dev_tools_server.h" | 13 #include "android_webview/native/aw_dev_tools_server.h" |
14 #include "android_webview/native/aw_form_database.h" | 14 #include "android_webview/native/aw_form_database.h" |
15 #include "android_webview/native/aw_gl_functor.h" | 15 #include "android_webview/native/aw_gl_functor.h" |
16 #include "android_webview/native/aw_http_auth_handler.h" | 16 #include "android_webview/native/aw_http_auth_handler.h" |
17 #include "android_webview/native/aw_message_port_service_impl.h" | 17 #include "android_webview/native/aw_message_port_service_impl.h" |
18 #include "android_webview/native/aw_metrics_switch.h" | 18 #include "android_webview/native/aw_metrics_switch.h" |
19 #include "android_webview/native/aw_pdf_exporter.h" | 19 #include "android_webview/native/aw_pdf_exporter.h" |
20 #include "android_webview/native/aw_picture.h" | 20 #include "android_webview/native/aw_picture.h" |
21 #include "android_webview/native/aw_quota_manager_bridge_impl.h" | 21 #include "android_webview/native/aw_quota_manager_bridge_impl.h" |
22 #include "android_webview/native/aw_settings.h" | 22 #include "android_webview/native/aw_settings.h" |
23 #include "android_webview/native/aw_web_contents_delegate.h" | 23 #include "android_webview/native/aw_web_contents_delegate.h" |
24 #include "android_webview/native/cookie_manager.h" | 24 #include "android_webview/native/cookie_manager.h" |
25 #include "android_webview/native/permission/aw_permission_request.h" | 25 #include "android_webview/native/permission/aw_permission_request.h" |
26 #include "base/android/jni_android.h" | 26 #include "base/android/jni_android.h" |
27 #include "base/android/jni_registrar.h" | 27 #include "base/android/jni_registrar.h" |
28 #include "base/trace_event/trace_event.h" | 28 #include "base/trace_event/trace_event.h" |
| 29 #include "components/spellcheck/browser/android/component_jni_registrar.h" |
29 | 30 |
30 namespace android_webview { | 31 namespace android_webview { |
31 | 32 |
32 static base::android::RegistrationMethod kWebViewRegisteredMethods[] = { | 33 static base::android::RegistrationMethod kWebViewRegisteredMethods[] = { |
33 // Register JNI for android_webview classes. | 34 // Register JNI for android_webview classes. |
34 { "AndroidProtocolHandler", RegisterAndroidProtocolHandler }, | 35 { "AndroidProtocolHandler", RegisterAndroidProtocolHandler }, |
35 { "AwAutofillClient", RegisterAwAutofillClient }, | 36 { "AwAutofillClient", RegisterAwAutofillClient }, |
36 { "AwContents", RegisterAwContents }, | 37 { "AwContents", RegisterAwContents }, |
37 { "AwContentsClientBridge", RegisterAwContentsClientBridge }, | 38 { "AwContentsClientBridge", RegisterAwContentsClientBridge }, |
38 { "AwContentsStatics", RegisterAwContentsStatics }, | 39 { "AwContentsStatics", RegisterAwContentsStatics }, |
39 { "AwDebug", RegisterAwDebug }, | 40 { "AwDebug", RegisterAwDebug }, |
40 { "AwDevToolsServer", RegisterAwDevToolsServer }, | 41 { "AwDevToolsServer", RegisterAwDevToolsServer }, |
41 { "AwFormDatabase", RegisterAwFormDatabase }, | 42 { "AwFormDatabase", RegisterAwFormDatabase }, |
42 { "AwPicture", RegisterAwPicture }, | 43 { "AwPicture", RegisterAwPicture }, |
43 { "AwSettings", RegisterAwSettings }, | 44 { "AwSettings", RegisterAwSettings }, |
44 { "AwHttpAuthHandler", RegisterAwHttpAuthHandler }, | 45 { "AwHttpAuthHandler", RegisterAwHttpAuthHandler }, |
45 { "AwMetricsServiceClient", RegisterAwMetricsServiceClient }, | 46 { "AwMetricsServiceClient", RegisterAwMetricsServiceClient }, |
46 { "AwPdfExporter", RegisterAwPdfExporter }, | 47 { "AwPdfExporter", RegisterAwPdfExporter }, |
47 { "AwPermissionRequest", RegisterAwPermissionRequest }, | 48 { "AwPermissionRequest", RegisterAwPermissionRequest }, |
48 { "AwQuotaManagerBridge", RegisterAwQuotaManagerBridge }, | 49 { "AwQuotaManagerBridge", RegisterAwQuotaManagerBridge }, |
49 { "AwWebContentsDelegate", RegisterAwWebContentsDelegate }, | 50 { "AwWebContentsDelegate", RegisterAwWebContentsDelegate }, |
50 { "CookieManager", RegisterCookieManager }, | 51 { "CookieManager", RegisterCookieManager }, |
51 { "AwMessagePortService", RegisterAwMessagePortService }, | 52 { "AwMessagePortService", RegisterAwMessagePortService }, |
52 { "AwGLFunctor", RegisterAwGLFunctor }, | 53 { "AwGLFunctor", RegisterAwGLFunctor }, |
| 54 #if defined(ENABLE_SPELLCHECK) |
| 55 {"SpellCheckerSessionBridge", spellcheck::android::RegisterSpellcheckJni}, |
| 56 #endif |
53 }; | 57 }; |
54 | 58 |
55 bool RegisterJni(JNIEnv* env) { | 59 bool RegisterJni(JNIEnv* env) { |
56 TRACE_EVENT0("startup", "android_webview::RegisterJni"); | 60 TRACE_EVENT0("startup", "android_webview::RegisterJni"); |
57 return RegisterNativeMethods(env, | 61 return RegisterNativeMethods(env, |
58 kWebViewRegisteredMethods, arraysize(kWebViewRegisteredMethods)); | 62 kWebViewRegisteredMethods, arraysize(kWebViewRegisteredMethods)); |
59 } | 63 } |
60 | 64 |
61 } // namespace android_webview | 65 } // namespace android_webview |
OLD | NEW |