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_io_thread_client_impl.h" | 9 #include "android_webview/native/aw_contents_io_thread_client_impl.h" |
10 #include "android_webview/native/aw_http_auth_handler.h" | 10 #include "android_webview/native/aw_http_auth_handler.h" |
11 #include "android_webview/native/aw_resource.h" | 11 #include "android_webview/native/aw_resource.h" |
12 #include "android_webview/native/aw_web_contents_delegate.h" | 12 #include "android_webview/native/aw_web_contents_delegate.h" |
13 #include "android_webview/native/cookie_manager.h" | 13 #include "android_webview/native/cookie_manager.h" |
14 #include "android_webview/native/input_stream_impl.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 "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 }, |
boliu
2013/01/12 01:35:59
Are you planning on fixing namespace in a follow u
kaiwang
2013/01/15 00:39:15
Sure, will do
| |
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 { "AwContents", RegisterAwContents }, | 31 { "AwContents", RegisterAwContents }, |
32 { "AwContentsIoThreadClientImpl", RegisterAwContentsIoThreadClientImpl}, | 32 { "AwContentsIoThreadClientImpl", RegisterAwContentsIoThreadClientImpl}, |
33 { "AwHttpAuthHandler", RegisterAwHttpAuthHandler }, | 33 { "AwHttpAuthHandler", RegisterAwHttpAuthHandler }, |
34 { "AwResource", AwResource::RegisterAwResource }, | 34 { "AwResource", AwResource::RegisterAwResource }, |
35 { "AwWebContentsDelegate", RegisterAwWebContentsDelegate }, | 35 { "AwWebContentsDelegate", RegisterAwWebContentsDelegate }, |
36 { "CookieManager", RegisterCookieManager }, | 36 { "CookieManager", RegisterCookieManager }, |
37 { "InterceptedRequestDataImpl", RegisterInterceptedRequestData }, | 37 { "InterceptedRequestDataImpl", RegisterInterceptedRequestData }, |
38 { "InputStream", RegisterInputStream }, | 38 { "InputStream", RegisterInputStream }, |
39 { "JsResultHandler", RegisterJsResultHandler }, | 39 { "JsResultHandler", RegisterJsResultHandler }, |
40 }; | 40 }; |
41 | 41 |
42 bool RegisterJni(JNIEnv* env) { | 42 bool RegisterJni(JNIEnv* env) { |
43 return RegisterNativeMethods(env, | 43 return RegisterNativeMethods(env, |
44 kWebViewRegisteredMethods, arraysize(kWebViewRegisteredMethods)); | 44 kWebViewRegisteredMethods, arraysize(kWebViewRegisteredMethods)); |
45 } | 45 } |
46 | 46 |
47 } // namespace android_webview | 47 } // namespace android_webview |
OLD | NEW |