| 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 "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "chrome/browser/android/chrome_web_contents_delegate_android.h" | 10 #include "chrome/browser/android/chrome_web_contents_delegate_android.h" |
| 11 #include "chrome/browser/android/content_view_util.h" | 11 #include "chrome/browser/android/content_view_util.h" |
| 12 #include "chrome/browser/android/dev_tools_server.h" | 12 #include "chrome/browser/android/dev_tools_server.h" |
| 13 #include "chrome/browser/android/favicon_helper.h" | 13 #include "chrome/browser/android/favicon_helper.h" |
| 14 #include "chrome/browser/android/field_trial_helper.h" | 14 #include "chrome/browser/android/field_trial_helper.h" |
| 15 #include "chrome/browser/android/intent_helper.h" | 15 #include "chrome/browser/android/intent_helper.h" |
| 16 #include "chrome/browser/android/most_visited_sites.h" | 16 #include "chrome/browser/android/most_visited_sites.h" |
| 17 #include "chrome/browser/android/provider/chrome_browser_provider.h" | 17 #include "chrome/browser/android/provider/chrome_browser_provider.h" |
| 18 #include "chrome/browser/android/signin/signin_manager_android.h" | 18 #include "chrome/browser/android/signin/signin_manager_android.h" |
| 19 #include "chrome/browser/android/tab_android.h" | 19 #include "chrome/browser/android/tab_android.h" |
| 20 #include "chrome/browser/autofill/android/personal_data_manager_android.h" | 20 #include "chrome/browser/autofill/android/personal_data_manager_android.h" |
| 21 #include "chrome/browser/history/android/sqlite_cursor.h" | 21 #include "chrome/browser/history/android/sqlite_cursor.h" |
| 22 #include "chrome/browser/lifetime/application_lifetime_android.h" | 22 #include "chrome/browser/lifetime/application_lifetime_android.h" |
| 23 #include "chrome/browser/profiles/profile_android.h" | 23 #include "chrome/browser/profiles/profile_android.h" |
| 24 #include "chrome/browser/search_engines/template_url_service_android.h" | 24 #include "chrome/browser/search_engines/template_url_service_android.h" |
| 25 #include "chrome/browser/signin/android_profile_oauth2_token_service.h" | 25 #include "chrome/browser/signin/android_profile_oauth2_token_service.h" |
| 26 #include "chrome/browser/speech/tts_android.h" | 26 #include "chrome/browser/speech/tts_android.h" |
| 27 #include "chrome/browser/sync/profile_sync_service_android.h" | 27 #include "chrome/browser/sync/profile_sync_service_android.h" |
| 28 #include "chrome/browser/ui/android/autofill/autofill_dialog_view_android.h" | 28 #include "chrome/browser/ui/android/autofill/autofill_dialog_result.h" |
| 29 #include "chrome/browser/ui/android/autofill/autofill_dialog_tab_manager_delegat
e_android.h" |
| 29 #include "chrome/browser/ui/android/autofill/autofill_popup_view_android.h" | 30 #include "chrome/browser/ui/android/autofill/autofill_popup_view_android.h" |
| 30 #include "chrome/browser/ui/android/chrome_http_auth_handler.h" | 31 #include "chrome/browser/ui/android/chrome_http_auth_handler.h" |
| 31 #include "chrome/browser/ui/android/javascript_app_modal_dialog_android.h" | 32 #include "chrome/browser/ui/android/javascript_app_modal_dialog_android.h" |
| 32 #include "chrome/browser/ui/android/navigation_popup.h" | 33 #include "chrome/browser/ui/android/navigation_popup.h" |
| 33 #include "chrome/browser/ui/android/ssl_client_certificate_request.h" | 34 #include "chrome/browser/ui/android/ssl_client_certificate_request.h" |
| 34 #include "chrome/browser/ui/android/validation_message_bubble_android.h" | 35 #include "chrome/browser/ui/android/validation_message_bubble_android.h" |
| 35 #include "chrome/browser/ui/android/website_settings_popup_android.h" | 36 #include "chrome/browser/ui/android/website_settings_popup_android.h" |
| 36 #include "components/autofill/core/browser/android/component_jni_registrar.h" | 37 #include "components/autofill/core/browser/android/component_jni_registrar.h" |
| 37 #include "components/navigation_interception/component_jni_registrar.h" | 38 #include "components/navigation_interception/component_jni_registrar.h" |
| 38 #include "components/web_contents_delegate_android/component_jni_registrar.h" | 39 #include "components/web_contents_delegate_android/component_jni_registrar.h" |
| 39 | 40 |
| 40 bool RegisterCertificateViewer(JNIEnv* env); | 41 bool RegisterCertificateViewer(JNIEnv* env); |
| 41 | 42 |
| 42 namespace chrome { | 43 namespace chrome { |
| 43 namespace android { | 44 namespace android { |
| 44 | 45 |
| 45 static base::android::RegistrationMethod kChromeRegisteredMethods[] = { | 46 static base::android::RegistrationMethod kChromeRegisteredMethods[] = { |
| 46 // Register JNI for components we depend on. | 47 // Register JNI for components we depend on. |
| 47 { "NavigationInterception", | 48 { "NavigationInterception", |
| 48 navigation_interception::RegisterNavigationInterceptionJni }, | 49 navigation_interception::RegisterNavigationInterceptionJni }, |
| 49 { "WebContentsDelegateAndroid", | 50 { "WebContentsDelegateAndroid", |
| 50 web_contents_delegate_android::RegisterWebContentsDelegateAndroidJni }, | 51 web_contents_delegate_android::RegisterWebContentsDelegateAndroidJni }, |
| 51 { "RegisterAuxiliaryProfileLoader", autofill::RegisterAutofillAndroidJni }, | 52 { "RegisterAuxiliaryProfileLoader", autofill::RegisterAutofillAndroidJni }, |
| 52 // Register JNI for chrome classes. | 53 // Register JNI for chrome classes. |
| 53 { "AndroidProfileOAuth2TokenService", | 54 { "AndroidProfileOAuth2TokenService", |
| 54 AndroidProfileOAuth2TokenService::Register }, | 55 AndroidProfileOAuth2TokenService::Register }, |
| 55 { "ApplicationLifetime", RegisterApplicationLifetimeAndroid }, | 56 { "ApplicationLifetime", RegisterApplicationLifetimeAndroid }, |
| 56 { "AutofillDialog", | 57 { "AutofillDialogResult", |
| 57 autofill::AutofillDialogViewAndroid::RegisterAutofillDialogViewAndroid }, | 58 autofill::AutofillDialogResult::RegisterAutofillDialogResult }, |
| 59 { "AutofillDialogTabManagerAndroid", |
| 60 autofill::AutofillDialogTabManagerDelegateAndroid:: |
| 61 RegisterAutofillDialogTabManagerDelegateAndroid }, |
| 58 { "AutofillPopup", | 62 { "AutofillPopup", |
| 59 autofill::AutofillPopupViewAndroid::RegisterAutofillPopupViewAndroid }, | 63 autofill::AutofillPopupViewAndroid::RegisterAutofillPopupViewAndroid }, |
| 60 { "CertificateViewer", RegisterCertificateViewer }, | 64 { "CertificateViewer", RegisterCertificateViewer }, |
| 61 { "ChromeBrowserProvider", | 65 { "ChromeBrowserProvider", |
| 62 ChromeBrowserProvider::RegisterChromeBrowserProvider }, | 66 ChromeBrowserProvider::RegisterChromeBrowserProvider }, |
| 63 { "ChromeHttpAuthHandler", | 67 { "ChromeHttpAuthHandler", |
| 64 ChromeHttpAuthHandler::RegisterChromeHttpAuthHandler }, | 68 ChromeHttpAuthHandler::RegisterChromeHttpAuthHandler }, |
| 65 { "ChromeWebContentsDelegateAndroid", | 69 { "ChromeWebContentsDelegateAndroid", |
| 66 RegisterChromeWebContentsDelegateAndroid }, | 70 RegisterChromeWebContentsDelegateAndroid }, |
| 67 { "ContentViewUtil", RegisterContentViewUtil }, | 71 { "ContentViewUtil", RegisterContentViewUtil }, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 90 }; | 94 }; |
| 91 | 95 |
| 92 bool RegisterJni(JNIEnv* env) { | 96 bool RegisterJni(JNIEnv* env) { |
| 93 TRACE_EVENT0("startup", "chrome_android::RegisterJni"); | 97 TRACE_EVENT0("startup", "chrome_android::RegisterJni"); |
| 94 return RegisterNativeMethods(env, kChromeRegisteredMethods, | 98 return RegisterNativeMethods(env, kChromeRegisteredMethods, |
| 95 arraysize(kChromeRegisteredMethods)); | 99 arraysize(kChromeRegisteredMethods)); |
| 96 } | 100 } |
| 97 | 101 |
| 98 } // namespace android | 102 } // namespace android |
| 99 } // namespace chrome | 103 } // namespace chrome |
| OLD | NEW |