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_web_view_util.h" | 7 #include "android_webview/native/android_web_view_util.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.h" | 9 #include "android_webview/native/aw_contents_io_thread_client.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/cookie_manager.h" | 11 #include "android_webview/native/cookie_manager.h" |
| 12 #include "android_webview/native/js_result_handler.h" |
12 #include "base/android/jni_android.h" | 13 #include "base/android/jni_android.h" |
13 #include "base/android/jni_registrar.h" | 14 #include "base/android/jni_registrar.h" |
14 #include "chrome/browser/component/web_contents_delegate_android/component_jni_r
egistrar.h" | 15 #include "chrome/browser/component/web_contents_delegate_android/component_jni_r
egistrar.h" |
15 | 16 |
16 namespace android_webview { | 17 namespace android_webview { |
17 | 18 |
18 static base::android::RegistrationMethod kWebViewRegisteredMethods[] = { | 19 static base::android::RegistrationMethod kWebViewRegisteredMethods[] = { |
19 { "AndroidWebViewUtil", RegisterAndroidWebViewUtil }, | 20 { "AndroidWebViewUtil", RegisterAndroidWebViewUtil }, |
20 { "AwContents", RegisterAwContents }, | 21 { "AwContents", RegisterAwContents }, |
21 { "AwContentsIoThreadClient", RegisterAwContentsIoThreadClient}, | 22 { "AwContentsIoThreadClient", RegisterAwContentsIoThreadClient}, |
22 { "AwHttpAuthHandler", RegisterAwHttpAuthHandler }, | 23 { "AwHttpAuthHandler", RegisterAwHttpAuthHandler }, |
23 { "CookieManager", RegisterCookieManager }, | 24 { "CookieManager", RegisterCookieManager }, |
| 25 { "JsResultHandler", RegisterJsResultHandler }, |
24 }; | 26 }; |
25 | 27 |
26 bool RegisterJni(JNIEnv* env) { | 28 bool RegisterJni(JNIEnv* env) { |
27 if (!web_contents_delegate_android::RegisterJni(env)) | 29 if (!web_contents_delegate_android::RegisterJni(env)) |
28 return false; | 30 return false; |
29 | 31 |
30 return RegisterNativeMethods(env, | 32 return RegisterNativeMethods(env, |
31 kWebViewRegisteredMethods, arraysize(kWebViewRegisteredMethods)); | 33 kWebViewRegisteredMethods, arraysize(kWebViewRegisteredMethods)); |
32 } | 34 } |
33 | 35 |
34 } // namespace android_webview | 36 } // namespace android_webview |
OLD | NEW |