Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4114)

Unified Diff: chrome/browser/android/chrome_jni_registrar.cc

Issue 2146753002: Android: Remove unneeded RegisterNatives() calls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android: Don't require RegisterNatives if there are none Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/chrome_jni_registrar.cc
diff --git a/chrome/browser/android/chrome_jni_registrar.cc b/chrome/browser/android/chrome_jni_registrar.cc
index 903f148fc79bcfe008b6c92839b24275bf46f98e..c9c7d4fd7ac2b63454cdb446ab4a2830bdf52f94 100644
--- a/chrome/browser/android/chrome_jni_registrar.cc
+++ b/chrome/browser/android/chrome_jni_registrar.cc
@@ -11,9 +11,7 @@
#include "blimp/client/public/android/blimp_jni_registrar.h"
#include "chrome/browser/after_startup_task_utils_android.h"
#include "chrome/browser/android/accessibility/font_size_prefs_android.h"
-#include "chrome/browser/android/accessibility_util.h"
#include "chrome/browser/android/appmenu/app_menu_drag_helper.h"
-#include "chrome/browser/android/background_sync_launcher_android.h"
#include "chrome/browser/android/banners/app_banner_infobar_delegate_android.h"
#include "chrome/browser/android/banners/app_banner_manager_android.h"
#include "chrome/browser/android/blimp/blimp_client_context_factory_android.h"
@@ -53,21 +51,17 @@
#include "chrome/browser/android/find_in_page/find_in_page_bridge.h"
#include "chrome/browser/android/foreign_session_helper.h"
#include "chrome/browser/android/history_report/history_report_jni_bridge.h"
-#include "chrome/browser/android/intent_helper.h"
#include "chrome/browser/android/java_exception_reporter.h"
#include "chrome/browser/android/large_icon_bridge.h"
-#include "chrome/browser/android/location_settings_impl.h"
#include "chrome/browser/android/logo_bridge.h"
#include "chrome/browser/android/metrics/launch_metrics.h"
#include "chrome/browser/android/metrics/uma_session_stats.h"
#include "chrome/browser/android/metrics/uma_utils.h"
#include "chrome/browser/android/metrics/variations_session.h"
-#include "chrome/browser/android/mojo/chrome_interface_registrar_android.h"
#include "chrome/browser/android/net/external_estimate_provider_android.h"
#include "chrome/browser/android/ntp/most_visited_sites_bridge.h"
#include "chrome/browser/android/ntp/new_tab_page_prefs.h"
#include "chrome/browser/android/ntp/ntp_snippets_bridge.h"
-#include "chrome/browser/android/ntp/ntp_snippets_launcher.h"
#include "chrome/browser/android/offline_pages/background_scheduler_bridge.h"
#include "chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.h"
#include "chrome/browser/android/offline_pages/offline_page_bridge.h"
@@ -93,7 +87,6 @@
#include "chrome/browser/android/signin/account_tracker_service_android.h"
#include "chrome/browser/android/signin/signin_investigator_android.h"
#include "chrome/browser/android/signin/signin_manager_android.h"
-#include "chrome/browser/android/signin/signin_promo_util_android.h"
#include "chrome/browser/android/tab_android.h"
#include "chrome/browser/android/tab_state.h"
#include "chrome/browser/android/tab_web_contents_delegate_android.h"
@@ -109,7 +102,6 @@
#include "chrome/browser/dom_distiller/tab_utils_android.h"
#include "chrome/browser/history/android/sqlite_cursor.h"
#include "chrome/browser/invalidation/invalidation_service_factory_android.h"
-#include "chrome/browser/lifetime/application_lifetime_android.h"
#include "chrome/browser/media/android/cdm/media_drm_credential_manager.h"
#include "chrome/browser/media/android/remote/record_cast_action.h"
#include "chrome/browser/media/android/remote/remote_media_player_bridge.h"
@@ -118,27 +110,21 @@
#include "chrome/browser/net/spdyproxy/data_reduction_promo_infobar_delegate_android.h"
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.h"
#include "chrome/browser/notifications/notification_platform_bridge_android.h"
-#include "chrome/browser/page_load_metrics/observers/android_page_load_metrics_observer.h"
#include "chrome/browser/password_manager/account_chooser_dialog_android.h"
#include "chrome/browser/password_manager/auto_signin_first_run_dialog_android.h"
-#include "chrome/browser/password_manager/credential_android.h"
#include "chrome/browser/permissions/permission_update_infobar_delegate_android.h"
-#include "chrome/browser/platform_util.h"
#include "chrome/browser/prerender/external_prerender_handler_android.h"
#include "chrome/browser/profiles/profile_android.h"
-#include "chrome/browser/push_messaging/push_messaging_service_observer_android.h"
#include "chrome/browser/search_engines/template_url_service_android.h"
#include "chrome/browser/signin/oauth2_token_service_delegate_android.h"
#include "chrome/browser/speech/tts_android.h"
#include "chrome/browser/spellchecker/spellchecker_session_bridge_android.h"
#include "chrome/browser/ssl/security_state_model_android.h"
-#include "chrome/browser/supervised_user/child_accounts/child_account_feedback_reporter_android.h"
#include "chrome/browser/supervised_user/child_accounts/child_account_service_android.h"
#include "chrome/browser/supervised_user/supervised_user_content_provider_android.h"
#include "chrome/browser/sync/profile_sync_service_android.h"
#include "chrome/browser/sync/sync_sessions_metrics_android.h"
#include "chrome/browser/ui/android/autofill/autofill_keyboard_accessory_view.h"
-#include "chrome/browser/ui/android/autofill/autofill_logger_android.h"
#include "chrome/browser/ui/android/autofill/autofill_popup_view_android.h"
#include "chrome/browser/ui/android/autofill/card_unmask_prompt_view_android.h"
#include "chrome/browser/ui/android/autofill/credit_card_scanner_view_android.h"
@@ -148,18 +134,12 @@
#include "chrome/browser/ui/android/chrome_http_auth_handler.h"
#include "chrome/browser/ui/android/connection_info_popup_android.h"
#include "chrome/browser/ui/android/context_menu_helper.h"
-#include "chrome/browser/ui/android/infobars/app_banner_infobar_android.h"
#include "chrome/browser/ui/android/infobars/autofill_save_card_infobar.h"
-#include "chrome/browser/ui/android/infobars/confirm_infobar.h"
-#include "chrome/browser/ui/android/infobars/download_overwrite_infobar.h"
-#include "chrome/browser/ui/android/infobars/generated_password_saved_infobar.h"
#include "chrome/browser/ui/android/infobars/grouped_permission_infobar.h"
#include "chrome/browser/ui/android/infobars/infobar_android.h"
#include "chrome/browser/ui/android/infobars/infobar_container_android.h"
-#include "chrome/browser/ui/android/infobars/save_password_infobar.h"
#include "chrome/browser/ui/android/infobars/simple_confirm_infobar_builder.h"
#include "chrome/browser/ui/android/infobars/translate_infobar.h"
-#include "chrome/browser/ui/android/infobars/update_password_infobar.h"
#include "chrome/browser/ui/android/javascript_app_modal_dialog_android.h"
#include "chrome/browser/ui/android/omnibox/omnibox_url_emphasizer.h"
#include "chrome/browser/ui/android/omnibox/omnibox_view_util.h"
@@ -170,19 +150,15 @@
#include "chrome/browser/ui/android/toolbar/toolbar_model_android.h"
#include "chrome/browser/ui/android/usb_chooser_dialog_android.h"
#include "chrome/browser/ui/android/website_settings_popup_android.h"
-#include "components/bookmarks/common/android/component_jni_registrar.h"
#include "components/dom_distiller/android/component_jni_registrar.h"
#include "components/gcm_driver/android/component_jni_registrar.h"
#include "components/gcm_driver/instance_id/android/component_jni_registrar.h"
#include "components/invalidation/impl/android/component_jni_registrar.h"
-#include "components/navigation_interception/component_jni_registrar.h"
-#include "components/ntp_tiles/most_visited_sites.h"
#include "components/policy/core/browser/android/component_jni_registrar.h"
#include "components/safe_json/android/component_jni_registrar.h"
#include "components/signin/core/browser/android/component_jni_registrar.h"
#include "components/sync/android/sync_jni_registrar.h"
#include "components/variations/android/component_jni_registrar.h"
-#include "components/variations/android/variations_seed_bridge.h"
#include "components/web_contents_delegate_android/component_jni_registrar.h"
#if defined(ENABLE_PRINTING) && !defined(ENABLE_PRINT_PREVIEW)
@@ -195,22 +171,17 @@ namespace android {
static base::android::RegistrationMethod kChromeRegisteredMethods[] = {
// Register JNI for components we depend on.
{"AppMenuDragHelper", RegisterAppMenuDragHelper},
- {"Bookmarks", bookmarks::android::RegisterBookmarks},
{"DomDistiller", dom_distiller::android::RegisterDomDistiller},
{"ChromeDownloadDelegate", RegisterChromeDownloadDelegate},
{"GCMDriver", gcm::android::RegisterGCMDriverJni},
{"InstanceID", instance_id::android::RegisterInstanceIDJni},
{"Invalidation", invalidation::android::RegisterInvalidationJni},
- {"NavigationInterception",
- navigation_interception::RegisterNavigationInterceptionJni},
- {"NTPTiles", ntp_tiles::MostVisitedSites::Register},
{"Policy", policy::android::RegisterPolicy},
{"SafeJson", safe_json::android::RegisterSafeJsonJni},
{"Signin", signin::android::RegisterSigninJni},
{"WebContentsDelegateAndroid",
web_contents_delegate_android::RegisterWebContentsDelegateAndroidJni},
// Register JNI for chrome classes.
- {"AccessibilityUtils", AccessibilityUtil::Register},
{"AccountChooserDialogAndroid", RegisterAccountChooserDialogAndroid},
{"AutoSigninFirstRunDialogAndroid",
RegisterAutoSigninFirstRunDialogAndroid},
@@ -220,24 +191,18 @@ static base::android::RegistrationMethod kChromeRegisteredMethods[] = {
AddToHomescreenDialogHelper::RegisterAddToHomescreenDialogHelper},
{"AfterStartupTaskUtils", RegisterAfterStartupTaskUtilsJNI},
{"AnswersImageBridge", RegisterAnswersImageBridge},
- {"AppBannerInfoBarAndroid", RegisterAppBannerInfoBarAndroid},
{"AppBannerInfoBarDelegateAndroid",
banners::RegisterAppBannerInfoBarDelegateAndroid},
{"AppBannerManagerAndroid", banners::AppBannerManagerAndroid::Register},
- {"ApplicationLifetime", RegisterApplicationLifetimeAndroid},
{"AutocompleteControllerAndroid", RegisterAutocompleteControllerAndroid},
{"AutofillSaveCardInfoBar", AutofillSaveCardInfoBar::Register},
{"AutofillKeyboardAccessory", autofill::AutofillKeyboardAccessoryView::
RegisterAutofillKeyboardAccessoryView},
- {"AutofillLoggerAndroid", autofill::AutofillLoggerAndroid::Register},
{"AutofillPopup",
autofill::AutofillPopupViewAndroid::RegisterAutofillPopupViewAndroid},
{"AutofillProfileBridge", autofill::RegisterAutofillProfileBridge},
- {"AutoSigninSnackbarController", RegisterAutoSigninSnackbarController},
{"BackgroundSchedulerBridge",
offline_pages::android::RegisterBackgroundSchedulerBridge},
- {"BackgroundSyncLauncherAndroid",
- BackgroundSyncLauncherAndroid::RegisterLauncher},
{"BlimpClientContextFactory", RegisterBlimpClientContextFactoryJni},
{"Blimp", blimp::client::RegisterBlimpJni},
{"BluetoothChooserAndroid", BluetoothChooserAndroid::Register},
@@ -245,7 +210,6 @@ static base::android::RegistrationMethod kChromeRegisteredMethods[] = {
{"BrowsingDataCounterBridge", BrowsingDataCounterBridge::Register},
{"CardUnmaskPrompt", autofill::CardUnmaskPromptViewAndroid::Register},
{"CertificateViewer", RegisterCertificateViewer},
- {"ChildAccountFeedbackReporter", RegisterChildAccountFeedbackReporter},
{"ChildAccountService", RegisterChildAccountService},
{"ChromeApplication", ChromeApplication::RegisterBindings},
{"ChromeBlimpClientContextDelegate",
@@ -255,14 +219,12 @@ static base::android::RegistrationMethod kChromeRegisteredMethods[] = {
{"ChromeFeatureList", RegisterChromeFeatureListJni},
{"ChromeHttpAuthHandler",
ChromeHttpAuthHandler::RegisterChromeHttpAuthHandler},
- {"ChromeInterfaceRegistrar", ChromeInterfaceRegistrarAndroid::Register},
#if defined(ENABLE_MEDIA_ROUTER)
{"ChromeMediaRouter", media_router::MediaRouterAndroid::Register},
{"ChromeMediaRouterDialogController",
media_router::MediaRouterDialogControllerAndroid::Register},
#endif
{"CompositorView", RegisterCompositorView},
- {"ConfirmInfoBar", RegisterConfirmInfoBar},
{"ConnectionInfoPopupAndroid",
ConnectionInfoPopupAndroid::RegisterConnectionInfoPopupAndroid},
{"SecurityStateModel", RegisterSecurityStateModelAndroid},
@@ -272,7 +234,6 @@ static base::android::RegistrationMethod kChromeRegisteredMethods[] = {
{"ContextualSearchSceneLayer", RegisterContextualSearchSceneLayer},
{"ContextualSearchTabHelper", RegisterContextualSearchTabHelper},
{"CookiesFetcher", RegisterCookiesFetcher},
- {"Credential", RegisterCredential},
{"CreditCardScanner", autofill::CreditCardScannerViewAndroid::Register},
{"DataReductionPromoInfoBarDelegate",
DataReductionPromoInfoBarDelegateAndroid::Register},
@@ -286,21 +247,16 @@ static base::android::RegistrationMethod kChromeRegisteredMethods[] = {
{"DownloadController", DownloadController::RegisterDownloadController},
{"DownloadManagerService",
DownloadManagerService::RegisterDownloadManagerService},
- {"DownloadOverwriteInfoBarDelegate",
- RegisterDownloadOverwriteInfoBarDelegate},
{"ExternalDataUseObserverBridge", RegisterExternalDataUseObserver},
{"ExternalPrerenderRequestHandler",
prerender::ExternalPrerenderHandlerAndroid::
RegisterExternalPrerenderHandlerAndroid},
{"FaviconHelper", FaviconHelper::RegisterFaviconHelper},
{"FeatureUtilities", RegisterFeatureUtilities},
- {"DomDistillerUIUtils", dom_distiller::android::RegisterUIHandle},
{"FindInPageBridge", FindInPageBridge::RegisterFindInPageBridge},
{"FontSizePrefsAndroid", FontSizePrefsAndroid::Register},
{"ForeignSessionHelper",
ForeignSessionHelper::RegisterForeignSessionHelper},
- {"GeneratedPasswordSavedInfoBarDelegate",
- RegisterGeneratedPasswordSavedInfoBarDelegate},
{"GroupedPermissionInfoBar", GroupedPermissionInfoBar::Register},
{"HistoryReportJniBridge", history_report::RegisterHistoryReportJniBridge},
{"InfoBarContainer", RegisterInfoBarContainer},
@@ -308,14 +264,12 @@ static base::android::RegistrationMethod kChromeRegisteredMethods[] = {
invalidation::InvalidationServiceFactoryAndroid::Register},
{"SimpleConfirmInfoBarBuilder", RegisterSimpleConfirmInfoBarBuilder},
{"ShortcutHelper", ShortcutHelper::RegisterShortcutHelper},
- {"IntentHelper", RegisterIntentHelper},
{"JavaExceptionReporter", RegisterJavaExceptionReporterJni},
{"JavascriptAppModalDialog",
JavascriptAppModalDialogAndroid::RegisterJavascriptAppModalDialog},
{"LargeIconBridge", LargeIconBridge::RegisterLargeIconBridge},
{"LaunchMetrics", metrics::RegisterLaunchMetrics},
{"LayerTitleCache", chrome::android::RegisterLayerTitleCache},
- {"LocationSettings", LocationSettingsImpl::Register},
{"LogoBridge", RegisterLogoBridge},
{"ManifestUpgradeDetector", ManifestUpgradeDetector::Register},
{"MediaDrmCredentialManager",
@@ -328,7 +282,6 @@ static base::android::RegistrationMethod kChromeRegisteredMethods[] = {
{"NotificationPlatformBridge",
NotificationPlatformBridgeAndroid::RegisterNotificationPlatformBridge},
{"NTPSnippetsBridge", NTPSnippetsBridge::Register},
- {"NTPSnippetsLauncher", NTPSnippetsLauncher::Register},
{"OAuth2TokenServiceDelegateAndroid",
OAuth2TokenServiceDelegateAndroid::Register},
{"OfflinePageBridge", offline_pages::android::RegisterOfflinePageBridge},
@@ -339,8 +292,6 @@ static base::android::RegistrationMethod kChromeRegisteredMethods[] = {
OmniboxUrlEmphasizer::RegisterOmniboxUrlEmphasizer},
{"OmniboxViewUtil", OmniboxViewUtil::RegisterOmniboxViewUtil},
{"OverlayPanelContent", RegisterOverlayPanelContent},
- {"PlatformUtil", platform_util::RegisterPlatformUtil},
- {"PageLoadMetrics", RegisterPageLoadMetricsBindings},
{"PartnerBookmarksReader",
PartnerBookmarksReader::RegisterPartnerBookmarksReader},
{"PasswordGenerationPopup",
@@ -357,8 +308,6 @@ static base::android::RegistrationMethod kChromeRegisteredMethods[] = {
{"ProfileAndroid", ProfileAndroid::RegisterProfileAndroid},
{"ProfileDownloader", RegisterProfileDownloader},
{"ProfileSyncService", ProfileSyncServiceAndroid::Register},
- {"PushMessagingServiceObserver",
- PushMessagingServiceObserverAndroid::RegisterJni},
{"RapporServiceBridge", rappor::RegisterRapporServiceBridge},
{"RecentlyClosedBridge", RecentlyClosedTabsBridge::Register},
{"RecordCastAction", remote_media::RegisterRecordCastAction},
@@ -367,14 +316,12 @@ static base::android::RegistrationMethod kChromeRegisteredMethods[] = {
remote_media::RemoteMediaPlayerBridge::RegisterRemoteMediaPlayerBridge},
{"RevenueStats", RegisterRevenueStats},
{"SafeBrowsingApiBridge", safe_browsing::RegisterSafeBrowsingApiBridge},
- {"SavePasswordInfoBar", SavePasswordInfoBar::Register},
{"SceneLayer", chrome::android::RegisterSceneLayer},
{"ScreenshotTask", RegisterScreenshotTask},
{"ServiceTabLauncher", ServiceTabLauncher::Register},
{"SessionTabHelper", RegisterSessionTabHelper},
{"SigninInvestigator", SigninInvestigatorAndroid::Register},
{"SigninManager", SigninManagerAndroid::Register},
- {"SigninPromoUtil", SigninPromoUtilAndroid::Register},
{"SingleTabModel", RegisterSingleTabModel},
{"SpellCheckerSessionBridge", SpellCheckerSessionBridge::RegisterJNI},
{"SqliteCursor", SQLiteCursor::RegisterSqliteCursor},
@@ -397,12 +344,10 @@ static base::android::RegistrationMethod kChromeRegisteredMethods[] = {
{"TranslateInfoBarDelegate", RegisterTranslateInfoBarDelegate},
{"TtsPlatformImpl", TtsPlatformImplAndroid::Register},
{"UmaSessionStats", RegisterUmaSessionStats},
- {"UpdatePasswordInfoBar", UpdatePasswordInfoBar::Register},
{"UrlFilterBridge", UrlFilterBridge::Register},
{"UrlUtilities", RegisterUrlUtilities},
{"UsbChooserDialogAndroid", UsbChooserDialogAndroid::Register},
{"Variations", variations::android::RegisterVariations},
- {"VariationsSeedBridge", variations::android::RegisterVariationsSeedBridge},
{"VariationsSession", chrome::android::RegisterVariationsSession},
{"WarmupManager", RegisterWarmupManager},
{"WebappRegistry", WebappRegistry::RegisterWebappRegistry},

Powered by Google App Engine
This is Rietveld 408576698