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 "chrome/browser/android/chrome_jni_registrar.h" | 5 #include "chrome/browser/android/chrome_jni_registrar.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_registrar.h" | 8 #include "base/android/jni_registrar.h" |
9 #include "chrome/browser/android/chrome_web_contents_delegate_android.h" | 9 #include "chrome/browser/android/chrome_web_contents_delegate_android.h" |
10 #include "chrome/browser/android/content_view_util.h" | 10 #include "chrome/browser/android/content_view_util.h" |
11 #include "chrome/browser/android/dev_tools_server.h" | 11 #include "chrome/browser/android/dev_tools_server.h" |
12 #include "chrome/browser/android/intent_helper.h" | 12 #include "chrome/browser/android/intent_helper.h" |
13 #include "chrome/browser/android/process_utils.h" | 13 #include "chrome/browser/android/process_utils.h" |
14 #include "chrome/browser/android/provider/chrome_browser_provider.h" | 14 #include "chrome/browser/android/provider/chrome_browser_provider.h" |
15 #include "chrome/browser/history/android/sqlite_cursor.h" | 15 #include "chrome/browser/history/android/sqlite_cursor.h" |
| 16 #include "chrome/browser/lifetime/application_lifetime_android.h" |
16 #include "chrome/browser/ui/android/autofill/autofill_popup_view_android.h" | 17 #include "chrome/browser/ui/android/autofill/autofill_popup_view_android.h" |
17 #include "chrome/browser/ui/android/chrome_http_auth_handler.h" | 18 #include "chrome/browser/ui/android/chrome_http_auth_handler.h" |
18 #include "chrome/browser/ui/android/javascript_app_modal_dialog_android.h" | 19 #include "chrome/browser/ui/android/javascript_app_modal_dialog_android.h" |
19 #include "chrome/browser/ui/android/navigation_popup.h" | 20 #include "chrome/browser/ui/android/navigation_popup.h" |
20 #include "content/components/navigation_interception/component_jni_registrar.h" | 21 #include "content/components/navigation_interception/component_jni_registrar.h" |
21 #include "content/components/web_contents_delegate_android/color_chooser_android
.h" | 22 #include "content/components/web_contents_delegate_android/color_chooser_android
.h" |
22 #include "content/components/web_contents_delegate_android/component_jni_registr
ar.h" | 23 #include "content/components/web_contents_delegate_android/component_jni_registr
ar.h" |
23 | 24 |
24 namespace chrome { | 25 namespace chrome { |
25 namespace android { | 26 namespace android { |
26 | 27 |
27 static base::android::RegistrationMethod kChromeRegisteredMethods[] = { | 28 static base::android::RegistrationMethod kChromeRegisteredMethods[] = { |
| 29 { "ApplicationLifetime", browser::RegisterApplicationLifetimeAndroid}, |
28 { "AutofillPopup", | 30 { "AutofillPopup", |
29 AutofillPopupViewAndroid::RegisterAutofillPopupViewAndroid}, | 31 AutofillPopupViewAndroid::RegisterAutofillPopupViewAndroid}, |
30 { "ChromeBrowserProvider", | 32 { "ChromeBrowserProvider", |
31 ChromeBrowserProvider::RegisterChromeBrowserProvider }, | 33 ChromeBrowserProvider::RegisterChromeBrowserProvider }, |
32 { "ChromeHttpAuthHandler", | 34 { "ChromeHttpAuthHandler", |
33 ChromeHttpAuthHandler::RegisterChromeHttpAuthHandler }, | 35 ChromeHttpAuthHandler::RegisterChromeHttpAuthHandler }, |
34 { "ChromeWebContentsDelegateAndroid", | 36 { "ChromeWebContentsDelegateAndroid", |
35 RegisterChromeWebContentsDelegateAndroid }, | 37 RegisterChromeWebContentsDelegateAndroid }, |
36 { "ColorChooserAndroid", content::RegisterColorChooserAndroid }, | 38 { "ColorChooserAndroid", content::RegisterColorChooserAndroid }, |
37 { "ContentViewUtil", RegisterContentViewUtil }, | 39 { "ContentViewUtil", RegisterContentViewUtil }, |
38 { "DevToolsServer", RegisterDevToolsServer }, | 40 { "DevToolsServer", RegisterDevToolsServer }, |
39 { "IntentHelper", RegisterIntentHelper }, | 41 { "IntentHelper", RegisterIntentHelper }, |
40 { "JavascriptAppModalDialog", | 42 { "JavascriptAppModalDialog", |
41 JavascriptAppModalDialogAndroid::RegisterJavascriptAppModalDialog }, | 43 JavascriptAppModalDialogAndroid::RegisterJavascriptAppModalDialog }, |
42 { "NavigationPopup", NavigationPopup::RegisterNavigationPopup }, | 44 { "NavigationPopup", NavigationPopup::RegisterNavigationPopup }, |
43 { "ProcessUtils", RegisterProcessUtils }, | 45 { "ProcessUtils", RegisterProcessUtils }, |
44 { "SqliteCursor", SQLiteCursor::RegisterSqliteCursor }, | 46 { "SqliteCursor", SQLiteCursor::RegisterSqliteCursor }, |
45 { "navigation_interception", content::RegisterNavigationInterceptionJni }, | 47 { "navigation_interception", content::RegisterNavigationInterceptionJni }, |
46 }; | 48 }; |
47 | 49 |
48 bool RegisterJni(JNIEnv* env) { | 50 bool RegisterJni(JNIEnv* env) { |
49 content::RegisterWebContentsDelegateAndroidJni(env); | 51 content::RegisterWebContentsDelegateAndroidJni(env); |
50 return RegisterNativeMethods(env, kChromeRegisteredMethods, | 52 return RegisterNativeMethods(env, kChromeRegisteredMethods, |
51 arraysize(kChromeRegisteredMethods)); | 53 arraysize(kChromeRegisteredMethods)); |
52 } | 54 } |
53 | 55 |
54 } // namespace android | 56 } // namespace android |
55 } // namespace chrome | 57 } // namespace chrome |
OLD | NEW |