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