summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 23:17:07 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 23:17:07 +0000
commitad50def5e1165d0cc74b98f988bbd5962587d9f4 (patch)
tree3a751abaed2cc056ca60b8b1e3ff54532a6f4d3f /chrome
parent75c920505ddfb2d49c194c76bde64edd6b3f91f2 (diff)
downloadchromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.zip
chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.tar.gz
chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.tar.bz2
Make NotificationService an interface in the content namespace, and switch callers to use it. Move the implementation to content/browser. Stop creating it in all child processes since it's only used in the browser.
BUG=98716 Review URL: http://codereview.chromium.org/8342048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/accessibility/accessibility_win_browsertest.cc37
-rw-r--r--chrome/browser/accessibility/renderer_accessibility_browsertest.cc3
-rw-r--r--chrome/browser/accessibility_events.cc4
-rw-r--r--chrome/browser/alternate_nav_url_fetcher.cc6
-rw-r--r--chrome/browser/app_controller_mac.mm15
-rw-r--r--chrome/browser/autocomplete/autocomplete.cc6
-rw-r--r--chrome/browser/autocomplete/autocomplete_browsertest.cc4
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.cc4
-rw-r--r--chrome/browser/autocomplete/autocomplete_unittest.cc2
-rw-r--r--chrome/browser/autocomplete/extension_app_provider.cc2
-rw-r--r--chrome/browser/autofill/autofill_browsertest.cc3
-rw-r--r--chrome/browser/autofill/autofill_manager.cc14
-rw-r--r--chrome/browser/automation/automation_extension_tracker.cc4
-rw-r--r--chrome/browser/automation/automation_provider_observers.cc108
-rw-r--r--chrome/browser/automation/automation_provider_observers_chromeos.cc6
-rw-r--r--chrome/browser/automation/automation_tab_helper_browsertest.cc6
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc4
-rw-r--r--chrome/browser/background/background_application_list_model_unittest.cc1
-rw-r--r--chrome/browser/background/background_contents_service.cc4
-rw-r--r--chrome/browser/background/background_contents_service_unittest.cc7
-rw-r--r--chrome/browser/background/background_mode_manager.cc4
-rw-r--r--chrome/browser/bookmarks/bookmark_model.cc10
-rw-r--r--chrome/browser/browser_focus_uitest.cc9
-rw-r--r--chrome/browser/browser_keyevents_browsertest.cc4
-rw-r--r--chrome/browser/browser_process_impl.cc2
-rw-r--r--chrome/browser/chrome_plugin_service_filter.cc6
-rw-r--r--chrome/browser/chromeos/boot_times_loader.cc22
-rw-r--r--chrome/browser/chromeos/frame/panel_controller.cc4
-rw-r--r--chrome/browser/chromeos/input_method/input_method_manager.cc4
-rw-r--r--chrome/browser/chromeos/locale_change_guard.cc8
-rw-r--r--chrome/browser/chromeos/login/base_login_display_host.cc4
-rw-r--r--chrome/browser/chromeos/login/existing_user_controller.cc4
-rw-r--r--chrome/browser/chromeos/login/google_authenticator.cc14
-rw-r--r--chrome/browser/chromeos/login/login_html_dialog.cc2
-rw-r--r--chrome/browser/chromeos/login/login_performer.cc4
-rw-r--r--chrome/browser/chromeos/login/owner_manager.cc8
-rw-r--r--chrome/browser/chromeos/login/owner_manager_unittest.cc5
-rw-r--r--chrome/browser/chromeos/login/owner_manager_unittest.h1
-rw-r--r--chrome/browser/chromeos/login/ownership_service.cc3
-rw-r--r--chrome/browser/chromeos/login/ownership_service.h1
-rw-r--r--chrome/browser/chromeos/login/ownership_service_unittest.cc1
-rw-r--r--chrome/browser/chromeos/login/parallel_authenticator.cc14
-rw-r--r--chrome/browser/chromeos/login/profile_image_downloader.cc2
-rw-r--r--chrome/browser/chromeos/login/proxy_settings_dialog.cc8
-rw-r--r--chrome/browser/chromeos/login/screen_lock_view.cc4
-rw-r--r--chrome/browser/chromeos/login/screen_locker.cc8
-rw-r--r--chrome/browser/chromeos/login/screen_locker_browsertest.cc10
-rw-r--r--chrome/browser/chromeos/login/session_manager_observer.cc9
-rw-r--r--chrome/browser/chromeos/login/user_image_screen.cc4
-rw-r--r--chrome/browser/chromeos/login/user_manager.cc16
-rw-r--r--chrome/browser/chromeos/login/views_oobe_display.cc8
-rw-r--r--chrome/browser/chromeos/login/wizard_accessibility_helper.cc12
-rw-r--r--chrome/browser/chromeos/login/wizard_controller.cc1
-rw-r--r--chrome/browser/chromeos/login/wizard_in_process_browser_test.cc3
-rw-r--r--chrome/browser/chromeos/notifications/balloon_collection_impl.cc4
-rw-r--r--chrome/browser/chromeos/notifications/notification_browsertest.cc6
-rw-r--r--chrome/browser/chromeos/offline/offline_load_page.cc1
-rw-r--r--chrome/browser/chromeos/options/take_photo_dialog.cc4
-rw-r--r--chrome/browser/chromeos/panels/panel_browsertest.cc5
-rw-r--r--chrome/browser/chromeos/status/input_method_menu.cc4
-rw-r--r--chrome/browser/chromeos/status/memory_menu_button.cc4
-rw-r--r--chrome/browser/chromeos/status/status_area_button.cc1
-rw-r--r--chrome/browser/chromeos/tab_closeable_state_watcher.cc8
-rw-r--r--chrome/browser/chromeos/tab_closeable_state_watcher_browsertest.cc4
-rw-r--r--chrome/browser/chromeos/user_cros_settings_provider.cc3
-rw-r--r--chrome/browser/chromeos/web_socket_proxy.cc6
-rw-r--r--chrome/browser/chromeos/web_socket_proxy_controller.cc1
-rw-r--r--chrome/browser/chromeos/wm_ipc.cc4
-rw-r--r--chrome/browser/component_updater/component_updater_service.cc18
-rw-r--r--chrome/browser/component_updater/component_updater_service_unittest.cc6
-rw-r--r--chrome/browser/content_settings/content_settings_default_provider.cc2
-rw-r--r--chrome/browser/content_settings/content_settings_policy_provider.cc2
-rw-r--r--chrome/browser/content_settings/content_settings_pref_provider.cc2
-rw-r--r--chrome/browser/content_settings/host_content_settings_map.cc4
-rw-r--r--chrome/browser/content_settings/mock_settings_observer.cc4
-rw-r--r--chrome/browser/content_settings/tab_specific_content_settings.cc26
-rw-r--r--chrome/browser/crash_recovery_browsertest.cc3
-rw-r--r--chrome/browser/custom_handlers/protocol_handler_registry.cc6
-rw-r--r--chrome/browser/custom_handlers/protocol_handler_registry.h2
-rw-r--r--chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc2
-rw-r--r--chrome/browser/debugger/devtools_sanity_unittest.cc9
-rw-r--r--chrome/browser/debugger/devtools_window.cc2
-rw-r--r--chrome/browser/download/download_crx_util.cc5
-rw-r--r--chrome/browser/download/download_util.cc1
-rw-r--r--chrome/browser/download/save_page_browsertest.cc4
-rw-r--r--chrome/browser/enumerate_modules_model_win.cc14
-rw-r--r--chrome/browser/extensions/app_notification_manager.cc4
-rw-r--r--chrome/browser/extensions/app_notification_manager_unittest.cc4
-rw-r--r--chrome/browser/extensions/app_process_apitest.cc8
-rw-r--r--chrome/browser/extensions/apps_promo.cc6
-rw-r--r--chrome/browser/extensions/browser_action_apitest.cc5
-rw-r--r--chrome/browser/extensions/convert_web_app_browsertest.cc3
-rw-r--r--chrome/browser/extensions/crx_installer.cc14
-rw-r--r--chrome/browser/extensions/execute_code_in_tab_function.cc1
-rw-r--r--chrome/browser/extensions/extension_accessibility_api.cc18
-rw-r--r--chrome/browser/extensions/extension_apitest.cc5
-rw-r--r--chrome/browser/extensions/extension_app_api.cc5
-rw-r--r--chrome/browser/extensions/extension_bookmarks_module.cc9
-rw-r--r--chrome/browser/extensions/extension_browser_actions_api.cc6
-rw-r--r--chrome/browser/extensions/extension_browser_event_router.cc4
-rw-r--r--chrome/browser/extensions/extension_browsertest.cc28
-rw-r--r--chrome/browser/extensions/extension_browsertests_misc.cc3
-rw-r--r--chrome/browser/extensions/extension_cookies_api.cc4
-rw-r--r--chrome/browser/extensions/extension_debugger_api.cc2
-rw-r--r--chrome/browser/extensions/extension_event_router.cc6
-rw-r--r--chrome/browser/extensions/extension_history_api.cc3
-rw-r--r--chrome/browser/extensions/extension_host.cc16
-rw-r--r--chrome/browser/extensions/extension_input_api.cc8
-rw-r--r--chrome/browser/extensions/extension_input_method_apitest.cc4
-rw-r--r--chrome/browser/extensions/extension_install_ui.cc9
-rw-r--r--chrome/browser/extensions/extension_management_api.cc3
-rw-r--r--chrome/browser/extensions/extension_management_browsertest.cc4
-rw-r--r--chrome/browser/extensions/extension_menu_manager.cc3
-rw-r--r--chrome/browser/extensions/extension_menu_manager_unittest.cc5
-rw-r--r--chrome/browser/extensions/extension_message_service.cc8
-rw-r--r--chrome/browser/extensions/extension_messages_apitest.cc4
-rw-r--r--chrome/browser/extensions/extension_metrics_apitest.cc4
-rw-r--r--chrome/browser/extensions/extension_navigation_observer.cc4
-rw-r--r--chrome/browser/extensions/extension_omnibox_api.cc13
-rw-r--r--chrome/browser/extensions/extension_omnibox_apitest.cc3
-rw-r--r--chrome/browser/extensions/extension_permissions_api.cc4
-rw-r--r--chrome/browser/extensions/extension_permissions_api.h1
-rw-r--r--chrome/browser/extensions/extension_preference_api.cc3
-rw-r--r--chrome/browser/extensions/extension_prefs.cc8
-rw-r--r--chrome/browser/extensions/extension_process_manager.cc10
-rw-r--r--chrome/browser/extensions/extension_save_page_api.cc3
-rw-r--r--chrome/browser/extensions/extension_service.cc35
-rw-r--r--chrome/browser/extensions/extension_service_unittest.cc10
-rw-r--r--chrome/browser/extensions/extension_settings_frontend_unittest.cc3
-rw-r--r--chrome/browser/extensions/extension_startup_browsertest.cc5
-rw-r--r--chrome/browser/extensions/extension_tab_helper.cc10
-rw-r--r--chrome/browser/extensions/extension_tab_id_map.cc8
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc3
-rw-r--r--chrome/browser/extensions/extension_test_api.cc10
-rw-r--r--chrome/browser/extensions/extension_test_message_listener.cc4
-rw-r--r--chrome/browser/extensions/extension_toolbar_model.cc3
-rw-r--r--chrome/browser/extensions/extension_updater.cc12
-rw-r--r--chrome/browser/extensions/extension_warning_set.cc6
-rw-r--r--chrome/browser/extensions/extension_web_socket_proxy_private_api.cc6
-rw-r--r--chrome/browser/extensions/extension_webnavigation_api.cc6
-rw-r--r--chrome/browser/extensions/extension_webrequest_apitest.cc4
-rw-r--r--chrome/browser/extensions/extension_webstore_private_apitest.cc1
-rw-r--r--chrome/browser/extensions/external_policy_extension_loader.cc3
-rw-r--r--chrome/browser/extensions/image_loading_tracker.cc4
-rw-r--r--chrome/browser/extensions/image_loading_tracker_unittest.cc6
-rw-r--r--chrome/browser/extensions/network_delay_listener.cc8
-rw-r--r--chrome/browser/extensions/network_delay_listener_unittest.cc6
-rw-r--r--chrome/browser/extensions/speech_input/extension_speech_input_api.cc2
-rw-r--r--chrome/browser/extensions/speech_input/extension_speech_input_api.h2
-rw-r--r--chrome/browser/extensions/speech_input/extension_speech_input_manager.cc8
-rw-r--r--chrome/browser/extensions/theme_installed_infobar_delegate.cc2
-rw-r--r--chrome/browser/extensions/user_script_listener.cc10
-rw-r--r--chrome/browser/extensions/user_script_listener_unittest.cc20
-rw-r--r--chrome/browser/extensions/user_script_master.cc6
-rw-r--r--chrome/browser/extensions/user_script_master_unittest.cc4
-rw-r--r--chrome/browser/external_tab_container_win.cc6
-rw-r--r--chrome/browser/favicon/favicon_tab_helper.cc6
-rw-r--r--chrome/browser/first_run/first_run_win.cc6
-rw-r--r--chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc4
-rw-r--r--chrome/browser/geolocation/geolocation_browsertest.cc14
-rw-r--r--chrome/browser/google/google_url_tracker.cc12
-rw-r--r--chrome/browser/google/google_url_tracker_unittest.cc8
-rw-r--r--chrome/browser/history/history.cc13
-rw-r--r--chrome/browser/history/history_tab_helper.cc3
-rw-r--r--chrome/browser/history/top_sites.cc19
-rw-r--r--chrome/browser/importer/profile_writer.cc1
-rw-r--r--chrome/browser/infobars/infobar_tab_helper.cc8
-rw-r--r--chrome/browser/instant/instant_browsertest.cc17
-rw-r--r--chrome/browser/instant/instant_controller.cc10
-rw-r--r--chrome/browser/instant/instant_loader.cc6
-rw-r--r--chrome/browser/intranet_redirect_detector.cc1
-rw-r--r--chrome/browser/jumplist_win.cc2
-rw-r--r--chrome/browser/memory_purger.cc6
-rw-r--r--chrome/browser/metrics/metrics_service.cc34
-rw-r--r--chrome/browser/metrics/metrics_service_uitest.cc1
-rw-r--r--chrome/browser/metrics/thread_watcher.cc1
-rw-r--r--chrome/browser/net/chrome_url_request_context.cc3
-rw-r--r--chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc3
-rw-r--r--chrome/browser/net/gaia/token_service.cc10
-rw-r--r--chrome/browser/net/http_server_properties_manager_unittest.cc1
-rw-r--r--chrome/browser/notifications/balloon_host.cc12
-rw-r--r--chrome/browser/notifications/desktop_notification_service.cc6
-rw-r--r--chrome/browser/notifications/notification_ui_manager.cc4
-rw-r--r--chrome/browser/oom_priority_manager.cc8
-rw-r--r--chrome/browser/oom_priority_manager_browsertest.cc21
-rw-r--r--chrome/browser/password_manager/password_store_default.cc10
-rw-r--r--chrome/browser/password_manager/password_store_mac.cc12
-rw-r--r--chrome/browser/password_manager/password_store_mac.h5
-rw-r--r--chrome/browser/password_manager/password_store_x.cc10
-rw-r--r--chrome/browser/plugin_data_remover_helper.cc2
-rw-r--r--chrome/browser/plugin_prefs.cc6
-rw-r--r--chrome/browser/policy/configuration_policy_pref_store_unittest.cc1
-rw-r--r--chrome/browser/policy/url_blacklist_manager_unittest.cc1
-rw-r--r--chrome/browser/prefs/pref_model_associator.cc1
-rw-r--r--chrome/browser/prefs/pref_notifier_impl.cc4
-rw-r--r--chrome/browser/prefs/pref_notifier_impl_unittest.cc3
-rw-r--r--chrome/browser/prefs/pref_service.cc1
-rw-r--r--chrome/browser/prerender/prerender_browsertest.cc6
-rw-r--r--chrome/browser/prerender/prerender_contents.cc4
-rw-r--r--chrome/browser/prerender/prerender_manager.cc2
-rw-r--r--chrome/browser/printing/print_dialog_cloud_uitest.cc4
-rw-r--r--chrome/browser/printing/print_job.cc8
-rw-r--r--chrome/browser/printing/print_job_manager.cc4
-rw-r--r--chrome/browser/printing/print_job_unittest.cc4
-rw-r--r--chrome/browser/printing/print_job_worker.cc4
-rw-r--r--chrome/browser/printing/print_preview_tab_controller_unittest.cc4
-rw-r--r--chrome/browser/printing/print_view_manager.cc14
-rw-r--r--chrome/browser/profiles/avatar_menu_model.cc4
-rw-r--r--chrome/browser/profiles/off_the_record_profile_impl.cc6
-rw-r--r--chrome/browser/profiles/profile.cc1
-rw-r--r--chrome/browser/profiles/profile_dependency_manager.cc1
-rw-r--r--chrome/browser/profiles/profile_impl.cc14
-rw-r--r--chrome/browser/profiles/profile_info_cache.cc26
-rw-r--r--chrome/browser/profiles/profile_io_data.cc4
-rw-r--r--chrome/browser/profiles/profile_manager.cc8
-rw-r--r--chrome/browser/profiles/profile_manager_unittest.cc6
-rw-r--r--chrome/browser/remoting/firewall_traversal_observer.cc3
-rw-r--r--chrome/browser/remoting/firewall_traversal_observer_unittest.cc1
-rw-r--r--chrome/browser/renderer_host/chrome_render_view_host_observer.cc8
-rw-r--r--chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc6
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_views.cc4
-rw-r--r--chrome/browser/renderer_host/web_cache_manager.cc6
-rw-r--r--chrome/browser/rlz/rlz.cc14
-rw-r--r--chrome/browser/rlz/rlz_unittest.cc10
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host.cc3
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_service.cc4
-rw-r--r--chrome/browser/safe_browsing/malware_details_history.cc1
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.cc8
-rw-r--r--chrome/browser/search_engines/search_provider_install_data.cc4
-rw-r--r--chrome/browser/search_engines/search_provider_install_data_unittest.cc6
-rw-r--r--chrome/browser/search_engines/template_url_service.cc10
-rw-r--r--chrome/browser/search_engines/template_url_service_test_util.cc8
-rw-r--r--chrome/browser/service/service_process_control.cc4
-rw-r--r--chrome/browser/sessions/restore_tab_helper.cc6
-rw-r--r--chrome/browser/sessions/session_restore.cc4
-rw-r--r--chrome/browser/sessions/session_restore_browsertest.cc7
-rw-r--r--chrome/browser/sessions/session_service.cc20
-rw-r--r--chrome/browser/sessions/session_service_unittest.cc4
-rw-r--r--chrome/browser/sidebar/sidebar_manager.cc4
-rw-r--r--chrome/browser/spellchecker/spellcheck_host_impl.cc4
-rw-r--r--chrome/browser/ssl/ssl_blocking_page.cc6
-rw-r--r--chrome/browser/ssl/ssl_browser_tests.cc18
-rw-r--r--chrome/browser/sync/backend_migrator_unittest.cc4
-rw-r--r--chrome/browser/sync/glue/autofill_change_processor.cc4
-rw-r--r--chrome/browser/sync/glue/autofill_data_type_controller.cc1
-rw-r--r--chrome/browser/sync/glue/autofill_profile_data_type_controller.cc6
-rw-r--r--chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc6
-rw-r--r--chrome/browser/sync/glue/data_type_manager_impl.cc12
-rw-r--r--chrome/browser/sync/glue/data_type_manager_impl_unittest.cc6
-rw-r--r--chrome/browser/sync/glue/data_type_manager_mock.h8
-rw-r--r--chrome/browser/sync/glue/search_engine_data_type_controller_unittest.cc6
-rw-r--r--chrome/browser/sync/glue/session_change_processor.cc22
-rw-r--r--chrome/browser/sync/glue/session_model_associator.cc6
-rw-r--r--chrome/browser/sync/glue/sync_backend_host.cc4
-rw-r--r--chrome/browser/sync/glue/typed_url_change_processor.cc6
-rw-r--r--chrome/browser/sync/glue/typed_url_change_processor.h7
-rw-r--r--chrome/browser/sync/glue/typed_url_data_type_controller.cc2
-rw-r--r--chrome/browser/sync/profile_sync_service_password_unittest.cc4
-rw-r--r--chrome/browser/sync/profile_sync_service_session_unittest.cc4
-rw-r--r--chrome/browser/sync/profile_sync_service_typed_url_unittest.cc2
-rw-r--r--chrome/browser/sync/profile_sync_test_util.cc6
-rw-r--r--chrome/browser/sync/profile_sync_test_util.h11
-rw-r--r--chrome/browser/sync/signin_manager.cc8
-rw-r--r--chrome/browser/sync/test/integration/autofill_helper.cc4
-rw-r--r--chrome/browser/sync/util/extensions_activity_monitor.cc4
-rw-r--r--chrome/browser/sync/util/extensions_activity_monitor_unittest.cc12
-rw-r--r--chrome/browser/tab_contents/background_contents.cc12
-rw-r--r--chrome/browser/tab_contents/chrome_interstitial_page.cc2
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc3
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc8
-rw-r--r--chrome/browser/tab_contents/thumbnail_generator.cc3
-rw-r--r--chrome/browser/tab_contents/thumbnail_generator_unittest.cc4
-rw-r--r--chrome/browser/tab_contents/web_contents_unittest.cc3
-rw-r--r--chrome/browser/tabs/pinned_tab_service.cc8
-rw-r--r--chrome/browser/tabs/tab_finder.cc4
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc4
-rw-r--r--chrome/browser/task_manager/task_manager_browsertest.cc3
-rw-r--r--chrome/browser/task_manager/task_manager_notification_resource_provider.cc10
-rw-r--r--chrome/browser/task_manager/task_manager_resource_providers.cc88
-rw-r--r--chrome/browser/themes/theme_service.cc7
-rw-r--r--chrome/browser/themes/theme_service_factory.cc1
-rw-r--r--chrome/browser/translate/translate_manager.cc8
-rw-r--r--chrome/browser/translate/translate_tab_helper.cc6
-rw-r--r--chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc6
-rw-r--r--chrome/browser/ui/auto_login_prompter.cc2
-rw-r--r--chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc1
-rw-r--r--chrome/browser/ui/bookmarks/bookmark_tab_helper.cc6
-rw-r--r--chrome/browser/ui/browser.cc36
-rw-r--r--chrome/browser/ui/browser_browsertest.cc33
-rw-r--r--chrome/browser/ui/browser_list.cc42
-rw-r--r--chrome/browser/ui/browser_navigator.cc3
-rw-r--r--chrome/browser/ui/browser_navigator_browsertest.cc48
-rw-r--r--chrome/browser/ui/cocoa/base_bubble_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm6
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/browser/avatar_button_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/browser_window_cocoa.mm2
-rw-r--r--chrome/browser/ui/cocoa/history_menu_bridge.mm2
-rw-r--r--chrome/browser/ui/cocoa/info_bubble_window.mm4
-rw-r--r--chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm12
-rw-r--r--chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm4
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm1
-rw-r--r--chrome/browser/ui/cocoa/theme_install_bubble_view.mm13
-rw-r--r--chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm7
-rw-r--r--chrome/browser/ui/content_settings/content_setting_bubble_model.cc6
-rw-r--r--chrome/browser/ui/find_bar/find_bar_host_browsertest.cc7
-rw-r--r--chrome/browser/ui/find_bar/find_tab_helper.cc4
-rw-r--r--chrome/browser/ui/global_error_service.cc4
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc3
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc6
-rw-r--r--chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc1
-rw-r--r--chrome/browser/ui/gtk/browser_titlebar.cc4
-rw-r--r--chrome/browser/ui/gtk/browser_toolbar_gtk.cc4
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.cc6
-rw-r--r--chrome/browser/ui/gtk/bubble/bubble_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/custom_button.cc3
-rw-r--r--chrome/browser/ui/gtk/download/download_item_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/download/download_shelf_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/find_bar_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/global_history_menu.cc2
-rw-r--r--chrome/browser/ui/gtk/global_menu_bar.cc1
-rw-r--r--chrome/browser/ui/gtk/gtk_theme_service.cc4
-rw-r--r--chrome/browser/ui/gtk/infobars/infobar_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/location_bar_view_gtk.cc14
-rw-r--r--chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/overflow_button.cc2
-rw-r--r--chrome/browser/ui/gtk/status_bubble_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc12
-rw-r--r--chrome/browser/ui/login/login_prompt.cc25
-rw-r--r--chrome/browser/ui/login/login_prompt_browsertest.cc3
-rw-r--r--chrome/browser/ui/omnibox/omnibox_view_browsertest.cc4
-rw-r--r--chrome/browser/ui/panels/base_panel_browser_test.cc3
-rw-r--r--chrome/browser/ui/panels/panel.cc1
-rw-r--r--chrome/browser/ui/panels/panel_browser_view.cc10
-rw-r--r--chrome/browser/ui/panels/panel_browser_window_gtk.cc14
-rw-r--r--chrome/browser/ui/panels/panel_window_controller_cocoa.mm14
-rw-r--r--chrome/browser/ui/tab_contents/tab_contents_wrapper.cc8
-rw-r--r--chrome/browser/ui/toolbar/wrench_menu_model.cc4
-rw-r--r--chrome/browser/ui/views/accessibility_event_router_views_unittest.cc4
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc3
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc4
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc8
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc6
-rw-r--r--chrome/browser/ui/views/bubble/bubble.cc1
-rw-r--r--chrome/browser/ui/views/constrained_window_views.cc1
-rw-r--r--chrome/browser/ui/views/dom_view_browsertest.cc7
-rw-r--r--chrome/browser/ui/views/file_manager_dialog_browsertest.cc9
-rw-r--r--chrome/browser/ui/views/find_bar_host_interactive_uitest.cc4
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc6
-rw-r--r--chrome/browser/ui/views/frame/glass_browser_frame_view.cc4
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.cc4
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.cc12
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_view_views.cc1
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_view_win.cc1
-rw-r--r--chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc4
-rw-r--r--chrome/browser/ui/views/theme_install_bubble_view.cc12
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc8
-rw-r--r--chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc16
-rw-r--r--chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc4
-rw-r--r--chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc4
-rw-r--r--chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc10
-rw-r--r--chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc10
-rw-r--r--chrome/browser/ui/webui/collected_cookies_ui_delegate.cc2
-rw-r--r--chrome/browser/ui/webui/conflicts_ui.cc4
-rw-r--r--chrome/browser/ui/webui/html_dialog_ui.cc6
-rw-r--r--chrome/browser/ui/webui/media/media_internals_proxy.cc4
-rw-r--r--chrome/browser/ui/webui/metrics_handler.cc4
-rw-r--r--chrome/browser/ui/webui/ntp/app_launcher_handler.cc4
-rw-r--r--chrome/browser/ui/webui/ntp/bookmarks_handler.cc1
-rw-r--r--chrome/browser/ui/webui/ntp/foreign_session_handler.cc3
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_page_handler.cc7
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_ui.cc4
-rw-r--r--chrome/browser/ui/webui/ntp/ntp_resource_cache.cc4
-rw-r--r--chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc4
-rw-r--r--chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc6
-rw-r--r--chrome/browser/ui/webui/options/content_settings_handler.cc10
-rw-r--r--chrome/browser/ui/webui/options/extension_settings_handler.cc12
-rw-r--r--chrome/browser/ui/webui/options/manage_profile_handler.cc4
-rw-r--r--chrome/browser/ui/webui/options/personal_options_handler.cc6
-rw-r--r--chrome/browser/ui/webui/plugins_ui.cc2
-rw-r--r--chrome/browser/ui/webui/sync_promo_handler.cc4
-rw-r--r--chrome/browser/ui/webui/task_manager_handler.cc6
-rw-r--r--chrome/browser/upgrade_detector.cc10
-rw-r--r--chrome/browser/user_style_sheet_watcher.cc8
-rw-r--r--chrome/browser/visitedlink/visitedlink_event_listener.cc8
-rw-r--r--chrome/browser/visitedlink/visitedlink_unittest.cc10
-rw-r--r--chrome/browser/web_resource/promo_resource_service.cc11
-rw-r--r--chrome/browser/web_resource/promo_resource_service_unittest.cc2
-rw-r--r--chrome/browser/web_resource/web_resource_service.cc7
-rw-r--r--chrome/browser/webdata/autofill_profile_syncable_service.cc3
-rw-r--r--chrome/browser/webdata/web_data_service.cc36
-rw-r--r--chrome/browser/webdata/web_data_service_unittest.cc8
-rw-r--r--chrome/browser/webdata/web_database.cc6
-rw-r--r--chrome/browser/webdata/web_database.h10
-rw-r--r--chrome/test/base/in_process_browser_test.cc3
-rw-r--r--chrome/test/base/test_html_dialog_observer.cc6
-rw-r--r--chrome/test/base/testing_browser_process.h4
-rw-r--r--chrome/test/base/testing_profile.cc12
-rw-r--r--chrome/test/base/ui_test_utils.cc20
-rw-r--r--chrome/test/base/ui_test_utils.h2
-rw-r--r--chrome/test/reliability/page_load_test.cc1
-rw-r--r--chrome/test/test_navigation_observer.cc5
-rw-r--r--chrome/tools/profiles/generate_profile.cc4
409 files changed, 1487 insertions, 1384 deletions
diff --git a/chrome/browser/accessibility/accessibility_win_browsertest.cc b/chrome/browser/accessibility/accessibility_win_browsertest.cc
index 7689a79..4e7f89b 100644
--- a/chrome/browser/accessibility/accessibility_win_browsertest.cc
+++ b/chrome/browser/accessibility/accessibility_win_browsertest.cc
@@ -17,6 +17,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view_win.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "third_party/iaccessible2/ia2_api_all.h"
#include "third_party/isimpledom/ISimpleDOMNode.h"
@@ -329,7 +330,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
TestRendererAccessibilityTree) {
ui_test_utils::WindowedNotificationObserver tree_updated_observer1(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// The initial accessible returned should have state STATE_SYSTEM_BUSY while
// the accessibility tree is being requested from the renderer.
@@ -347,7 +348,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
ui_test_utils::WindowedNotificationObserver tree_updated_observer2(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
GURL tree_url(
"data:text/html,<html><head><title>Accessibility Win Test</title></head>"
"<body><input type='button' value='push' /><input type='checkbox' />"
@@ -391,7 +392,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
TestNotificationActiveDescendantChanged) {
ui_test_utils::WindowedNotificationObserver tree_updated_observer1(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
GURL tree_url("data:text/html,<ul tabindex='-1' role='radiogroup'><li id='li'"
">li</li></ul>");
browser()->OpenURL(
@@ -417,7 +418,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
// Set focus to the radio group.
ui_test_utils::WindowedNotificationObserver tree_updated_observer2(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ExecuteScript(L"document.body.children[0].focus()");
tree_updated_observer2.Wait();
@@ -429,7 +430,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
// Set the active descendant of the radio group
ui_test_utils::WindowedNotificationObserver tree_updated_observer3(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ExecuteScript(
L"document.body.children[0].setAttribute('aria-activedescendant', 'li')");
tree_updated_observer3.Wait();
@@ -445,7 +446,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
TestNotificationCheckedStateChanged) {
ui_test_utils::WindowedNotificationObserver tree_updated_observer1(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
GURL tree_url("data:text/html,<body><input type='checkbox' /></body>");
browser()->OpenURL(
tree_url, GURL(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED);
@@ -464,7 +465,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
// Check the checkbox.
ui_test_utils::WindowedNotificationObserver tree_updated_observer2(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ExecuteScript(L"document.body.children[0].checked=true");
tree_updated_observer2.Wait();
@@ -478,7 +479,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
TestNotificationChildrenChanged) {
ui_test_utils::WindowedNotificationObserver tree_updated_observer1(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// The role attribute causes the node to be in the accessibility tree.
GURL tree_url(
"data:text/html,<body role=group></body>");
@@ -496,7 +497,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
// Change the children of the document body.
ui_test_utils::WindowedNotificationObserver tree_updated_observer2(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ExecuteScript(L"document.body.innerHTML='<b>new text</b>'");
tree_updated_observer2.Wait();
@@ -510,7 +511,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
TestNotificationChildrenChanged2) {
ui_test_utils::WindowedNotificationObserver tree_updated_observer1(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// The role attribute causes the node to be in the accessibility tree.
GURL tree_url(
"data:text/html,<div role=group style='visibility: hidden'>text"
@@ -527,7 +528,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
// Change the children of the document body.
ui_test_utils::WindowedNotificationObserver tree_updated_observer2(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ExecuteScript(L"document.body.children[0].style.visibility='visible'");
tree_updated_observer2.Wait();
@@ -543,7 +544,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
TestNotificationFocusChanged) {
ui_test_utils::WindowedNotificationObserver tree_updated_observer1(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// The role attribute causes the node to be in the accessibility tree.
GURL tree_url(
"data:text/html,<div role=group tabindex='-1'></div>");
@@ -563,7 +564,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
// Focus the div in the document
ui_test_utils::WindowedNotificationObserver tree_updated_observer2(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ExecuteScript(L"document.body.children[0].focus()");
tree_updated_observer2.Wait();
@@ -575,7 +576,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
// Focus the document accessible. This will un-focus the current node.
ui_test_utils::WindowedNotificationObserver tree_updated_observer3(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
base::win::ScopedComPtr<IAccessible> document_accessible(
GetRendererAccessible());
ASSERT_NE(document_accessible.get(), reinterpret_cast<IAccessible*>(NULL));
@@ -594,7 +595,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
TestNotificationValueChanged) {
ui_test_utils::WindowedNotificationObserver tree_updated_observer1(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
GURL tree_url("data:text/html,<body><input type='text' value='old value'/>"
"</body>");
browser()->OpenURL(
@@ -615,7 +616,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
// Set the value of the text control
ui_test_utils::WindowedNotificationObserver tree_updated_observer2(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ExecuteScript(L"document.body.children[0].value='new value'");
tree_updated_observer2.Wait();
@@ -636,7 +637,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
ContainsRendererAccessibilityTree) {
ui_test_utils::WindowedNotificationObserver tree_updated_observer1(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
GURL tree_url("data:text/html,<html><head><title>MyDocument</title></head>"
"<body>Content</body></html>");
browser()->OpenURL(
@@ -664,7 +665,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
SupportsISimpleDOM) {
ui_test_utils::WindowedNotificationObserver tree_updated_observer1(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
GURL tree_url("data:text/html,<body><input type='checkbox' /></body>");
browser()->OpenURL(
tree_url, GURL(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED);
diff --git a/chrome/browser/accessibility/renderer_accessibility_browsertest.cc b/chrome/browser/accessibility/renderer_accessibility_browsertest.cc
index 2bb80b7..68b7529 100644
--- a/chrome/browser/accessibility/renderer_accessibility_browsertest.cc
+++ b/chrome/browser/accessibility/renderer_accessibility_browsertest.cc
@@ -15,6 +15,7 @@
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#if defined(OS_WIN)
@@ -35,7 +36,7 @@ class RendererAccessibilityBrowserTest : public InProcessBrowserTest {
const WebAccessibility& GetWebAccessibilityTree() {
ui_test_utils::WindowedNotificationObserver tree_updated_observer(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
RenderWidgetHostView* host_view =
browser()->GetSelectedTabContents()->GetRenderWidgetHostView();
RenderWidgetHost* host = host_view->GetRenderWidgetHost();
diff --git a/chrome/browser/accessibility_events.cc b/chrome/browser/accessibility_events.cc
index 8f71036..a86f354 100644
--- a/chrome/browser/accessibility_events.cc
+++ b/chrome/browser/accessibility_events.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
namespace keys = extension_accessibility_api_constants;
@@ -19,7 +19,7 @@ void SendAccessibilityNotification(
int type, AccessibilityEventInfo* info) {
Profile *profile = info->profile();
if (profile->ShouldSendAccessibilityEvents()) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
type,
content::Source<Profile>(profile),
content::Details<AccessibilityEventInfo>(info));
diff --git a/chrome/browser/alternate_nav_url_fetcher.cc b/chrome/browser/alternate_nav_url_fetcher.cc
index dacc3ee..3f7153e 100644
--- a/chrome/browser/alternate_nav_url_fetcher.cc
+++ b/chrome/browser/alternate_nav_url_fetcher.cc
@@ -13,7 +13,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/navigation_entry.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources_standard.h"
#include "net/base/registry_controlled_domain.h"
@@ -96,9 +96,9 @@ AlternateNavURLFetcher::AlternateNavURLFetcher(
state_(NOT_STARTED),
navigated_to_entry_(false) {
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_INSTANT_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
AlternateNavURLFetcher::~AlternateNavURLFetcher() {
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 475ec1b..6a4f146 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -63,7 +63,7 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
#include "content/common/cloud_print_class_mac.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -508,10 +508,10 @@ const AEEventClass kAECloudPrintUninstallClass = 'GCPu';
if ([NSApp keyWindow])
return;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_NO_KEY_WINDOW,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
}
// If the auto-update interval is not set, make it 5 hours.
@@ -584,9 +584,10 @@ const AEEventClass kAECloudPrintUninstallClass = 'GCPu';
// This is called after profiles have been loaded and preferences registered.
// It is safe to access the default profile here.
- (void)applicationDidBecomeActive:(NSNotification*)notify {
- NotificationService::current()->Notify(content::NOTIFICATION_APP_ACTIVATED,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::current()->Notify(
+ content::NOTIFICATION_APP_ACTIVATED,
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
}
// Helper function for populating and displaying the in progress downloads at
diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc
index 4bba4e6..bb157e2 100644
--- a/chrome/browser/autocomplete/autocomplete.cc
+++ b/chrome/browser/autocomplete/autocomplete.cc
@@ -35,7 +35,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
#include "googleurl/src/url_canon_ip.h"
#include "googleurl/src/url_util.h"
@@ -1026,10 +1026,10 @@ void AutocompleteController::NotifyChanged(bool notify_default_match) {
if (delegate_)
delegate_->OnResultChanged(notify_default_match);
if (done_) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY,
content::Source<AutocompleteController>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
}
diff --git a/chrome/browser/autocomplete/autocomplete_browsertest.cc b/chrome/browser/autocomplete/autocomplete_browsertest.cc
index 60c8903..6348a82 100644
--- a/chrome/browser/autocomplete/autocomplete_browsertest.cc
+++ b/chrome/browser/autocomplete/autocomplete_browsertest.cc
@@ -24,6 +24,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -150,7 +151,8 @@ IN_PROC_BROWSER_TEST_F(AutocompleteBrowserTest, TabAwayRevertSelect) {
location_bar->location_entry()->GetText());
location_bar->location_entry()->SetUserText(string16());
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->AddSelectedTabWithURL(GURL(chrome::kAboutBlankURL),
content::PAGE_TRANSITION_START_PAGE);
observer.Wait();
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
index 3b4058c..a7551aa 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc
@@ -39,7 +39,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/url_constants.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
#include "googleurl/src/url_util.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -500,7 +500,7 @@ void AutocompleteEditModel::OpenMatch(const AutocompleteMatch& match,
log.selected_index = index;
else if (!has_temporary_text_)
log.inline_autocompleted_length = inline_autocomplete_text_.length();
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
content::Source<Profile>(profile_),
content::Details<AutocompleteLog>(&log));
diff --git a/chrome/browser/autocomplete/autocomplete_unittest.cc b/chrome/browser/autocomplete/autocomplete_unittest.cc
index 260c863..1fc0277 100644
--- a/chrome/browser/autocomplete/autocomplete_unittest.cc
+++ b/chrome/browser/autocomplete/autocomplete_unittest.cc
@@ -20,7 +20,7 @@
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "testing/gtest/include/gtest/gtest.h"
static std::ostream& operator<<(std::ostream& os,
diff --git a/chrome/browser/autocomplete/extension_app_provider.cc b/chrome/browser/autocomplete/extension_app_provider.cc
index 8cc92e9..d7c6d0c 100644
--- a/chrome/browser/autocomplete/extension_app_provider.cc
+++ b/chrome/browser/autocomplete/extension_app_provider.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/history/url_database.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "ui/base/l10n/l10n_util.h"
ExtensionAppProvider::ExtensionAppProvider(ACProviderListener* listener,
diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc
index e1796ac..6dda02b 100644
--- a/chrome/browser/autofill/autofill_browsertest.cc
+++ b/chrome/browser/autofill/autofill_browsertest.cc
@@ -28,6 +28,7 @@
#include "content/browser/renderer_host/mock_render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "content/test/test_url_fetcher_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/keycodes/keyboard_codes.h"
@@ -667,7 +668,7 @@ IN_PROC_BROWSER_TEST_F(AutofillTest, AutofillAfterTranslate) {
ui_test_utils::WindowedNotificationObserver translation_observer(
chrome::NOTIFICATION_PAGE_TRANSLATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Simulate translation to kick onTranslateElementLoad.
// But right now, the call stucks here.
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 21c2597..fe3d6ba 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -43,7 +43,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
@@ -567,18 +567,18 @@ void AutofillManager::OnShowAutofillDialog() {
}
void AutofillManager::OnDidPreviewAutofillFormData() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA,
content::Source<RenderViewHost>(tab_contents()->render_view_host()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void AutofillManager::OnDidFillAutofillFormData(const TimeTicks& timestamp) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA,
content::Source<RenderViewHost>(tab_contents()->render_view_host()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
metric_logger_->LogUserHappinessMetric(AutofillMetrics::USER_DID_AUTOFILL);
if (!user_did_autofill_) {
@@ -591,10 +591,10 @@ void AutofillManager::OnDidFillAutofillFormData(const TimeTicks& timestamp) {
}
void AutofillManager::OnDidShowAutofillSuggestions(bool is_new_popup) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_DID_SHOW_SUGGESTIONS,
content::Source<RenderViewHost>(tab_contents()->render_view_host()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
if (is_new_popup) {
metric_logger_->LogUserHappinessMetric(AutofillMetrics::SUGGESTIONS_SHOWN);
diff --git a/chrome/browser/automation/automation_extension_tracker.cc b/chrome/browser/automation/automation_extension_tracker.cc
index 93e24c5..8db3efd 100644
--- a/chrome/browser/automation/automation_extension_tracker.cc
+++ b/chrome/browser/automation/automation_extension_tracker.cc
@@ -8,13 +8,13 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
AutomationExtensionTracker::AutomationExtensionTracker(
IPC::Message::Sender* automation)
: AutomationResourceTracker<const Extension*>(automation) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
AutomationExtensionTracker::~AutomationExtensionTracker() {
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index a3f803a..f93c2f8 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -76,7 +76,7 @@
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/child_process_info.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/codec/png_codec.h"
@@ -110,11 +110,11 @@ InitialLoadObserver::InitialLoadObserver(size_t tab_count,
init_time_(base::TimeTicks::Now()) {
if (outstanding_tab_count_ > 0) {
registrar_.Add(this, content::NOTIFICATION_LOAD_START,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
}
@@ -233,7 +233,7 @@ NavigationControllerRestoredObserver::NavigationControllerRestoredObserver(
SendDone();
} else {
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
}
@@ -285,7 +285,7 @@ NavigationNotificationObserver::NavigationNotificationObserver(
registrar_.Add(this, chrome::NOTIFICATION_AUTH_SUPPLIED, source);
registrar_.Add(this, chrome::NOTIFICATION_AUTH_CANCELLED, source);
registrar_.Add(this, chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
if (include_current_navigation && controller->tab_contents()->IsLoading())
navigation_started_ = true;
@@ -366,7 +366,8 @@ TabStripNotificationObserver::TabStripNotificationObserver(
int notification, AutomationProvider* automation)
: automation_(automation->AsWeakPtr()),
notification_(notification) {
- registrar_.Add(this, notification_, NotificationService::AllSources());
+ registrar_.Add(this, notification_,
+ content::NotificationService::AllSources());
}
TabStripNotificationObserver::~TabStripNotificationObserver() {
@@ -514,9 +515,9 @@ ExtensionUninstallObserver::ExtensionUninstallObserver(
reply_message_(reply_message),
id_(id) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALL_NOT_ALLOWED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ExtensionUninstallObserver::~ExtensionUninstallObserver() {
@@ -572,15 +573,15 @@ ExtensionReadyNotificationObserver::ExtensionReadyNotificationObserver(
reply_message_(reply_message),
extension_(NULL) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOAD_ERROR,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ExtensionReadyNotificationObserver::~ExtensionReadyNotificationObserver() {
@@ -642,7 +643,7 @@ void ExtensionReadyNotificationObserver::Observe(
ExtensionUnloadNotificationObserver::ExtensionUnloadNotificationObserver()
: did_receive_unload_notification_(false) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ExtensionUnloadNotificationObserver::~ExtensionUnloadNotificationObserver() {
@@ -664,19 +665,19 @@ ExtensionsUpdatedObserver::ExtensionsUpdatedObserver(
: manager_(manager), automation_(automation->AsWeakPtr()),
reply_message_(reply_message), updater_finished_(false) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALL_NOT_ALLOWED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_FOUND,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATING_FINISHED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ExtensionsUpdatedObserver::~ExtensionsUpdatedObserver() {
@@ -756,9 +757,9 @@ ExtensionTestResultNotificationObserver::
ExtensionTestResultNotificationObserver(AutomationProvider* automation)
: automation_(automation->AsWeakPtr()) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_TEST_PASSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_TEST_FAILED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ExtensionTestResultNotificationObserver::
@@ -814,9 +815,9 @@ BrowserOpenedNotificationObserver::BrowserOpenedNotificationObserver(
new_window_id_(extension_misc::kUnknownWindowId),
for_browser_command_(false) {
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_OPENED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
BrowserOpenedNotificationObserver::~BrowserOpenedNotificationObserver() {
@@ -910,9 +911,9 @@ BrowserCountChangeNotificationObserver::BrowserCountChangeNotificationObserver(
automation_(automation->AsWeakPtr()),
reply_message_(reply_message) {
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_OPENED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
BrowserCountChangeNotificationObserver::
@@ -950,7 +951,7 @@ AppModalDialogShownObserver::AppModalDialogShownObserver(
: automation_(automation->AsWeakPtr()),
reply_message_(reply_message) {
registrar_.Add(this, chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
AppModalDialogShownObserver::~AppModalDialogShownObserver() {
@@ -1074,7 +1075,8 @@ ExecuteBrowserCommandObserver::ExecuteBrowserCommandObserver(
bool ExecuteBrowserCommandObserver::Register(int command) {
if (!Getint(command, &notification_type_))
return false;
- registrar_.Add(this, notification_type_, NotificationService::AllSources());
+ registrar_.Add(this, notification_type_,
+ content::NotificationService::AllSources());
return true;
}
@@ -1157,9 +1159,9 @@ const int FindInPageNotificationObserver::kFindInPageRequestId = -1;
DomOperationObserver::DomOperationObserver() {
registrar_.Add(this, chrome::NOTIFICATION_DOM_OPERATION_RESPONSE,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
DomOperationObserver::~DomOperationObserver() {}
@@ -1217,7 +1219,7 @@ DocumentPrintedNotificationObserver::DocumentPrintedNotificationObserver(
success_(false),
reply_message_(reply_message) {
registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
DocumentPrintedNotificationObserver::~DocumentPrintedNotificationObserver() {
@@ -1264,7 +1266,7 @@ void DocumentPrintedNotificationObserver::Observe(
MetricEventDurationObserver::MetricEventDurationObserver() {
registrar_.Add(this, chrome::NOTIFICATION_METRIC_EVENT_DURATION,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
MetricEventDurationObserver::~MetricEventDurationObserver() {}
@@ -1755,7 +1757,7 @@ void PasswordStoreLoginsChangedObserver::Init() {
void PasswordStoreLoginsChangedObserver::RegisterObserversTask() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
registrar_.Add(this, chrome::NOTIFICATION_LOGINS_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
done_event_.Signal();
}
@@ -2187,9 +2189,9 @@ AppLaunchObserver::AppLaunchObserver(
} else {
// Need to wait for a new tab in a new window to load.
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_WINDOW_READY,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
}
@@ -2290,9 +2292,9 @@ void AutofillChangedObserver::Init() {
void AutofillChangedObserver::RegisterObserversTask() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
registrar_.Add(this, chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
done_event_.Signal();
}
@@ -2341,7 +2343,7 @@ AutofillFormSubmittedObserver::AutofillFormSubmittedObserver(
infobar_helper_(NULL) {
pdm_->SetObserver(this);
registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
AutofillFormSubmittedObserver::~AutofillFormSubmittedObserver() {
@@ -2431,7 +2433,7 @@ GetAllNotificationsObserver::GetAllNotificationsObserver(
SendMessage();
} else {
registrar_.Add(this, chrome::NOTIFICATION_NOTIFY_BALLOON_CONNECTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
}
@@ -2495,7 +2497,7 @@ NewNotificationBalloonObserver::NewNotificationBalloonObserver(
: automation_(provider->AsWeakPtr()),
reply_message_(reply_message) {
registrar_.Add(this, chrome::NOTIFICATION_NOTIFY_BALLOON_CONNECTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
NewNotificationBalloonObserver::~NewNotificationBalloonObserver() { }
@@ -2521,7 +2523,7 @@ OnNotificationBalloonCountObserver::OnNotificationBalloonCountObserver(
g_browser_process->notification_ui_manager()->balloon_collection()),
count_(count) {
registrar_.Add(this, chrome::NOTIFICATION_NOTIFY_BALLOON_CONNECTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
collection_->set_on_collection_changed_callback(
base::Bind(&OnNotificationBalloonCountObserver::CheckBalloonCount,
base::Unretained(this)));
@@ -2559,7 +2561,7 @@ RendererProcessClosedObserver::RendererProcessClosedObserver(
: automation_(automation->AsWeakPtr()),
reply_message_(reply_message) {
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
RendererProcessClosedObserver::~RendererProcessClosedObserver() {}
@@ -2588,11 +2590,11 @@ InputEventAckNotificationObserver::InputEventAckNotificationObserver(
registrar_.Add(
this,
content::NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_INPUT_EVENT_ACK,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(
this,
chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
InputEventAckNotificationObserver::~InputEventAckNotificationObserver() {}
@@ -2630,7 +2632,7 @@ AllTabsStoppedLoadingObserver::AllTabsStoppedLoadingObserver(
reply_message_(reply_message) {
registrar_.Add(this,
chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
for (BrowserList::const_iterator iter = BrowserList::begin();
iter != BrowserList::end();
++iter) {
@@ -2702,7 +2704,7 @@ NewTabObserver::NewTabObserver(AutomationProvider* automation,
// Use TAB_PARENTED to detect the new tab.
registrar_.Add(this,
content::NOTIFICATION_TAB_PARENTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
void NewTabObserver::Observe(int type,
@@ -2782,11 +2784,11 @@ DragTargetDropAckNotificationObserver::DragTargetDropAckNotificationObserver(
registrar_.Add(
this,
content::NOTIFICATION_RENDER_VIEW_HOST_DID_RECEIVE_DRAG_TARGET_DROP_ACK,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(
this,
chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
DragTargetDropAckNotificationObserver::
@@ -2892,11 +2894,11 @@ BrowserOpenedWithNewProfileNotificationObserver::
reply_message_(reply_message),
new_window_id_(extension_misc::kUnknownWindowId) {
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CREATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_OPENED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
BrowserOpenedWithNewProfileNotificationObserver::
diff --git a/chrome/browser/automation/automation_provider_observers_chromeos.cc b/chrome/browser/automation/automation_provider_observers_chromeos.cc
index a467a87..a76dede 100644
--- a/chrome/browser/automation/automation_provider_observers_chromeos.cc
+++ b/chrome/browser/automation/automation_provider_observers_chromeos.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
using chromeos::CrosLibrary;
using chromeos::NetworkLibrary;
@@ -50,7 +50,7 @@ LoginWebuiReadyObserver::LoginWebuiReadyObserver(
AutomationProvider* automation)
: automation_(automation->AsWeakPtr()) {
registrar_.Add(this, chrome::NOTIFICATION_LOGIN_WEBUI_READY,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
LoginWebuiReadyObserver::~LoginWebuiReadyObserver() {
@@ -105,7 +105,7 @@ ScreenLockUnlockObserver::ScreenLockUnlockObserver(
reply_message_(reply_message),
lock_screen_(lock_screen) {
registrar_.Add(this, chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ScreenLockUnlockObserver::~ScreenLockUnlockObserver() {}
diff --git a/chrome/browser/automation/automation_tab_helper_browsertest.cc b/chrome/browser/automation/automation_tab_helper_browsertest.cc
index 1baff3c..98e77f6 100644
--- a/chrome/browser/automation/automation_tab_helper_browsertest.cc
+++ b/chrome/browser/automation/automation_tab_helper_browsertest.cc
@@ -22,7 +22,7 @@
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "net/base/net_util.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -69,7 +69,7 @@ class AutomationTabHelperBrowserTest : public InProcessBrowserTest {
MockNotificationObserver* mock_notification_observer) {
mock_notification_observer->Register(
chrome::NOTIFICATION_DOM_OPERATION_RESPONSE,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
testing::InSequence expect_in_sequence;
EXPECT_CALL(*mock_tab_observer, OnFirstPendingLoad(_));
@@ -185,7 +185,7 @@ IN_PROC_BROWSER_TEST_F(AutomationTabHelperBrowserTest,
MockNotificationObserver mock_notification_observer;
mock_notification_observer.Register(
chrome::NOTIFICATION_DOM_OPERATION_RESPONSE,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
MockTabEventObserver mock_tab_observer(tab_helper());
EXPECT_CALL(mock_tab_observer, OnFirstPendingLoad(_));
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 14f7d69..f0a8bdf 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -115,7 +115,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/common/common_param_traits.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/base/cookie_store.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "ui/base/events.h"
@@ -186,7 +186,7 @@ TestingAutomationProvider::TestingAutomationProvider(Profile* profile)
redirect_query_(0) {
BrowserList::AddObserver(this);
registrar_.Add(this, chrome::NOTIFICATION_SESSION_END,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
TestingAutomationProvider::~TestingAutomationProvider() {
diff --git a/chrome/browser/background/background_application_list_model_unittest.cc b/chrome/browser/background/background_application_list_model_unittest.cc
index a4a80f5..320052b 100644
--- a/chrome/browser/background/background_application_list_model_unittest.cc
+++ b/chrome/browser/background/background_application_list_model_unittest.cc
@@ -21,7 +21,6 @@
#include "chrome/test/base/testing_profile.h"
#include "content/browser/browser_thread.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index 1dbc47a..64c7353 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -29,7 +29,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/site_instance.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -475,7 +475,7 @@ BackgroundContents* BackgroundContentsService::CreateBackgroundContents(
frame_name,
application_id};
BackgroundContentsOpened(&details);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_OPENED,
content::Source<Profile>(profile),
content::Details<BackgroundContentsOpenedDetails>(&details));
diff --git a/chrome/browser/background/background_contents_service_unittest.cc b/chrome/browser/background/background_contents_service_unittest.cc
index 0daedf7..84c4c7a 100644
--- a/chrome/browser/background/background_contents_service_unittest.cc
+++ b/chrome/browser/background/background_contents_service_unittest.cc
@@ -18,6 +18,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -69,7 +70,7 @@ class MockBackgroundContents : public BackgroundContents {
virtual void Navigate(GURL url) {
url_ = url;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED,
content::Source<Profile>(profile_),
content::Details<BackgroundContents>(this));
@@ -77,7 +78,7 @@ class MockBackgroundContents : public BackgroundContents {
virtual const GURL& GetURL() const { return url_; }
void MockClose(Profile* profile) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_CLOSED,
content::Source<Profile>(profile),
content::Details<BackgroundContents>(this));
@@ -85,7 +86,7 @@ class MockBackgroundContents : public BackgroundContents {
}
~MockBackgroundContents() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED,
content::Source<Profile>(profile_),
content::Details<BackgroundContents>(this));
diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/browser/background/background_mode_manager.cc
index 1b58478..f69962a 100644
--- a/chrome/browser/background/background_mode_manager.cc
+++ b/chrome/browser/background/background_mode_manager.cc
@@ -26,7 +26,7 @@
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/pref_names.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -176,7 +176,7 @@ BackgroundModeManager::BackgroundModeManager(
// Listen for the application shutting down so we can decrement our KeepAlive
// count.
registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
BackgroundModeManager::~BackgroundModeManager() {
diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc
index e09291a..a9c1e58 100644
--- a/chrome/browser/bookmarks/bookmark_model.cc
+++ b/chrome/browser/bookmarks/bookmark_model.cc
@@ -24,7 +24,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_collator.h"
@@ -615,10 +615,10 @@ void BookmarkModel::DoneLoading(
Loaded(this, details->ids_reassigned()));
// And generic notification.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
content::Source<Profile>(profile_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void BookmarkModel::RemoveAndDeleteNode(BookmarkNode* delete_me) {
@@ -667,7 +667,7 @@ void BookmarkModel::RemoveAndDeleteNode(BookmarkNode* delete_me) {
history->URLsNoLongerBookmarked(details.changed_urls);
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_URLS_STARRED,
content::Source<Profile>(profile_),
content::Details<history::URLsStarredDetails>(&details));
@@ -690,7 +690,7 @@ BookmarkNode* BookmarkModel::AddNode(BookmarkNode* parent,
if (node->is_url() && !was_bookmarked) {
history::URLsStarredDetails details(true);
details.changed_urls.insert(node->url());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_URLS_STARRED,
content::Source<Profile>(profile_),
content::Details<history::URLsStarredDetails>(&details));
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc
index 7d19625..bf03621 100644
--- a/chrome/browser/browser_focus_uitest.cc
+++ b/chrome/browser/browser_focus_uitest.cc
@@ -26,6 +26,7 @@
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/view_messages.h"
#include "net/test/test_server.h"
@@ -182,7 +183,7 @@ class TestInterstitialPage : public InterstitialPage {
}
void OnFocusedNodeChanged(bool is_editable_node) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
content::Source<TabContents>(tab()),
content::Details<const bool>(&is_editable_node));
@@ -632,7 +633,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversalOnInterstitial) {
int notification_type;
content::NotificationSource notification_source =
- NotificationService::AllSources();
+ content::NotificationService::AllSources();
if (j < arraysize(kExpElementIDs) - 1) {
notification_type = content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE;
notification_source = content::Source<TabContents>(
@@ -667,7 +668,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversalOnInterstitial) {
for (size_t j = 0; j < 7; ++j) {
int notification_type;
content::NotificationSource notification_source =
- NotificationService::AllSources();
+ content::NotificationService::AllSources();
if (j < arraysize(kExpElementIDs) - 1) {
notification_type = content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE;
notification_source = content::Source<TabContents>(
@@ -851,7 +852,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FocusOnReload) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->NewTab();
observer.Wait();
}
diff --git a/chrome/browser/browser_keyevents_browsertest.cc b/chrome/browser/browser_keyevents_browsertest.cc
index 91e61c3..3c469e5 100644
--- a/chrome/browser/browser_keyevents_browsertest.cc
+++ b/chrome/browser/browser_keyevents_browsertest.cc
@@ -21,7 +21,7 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/test/test_server.h"
#include "ui/base/keycodes/keyboard_codes.h"
@@ -681,7 +681,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_ReservedAccelerators) {
ui_test_utils::WindowedNotificationObserver wait_for_new_tab(
content::NOTIFICATION_TAB_PARENTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Press Ctrl/Cmd+T, which will open a new tab. It cannot be suppressed.
EXPECT_NO_FATAL_FAILURE(TestKeyEvent(0, kTestCtrlOrCmdT));
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 704a8af..99a0c92 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -84,7 +84,7 @@
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/common/net/url_fetcher.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
#include "ipc/ipc_logging.h"
#include "net/socket/client_socket_pool_manager.h"
#include "net/url_request/url_request_context_getter.h"
diff --git a/chrome/browser/chrome_plugin_service_filter.cc b/chrome/browser/chrome_plugin_service_filter.cc
index cb3f6fd..278f691 100644
--- a/chrome/browser/chrome_plugin_service_filter.cc
+++ b/chrome/browser/chrome_plugin_service_filter.cc
@@ -13,7 +13,7 @@
#include "content/browser/plugin_service.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/resource_context.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "webkit/plugins/npapi/plugin_group.h"
#include "webkit/plugins/npapi/plugin_list.h"
@@ -125,9 +125,9 @@ bool ChromePluginServiceFilter::ShouldUsePlugin(
ChromePluginServiceFilter::ChromePluginServiceFilter() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ChromePluginServiceFilter::~ChromePluginServiceFilter() {
diff --git a/chrome/browser/chromeos/boot_times_loader.cc b/chrome/browser/chromeos/boot_times_loader.cc
index 76d92b4..8cc85d4 100644
--- a/chrome/browser/chromeos/boot_times_loader.cc
+++ b/chrome/browser/chromeos/boot_times_loader.cc
@@ -31,7 +31,7 @@
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace {
@@ -345,13 +345,13 @@ void BootTimesLoader::LoginDone() {
AddLoginTimeMarker("LoginDone", true);
RecordCurrentStats(kChromeFirstRender);
registrar_.Remove(this, content::NOTIFICATION_LOAD_START,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Remove(this, content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Remove(this, content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Don't swamp the FILE thread right away.
BrowserThread::PostDelayedTask(
BrowserThread::FILE, FROM_HERE,
@@ -406,15 +406,15 @@ void BootTimesLoader::RecordLoginAttempted() {
if (!have_registered_) {
have_registered_ = true;
registrar_.Add(this, chrome::NOTIFICATION_LOGIN_AUTHENTICATION,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_LOAD_START,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
}
@@ -439,7 +439,7 @@ void BootTimesLoader::Observe(
AddLoginTimeMarker("Authenticate", true);
RecordCurrentStats(kLoginSuccess);
registrar_.Remove(this, chrome::NOTIFICATION_LOGIN_AUTHENTICATION,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
break;
}
diff --git a/chrome/browser/chromeos/frame/panel_controller.cc b/chrome/browser/chromeos/frame/panel_controller.cc
index 8ddd9e1..7939340 100644
--- a/chrome/browser/chromeos/frame/panel_controller.cc
+++ b/chrome/browser/chromeos/frame/panel_controller.cc
@@ -18,7 +18,7 @@
#include "base/time.h"
#include "base/utf_string_conversions.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
@@ -396,7 +396,7 @@ bool PanelController::PanelClientEvent(GdkEventClient* event) {
if (expanded_ != new_state) {
expanded_ = new_state;
State state = new_state ? EXPANDED : MINIMIZED;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_STATE_CHANGED,
content::Source<PanelController>(this),
content::Details<State>(&state));
diff --git a/chrome/browser/chromeos/input_method/input_method_manager.cc b/chrome/browser/chromeos/input_method/input_method_manager.cc
index efed586..58effbe 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager.cc
@@ -26,7 +26,7 @@
#include "content/browser/browser_thread.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
@@ -150,7 +150,7 @@ class InputMethodManagerImpl : public HotkeyManager::Observer,
// upstart script. See crosbug.com/6515 and crosbug.com/6995 for
// details.
notification_registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// The observer should be added before Connect() so we can capture the
// initial connection change.
diff --git a/chrome/browser/chromeos/locale_change_guard.cc b/chrome/browser/chromeos/locale_change_guard.cc
index 5c85e4e..5dfc4c5 100644
--- a/chrome/browser/chromeos/locale_change_guard.cc
+++ b/chrome/browser/chromeos/locale_change_guard.cc
@@ -16,7 +16,7 @@
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -45,14 +45,14 @@ LocaleChangeGuard::LocaleChangeGuard(Profile* profile)
reverted_(false) {
DCHECK(profile_);
registrar_.Add(this, chrome::NOTIFICATION_OWNERSHIP_CHECKED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
LocaleChangeGuard::~LocaleChangeGuard() {}
void LocaleChangeGuard::OnLogin() {
registrar_.Add(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
void LocaleChangeGuard::RevertLocaleChange(const ListValue* list) {
@@ -87,7 +87,7 @@ void LocaleChangeGuard::Observe(int type,
if (profile_ == content::Source<TabContents>(source)->browser_context()) {
// We need to perform locale change check only once, so unsubscribe.
registrar_.Remove(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
Check();
}
break;
diff --git a/chrome/browser/chromeos/login/base_login_display_host.cc b/chrome/browser/chromeos/login/base_login_display_host.cc
index c342562..52ddd95 100644
--- a/chrome/browser/chromeos/login/base_login_display_host.cc
+++ b/chrome/browser/chromeos/login/base_login_display_host.cc
@@ -31,7 +31,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
#include "third_party/cros_system_api/window_manager/chromeos_wm_ipc_enums.h"
@@ -106,7 +106,7 @@ BaseLoginDisplayHost::BaseLoginDisplayHost(const gfx::Rect& background_bounds)
registrar_.Add(
this,
content::NOTIFICATION_APP_EXITING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
DCHECK(default_host_ == NULL);
default_host_ = this;
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
index 660524b..f28213f 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -36,7 +36,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -91,7 +91,7 @@ ExistingUserController::ExistingUserController(LoginDisplayHost* host)
registrar_.Add(this,
chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
void ExistingUserController::Init(const UserVector& users) {
diff --git a/chrome/browser/chromeos/login/google_authenticator.cc b/chrome/browser/chromeos/login/google_authenticator.cc
index 8a30e6c..01d936a 100644
--- a/chrome/browser/chromeos/login/google_authenticator.cc
+++ b/chrome/browser/chromeos/login/google_authenticator.cc
@@ -29,7 +29,7 @@
#include "chrome/common/net/gaia/gaia_auth_fetcher.h"
#include "chrome/common/net/gaia/gaia_constants.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/url_request/url_request_status.h"
@@ -173,9 +173,9 @@ void GoogleAuthenticator::LoginOffTheRecord() {
int mount_error = chromeos::kCryptohomeMountErrorNone;
if (CrosLibrary::Get()->GetCryptohomeLibrary()->MountForBwsi(&mount_error)) {
AuthenticationNotificationDetails details(true);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_AUTHENTICATION,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
content::Details<AuthenticationNotificationDetails>(&details));
consumer_->OnOffTheRecordLoginSuccess();
} else {
@@ -278,9 +278,9 @@ void GoogleAuthenticator::OnLoginSuccess(
bool request_pending) {
// Send notification of success
AuthenticationNotificationDetails details(true);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_AUTHENTICATION,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
content::Details<AuthenticationNotificationDetails>(&details));
int mount_error = chromeos::kCryptohomeMountErrorNone;
@@ -353,9 +353,9 @@ void GoogleAuthenticator::CheckLocalaccount(const LoginFailure& error) {
void GoogleAuthenticator::OnLoginFailure(const LoginFailure& error) {
// Send notification of failure
AuthenticationNotificationDetails details(false);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_AUTHENTICATION,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
content::Details<AuthenticationNotificationDetails>(&details));
LOG(WARNING) << "Login failed: " << error.GetErrorString();
consumer_->OnLoginFailure(error);
diff --git a/chrome/browser/chromeos/login/login_html_dialog.cc b/chrome/browser/chromeos/login/login_html_dialog.cc
index 53c439f..3ab848d 100644
--- a/chrome/browser/chromeos/login/login_html_dialog.cc
+++ b/chrome/browser/chromeos/login/login_html_dialog.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/chromeos/login/helper.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/views/html_dialog_view.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/rect.h"
diff --git a/chrome/browser/chromeos/login/login_performer.cc b/chrome/browser/chromeos/login/login_performer.cc
index 5cf078c..b430c10 100644
--- a/chrome/browser/chromeos/login/login_performer.cc
+++ b/chrome/browser/chromeos/login/login_performer.cc
@@ -28,7 +28,7 @@
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "net/base/cookie_monster.h"
#include "net/base/cookie_store.h"
@@ -393,7 +393,7 @@ void LoginPerformer::RequestScreenLock() {
// Will receive notifications on screen unlock and delete itself.
registrar_.Add(this,
chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
if (ScreenLocker::default_screen_locker()) {
DVLOG(1) << "Screen already locked";
ResolveScreenLocked();
diff --git a/chrome/browser/chromeos/login/owner_manager.cc b/chrome/browser/chromeos/login/owner_manager.cc
index 2c5bbe0..1aef034 100644
--- a/chrome/browser/chromeos/login/owner_manager.cc
+++ b/chrome/browser/chromeos/login/owner_manager.cc
@@ -15,7 +15,7 @@
#include "chrome/browser/chromeos/login/signed_settings_temp_storage.h"
#include "content/browser/browser_thread.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace chromeos {
@@ -56,7 +56,7 @@ void OwnerManager::LoadOwnerKey() {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&OwnerManager::SendNotification, this, result,
- NotificationService::NoDetails()));
+ content::NotificationService::NoDetails()));
}
bool OwnerManager::EnsurePublicKey() {
@@ -136,9 +136,9 @@ void OwnerManager::Verify(const BrowserThread::ID thread_id,
void OwnerManager::SendNotification(
int type,
const content::NotificationDetails& details) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
type,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
details);
}
diff --git a/chrome/browser/chromeos/login/owner_manager_unittest.cc b/chrome/browser/chromeos/login/owner_manager_unittest.cc
index de6f5f03..46e5a6d 100644
--- a/chrome/browser/chromeos/login/owner_manager_unittest.cc
+++ b/chrome/browser/chromeos/login/owner_manager_unittest.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/chromeos/login/mock_owner_key_utils.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/browser_thread.h"
+#include "content/public/browser/notification_service.h"
#include "crypto/nss_util.h"
#include "crypto/rsa_private_key.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -39,11 +40,11 @@ MockKeyLoadObserver::MockKeyLoadObserver(base::WaitableEvent* e)
registrar_.Add(
this,
chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_FAILED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(
this,
chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
MockKeyLoadObserver::~MockKeyLoadObserver() {
diff --git a/chrome/browser/chromeos/login/owner_manager_unittest.h b/chrome/browser/chromeos/login/owner_manager_unittest.h
index f18cca0..eee1a0b 100644
--- a/chrome/browser/chromeos/login/owner_manager_unittest.h
+++ b/chrome/browser/chromeos/login/owner_manager_unittest.h
@@ -16,7 +16,6 @@
#include "base/synchronization/waitable_event.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/chromeos/login/ownership_service.cc b/chrome/browser/chromeos/login/ownership_service.cc
index 1e30995..486d9bd 100644
--- a/chrome/browser/chromeos/login/ownership_service.cc
+++ b/chrome/browser/chromeos/login/ownership_service.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/browser_thread.h"
+#include "content/public/browser/notification_service.h"
namespace chromeos {
@@ -32,7 +33,7 @@ OwnershipService::OwnershipService()
notification_registrar_.Add(
this,
chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
OwnershipService::~OwnershipService() {}
diff --git a/chrome/browser/chromeos/login/ownership_service.h b/chrome/browser/chromeos/login/ownership_service.h
index 920e063..0c802eb 100644
--- a/chrome/browser/chromeos/login/ownership_service.h
+++ b/chrome/browser/chromeos/login/ownership_service.h
@@ -17,7 +17,6 @@
#include "content/browser/browser_thread.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
namespace base {
template <typename T> struct DefaultLazyInstanceTraits;
diff --git a/chrome/browser/chromeos/login/ownership_service_unittest.cc b/chrome/browser/chromeos/login/ownership_service_unittest.cc
index fea5464..100d055 100644
--- a/chrome/browser/chromeos/login/ownership_service_unittest.cc
+++ b/chrome/browser/chromeos/login/ownership_service_unittest.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/chromeos/login/mock_owner_key_utils.h"
#include "chrome/browser/chromeos/login/owner_manager_unittest.h"
#include "content/browser/browser_thread.h"
+#include "content/public/browser/notification_service.h"
#include "crypto/nss_util.h"
#include "crypto/rsa_private_key.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/browser/chromeos/login/parallel_authenticator.cc b/chrome/browser/chromeos/login/parallel_authenticator.cc
index e071b35..ff5ef7f 100644
--- a/chrome/browser/chromeos/login/parallel_authenticator.cc
+++ b/chrome/browser/chromeos/login/parallel_authenticator.cc
@@ -32,7 +32,7 @@
#include "chrome/common/net/gaia/gaia_auth_fetcher.h"
#include "chrome/common/net/gaia/gaia_constants.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "crypto/encryptor.h"
#include "crypto/sha2.h"
#include "crypto/symmetric_key.h"
@@ -219,9 +219,9 @@ void ParallelAuthenticator::OnLoginSuccess(
VLOG(1) << "Login success";
// Send notification of success
AuthenticationNotificationDetails details(true);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_AUTHENTICATION,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
content::Details<AuthenticationNotificationDetails>(&details));
{
base::AutoLock for_this_block(success_lock_);
@@ -238,9 +238,9 @@ void ParallelAuthenticator::OnOffTheRecordLoginSuccess() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// Send notification of success
AuthenticationNotificationDetails details(true);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_AUTHENTICATION,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
content::Details<AuthenticationNotificationDetails>(&details));
consumer_->OnOffTheRecordLoginSuccess();
}
@@ -290,9 +290,9 @@ void ParallelAuthenticator::OnLoginFailure(const LoginFailure& error) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// Send notification of failure
AuthenticationNotificationDetails details(false);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_AUTHENTICATION,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
content::Details<AuthenticationNotificationDetails>(&details));
LOG(WARNING) << "Login failed: " << error.GetErrorString();
consumer_->OnLoginFailure(error);
diff --git a/chrome/browser/chromeos/login/profile_image_downloader.cc b/chrome/browser/chromeos/login/profile_image_downloader.cc
index 1265f16..0a6b9cc 100644
--- a/chrome/browser/chromeos/login/profile_image_downloader.cc
+++ b/chrome/browser/chromeos/login/profile_image_downloader.cc
@@ -18,9 +18,9 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/net/gaia/gaia_constants.h"
#include "content/browser/browser_thread.h"
+#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/browser/chromeos/login/proxy_settings_dialog.cc b/chrome/browser/chromeos/login/proxy_settings_dialog.cc
index a77201d..2a5a799 100644
--- a/chrome/browser/chromeos/login/proxy_settings_dialog.cc
+++ b/chrome/browser/chromeos/login/proxy_settings_dialog.cc
@@ -7,7 +7,7 @@
#include "chrome/browser/chromeos/login/helper.h"
#include "chrome/common/url_constants.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
@@ -48,10 +48,10 @@ ProxySettingsDialog::ProxySettingsDialog(LoginHtmlDialog::Delegate* delegate,
void ProxySettingsDialog::OnDialogClosed(const std::string& json_retval) {
LoginHtmlDialog::OnDialogClosed(json_retval);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_PROXY_CHANGED,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
}
} // namespace chromeos
diff --git a/chrome/browser/chromeos/login/screen_lock_view.cc b/chrome/browser/chromeos/login/screen_lock_view.cc
index 1509241..bbf6dc7 100644
--- a/chrome/browser/chromeos/login/screen_lock_view.cc
+++ b/chrome/browser/chromeos/login/screen_lock_view.cc
@@ -15,7 +15,7 @@
#include "chrome/browser/chromeos/views/copy_background.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
@@ -119,7 +119,7 @@ void ScreenLockView::Layout() {
void ScreenLockView::Init() {
registrar_.Add(this,
chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
user_view_ = new UserView(this,
false, // is_login
diff --git a/chrome/browser/chromeos/login/screen_locker.cc b/chrome/browser/chromeos/login/screen_locker.cc
index 116dc4a..a6f2b6c 100644
--- a/chrome/browser/chromeos/login/screen_locker.cc
+++ b/chrome/browser/chromeos/login/screen_locker.cc
@@ -39,7 +39,7 @@
#include "chrome/common/chrome_switches.h"
#include "content/browser/browser_thread.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
#include "third_party/cros_system_api/window_manager/chromeos_wm_ipc_enums.h"
@@ -57,7 +57,7 @@ class ScreenLockObserver : public chromeos::ScreenLockLibrary::Observer,
public:
ScreenLockObserver() {
registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
// NotificationObserver overrides:
@@ -421,7 +421,7 @@ ScreenLocker::~ScreenLocker() {
screen_locker_ = NULL;
bool state = false;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
content::Source<ScreenLocker>(this),
content::Details<bool>(&state));
@@ -441,7 +441,7 @@ void ScreenLocker::ScreenLockReady() {
UMA_HISTOGRAM_TIMES("ScreenLocker.ScreenLockTime", delta);
bool state = true;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
content::Source<ScreenLocker>(this),
content::Details<bool>(&state));
diff --git a/chrome/browser/chromeos/login/screen_locker_browsertest.cc b/chrome/browser/chromeos/login/screen_locker_browsertest.cc
index 18e8802..9d22dfb 100644
--- a/chrome/browser/chromeos/login/screen_locker_browsertest.cc
+++ b/chrome/browser/chromeos/login/screen_locker_browsertest.cc
@@ -19,7 +19,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "views/controls/textfield/textfield.h"
@@ -35,7 +35,7 @@ class Waiter : public content::NotificationObserver {
running_(false) {
registrar_.Add(this,
chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
handler_id_ = g_signal_connect(
G_OBJECT(browser_->window()->GetNativeHandle()),
"window-state-event",
@@ -118,7 +118,7 @@ class ScreenLockerTest : public CrosInProcessBrowserTest {
tester->EmulateWindowManagerReady();
ui_test_utils::WindowedNotificationObserver lock_state_observer(
chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
if (!chromeos::ScreenLocker::GetTester()->IsLocked())
lock_state_observer.Wait();
EXPECT_TRUE(tester->IsLocked());
@@ -142,7 +142,7 @@ class ScreenLockerTest : public CrosInProcessBrowserTest {
tester->EmulateWindowManagerReady();
ui_test_utils::WindowedNotificationObserver lock_state_observer(
chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
if (!tester->IsLocked())
lock_state_observer.Wait();
EXPECT_TRUE(tester->IsLocked());
@@ -188,7 +188,7 @@ IN_PROC_BROWSER_TEST_F(ScreenLockerTest, DISABLED_TestBasic) {
tester->EmulateWindowManagerReady();
ui_test_utils::WindowedNotificationObserver lock_state_observer(
chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
if (!chromeos::ScreenLocker::GetTester()->IsLocked())
lock_state_observer.Wait();
diff --git a/chrome/browser/chromeos/login/session_manager_observer.cc b/chrome/browser/chromeos/login/session_manager_observer.cc
index 5ec65b0..98630cb 100644
--- a/chrome/browser/chromeos/login/session_manager_observer.cc
+++ b/chrome/browser/chromeos/login/session_manager_observer.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/chromeos/login/signed_settings_temp_storage.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace chromeos {
@@ -55,9 +55,10 @@ void SessionManagerObserver::OwnerKeySet(bool success) {
// Whether we exported the public key or not, send a notification
// indicating that we're done with this attempt.
- NotificationService::current()->Notify(result,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::current()->Notify(
+ result,
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
// We stored some settings in transient storage before owner was assigned.
// Now owner is assigned and key is generated and we should persist
diff --git a/chrome/browser/chromeos/login/user_image_screen.cc b/chrome/browser/chromeos/login/user_image_screen.cc
index 4520f7a..e158382 100644
--- a/chrome/browser/chromeos/login/user_image_screen.cc
+++ b/chrome/browser/chromeos/login/user_image_screen.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/chromeos/login/wizard_accessibility_helper.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -39,7 +39,7 @@ UserImageScreen::UserImageScreen(ScreenObserver* screen_observer,
registrar_.Add(
this,
chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
UserImageScreen::~UserImageScreen() {
diff --git a/chrome/browser/chromeos/login/user_manager.cc b/chrome/browser/chromeos/login/user_manager.cc
index 04a664b..91ae2f1 100644
--- a/chrome/browser/chromeos/login/user_manager.cc
+++ b/chrome/browser/chromeos/login/user_manager.cc
@@ -40,7 +40,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/codec/png_codec.h"
@@ -230,7 +230,7 @@ void UserManager::SaveImageToLocalState(const std::string& username,
local_state->SavePersistentPrefs();
NotifyLocalStateChanged();
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED,
content::Source<UserManager>(this),
content::Details<const User>(&logged_in_user_));
@@ -274,10 +274,10 @@ void UserManager::UpdateOwnership(bool is_owner) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
set_current_user_is_owner(is_owner);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_OWNERSHIP_CHECKED,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
if (is_owner) {
// Also update cached value.
UserCrosSettingsProvider::UpdateCachedOwner(logged_in_user_.email());
@@ -690,7 +690,7 @@ void UserManager::OnDownloadSuccess(const SkBitmap& image) {
VLOG(1) << "Updating profile image for logged-in user";
SetLoggedInUserImage(image, User::kProfileImageIndex);
SaveUserImage(logged_in_user_.email(), image, User::kProfileImageIndex);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED,
content::Source<UserManager>(this),
content::Details<const UserManager::User>(&logged_in_user()));
@@ -710,7 +710,7 @@ UserManager::UserManager()
user_is_logged_in_(false),
last_image_set_async_(false) {
registrar_.Add(this, chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
UserManager::~UserManager() {
@@ -758,7 +758,7 @@ void RealTPMTokenInfoDelegate::GetTokenInfo(std::string* token_name,
}
void UserManager::NotifyOnLogin() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_USER_CHANGED,
content::Source<UserManager>(this),
content::Details<const User>(&logged_in_user_));
diff --git a/chrome/browser/chromeos/login/views_oobe_display.cc b/chrome/browser/chromeos/login/views_oobe_display.cc
index 556d67e..714c155 100644
--- a/chrome/browser/chromeos/login/views_oobe_display.cc
+++ b/chrome/browser/chromeos/login/views_oobe_display.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/chromeos/login/wizard_accessibility_helper.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "views/view.h"
#include "views/widget/widget.h"
@@ -66,10 +66,10 @@ class ContentView : public views::View {
}
~ContentView() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_WIZARD_CONTENT_VIEW_DESTROYED,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
}
bool AcceleratorPressed(const views::Accelerator& accel) {
diff --git a/chrome/browser/chromeos/login/wizard_accessibility_helper.cc b/chrome/browser/chromeos/login/wizard_accessibility_helper.cc
index ae09646..91b193b 100644
--- a/chrome/browser/chromeos/login/wizard_accessibility_helper.cc
+++ b/chrome/browser/chromeos/login/wizard_accessibility_helper.cc
@@ -15,7 +15,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "views/accelerator.h"
@@ -60,19 +60,19 @@ void WizardAccessibilityHelper::Init() {
void WizardAccessibilityHelper::RegisterNotifications() {
registrar_.Add(accessibility_handler_.get(),
chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(accessibility_handler_.get(),
chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_ACTION,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(accessibility_handler_.get(),
chrome::NOTIFICATION_ACCESSIBILITY_TEXT_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(accessibility_handler_.get(),
chrome::NOTIFICATION_ACCESSIBILITY_MENU_OPENED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(accessibility_handler_.get(),
chrome::NOTIFICATION_ACCESSIBILITY_MENU_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registered_notifications_ = true;
}
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
index 38b6adc..1884a37 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -40,7 +40,6 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/options/options_util.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "ui/base/l10n/l10n_util.h"
#include "views/accelerator.h"
diff --git a/chrome/browser/chromeos/login/wizard_in_process_browser_test.cc b/chrome/browser/chromeos/login/wizard_in_process_browser_test.cc
index c10c8c3..45befb7 100644
--- a/chrome/browser/chromeos/login/wizard_in_process_browser_test.cc
+++ b/chrome/browser/chromeos/login/wizard_in_process_browser_test.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/ui/views/browser_dialogs.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "content/public/browser/notification_service.h"
namespace chromeos {
@@ -36,7 +37,7 @@ Browser* WizardInProcessBrowserTest::CreateBrowser(Profile* profile) {
void WizardInProcessBrowserTest::CleanUpOnMainThread() {
ui_test_utils::WindowedNotificationObserver wizard_destroyed_observer(
chrome::NOTIFICATION_WIZARD_CONTENT_VIEW_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// LoginDisplayHost owns controllers and all windows.
MessageLoopForUI::current()->DeleteSoon(FROM_HERE, host_);
diff --git a/chrome/browser/chromeos/notifications/balloon_collection_impl.cc b/chrome/browser/chromeos/notifications/balloon_collection_impl.cc
index d45dab9..3ce776d 100644
--- a/chrome/browser/chromeos/notifications/balloon_collection_impl.cc
+++ b/chrome/browser/chromeos/notifications/balloon_collection_impl.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/window_sizer.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
@@ -31,7 +31,7 @@ namespace chromeos {
BalloonCollectionImpl::BalloonCollectionImpl()
: notification_ui_(new NotificationPanel()) {
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
BalloonCollectionImpl::~BalloonCollectionImpl() {
diff --git a/chrome/browser/chromeos/notifications/notification_browsertest.cc b/chrome/browser/chromeos/notifications/notification_browsertest.cc
index dbe881a..2e0e506 100644
--- a/chrome/browser/chromeos/notifications/notification_browsertest.cc
+++ b/chrome/browser/chromeos/notifications/notification_browsertest.cc
@@ -20,7 +20,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "ui/base/x/x11_util.h"
namespace {
@@ -304,7 +304,7 @@ IN_PROC_BROWSER_TEST_F(NotificationTest, TestStateTransition2) {
content::NotificationRegistrar registrar;
registrar.Add(this,
chrome::NOTIFICATION_PANEL_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
BalloonCollectionImpl* collection = GetBalloonCollectionImpl();
NotificationPanel* panel = GetNotificationPanel();
@@ -371,7 +371,7 @@ IN_PROC_BROWSER_TEST_F(NotificationTest, TestCleanupOnExit) {
content::NotificationRegistrar registrar;
registrar.Add(this,
chrome::NOTIFICATION_PANEL_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
BalloonCollectionImpl* collection = GetBalloonCollectionImpl();
NotificationPanel* panel = GetNotificationPanel();
diff --git a/chrome/browser/chromeos/offline/offline_load_page.cc b/chrome/browser/chromeos/offline/offline_load_page.cc
index 2653bed..3cfec2d 100644
--- a/chrome/browser/chromeos/offline/offline_load_page.cc
+++ b/chrome/browser/chromeos/offline/offline_load_page.cc
@@ -26,7 +26,6 @@
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/chromeos/options/take_photo_dialog.cc b/chrome/browser/chromeos/options/take_photo_dialog.cc
index 27e78a6..755544b 100644
--- a/chrome/browser/chromeos/options/take_photo_dialog.cc
+++ b/chrome/browser/chromeos/options/take_photo_dialog.cc
@@ -8,7 +8,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/chromeos/login/helper.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -35,7 +35,7 @@ TakePhotoDialog::TakePhotoDialog(Delegate* delegate)
registrar_.Add(
this,
chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
TakePhotoDialog::~TakePhotoDialog() {
diff --git a/chrome/browser/chromeos/panels/panel_browsertest.cc b/chrome/browser/chromeos/panels/panel_browsertest.cc
index c9519de..0bdced9 100644
--- a/chrome/browser/chromeos/panels/panel_browsertest.cc
+++ b/chrome/browser/chromeos/panels/panel_browsertest.cc
@@ -10,6 +10,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/renderer_host/render_view_host.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "third_party/cros_system_api/window_manager/chromeos_wm_ipc_enums.h"
@@ -48,7 +49,7 @@ IN_PROC_BROWSER_TEST_F(PanelTest, PanelOpenSmall) {
ui_test_utils::WindowedNotificationObserver tab_added_observer(
content::NOTIFICATION_TAB_ADDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->OpenURL(url, GURL(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED);
tab_added_observer.Wait();
@@ -91,7 +92,7 @@ IN_PROC_BROWSER_TEST_F(PanelTest, PanelOpenLarge) {
int old_tab_count = browser()->tab_count();
ui_test_utils::WindowedNotificationObserver tab_added_observer(
content::NOTIFICATION_TAB_ADDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->OpenURL(url, GURL(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED);
tab_added_observer.Wait();
diff --git a/chrome/browser/chromeos/status/input_method_menu.cc b/chrome/browser/chromeos/status/input_method_menu.cc
index f91fabd..662ed7e 100644
--- a/chrome/browser/chromeos/status/input_method_menu.cc
+++ b/chrome/browser/chromeos/status/input_method_menu.cc
@@ -18,7 +18,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -165,7 +165,7 @@ InputMethodMenu::InputMethodMenu(PrefService* pref_service,
manager->AddPreLoginPreferenceObserver(this);
registrar_.Add(this,
chrome::NOTIFICATION_LOGIN_USER_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
} else if (screen_mode_ == StatusAreaHost::kBrowserMode) {
manager->AddPostLoginPreferenceObserver(this);
}
diff --git a/chrome/browser/chromeos/status/memory_menu_button.cc b/chrome/browser/chromeos/status/memory_menu_button.cc
index 1d26743..edf7b3e 100644
--- a/chrome/browser/chromeos/status/memory_menu_button.cc
+++ b/chrome/browser/chromeos/status/memory_menu_button.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/memory_purger.h"
#include "chrome/common/render_messages.h"
#include "content/browser/renderer_host/render_process_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -58,7 +58,7 @@ MemoryMenuButton::MemoryMenuButton(StatusAreaHost* host)
// Track renderer kills, as the kernel OOM killer will start to kill our
// renderers as we run out of memory.
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
UpdateTextAndSetNextTimer();
}
diff --git a/chrome/browser/chromeos/status/status_area_button.cc b/chrome/browser/chromeos/status/status_area_button.cc
index d05dbfa..7987d59f3 100644
--- a/chrome/browser/chromeos/status/status_area_button.cc
+++ b/chrome/browser/chromeos/status/status_area_button.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/chromeos/status/status_area_button.h"
-#include "content/common/notification_service.h"
#include "grit/theme_resources.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
diff --git a/chrome/browser/chromeos/tab_closeable_state_watcher.cc b/chrome/browser/chromeos/tab_closeable_state_watcher.cc
index 2cddd98..9b71e130 100644
--- a/chrome/browser/chromeos/tab_closeable_state_watcher.cc
+++ b/chrome/browser/chromeos/tab_closeable_state_watcher.cc
@@ -14,7 +14,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace chromeos {
@@ -72,7 +72,7 @@ TabCloseableStateWatcher::TabCloseableStateWatcher()
waiting_for_browser_(false) {
BrowserList::AddObserver(this);
notification_registrar_.Add(this, content::NOTIFICATION_APP_EXITING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
TabCloseableStateWatcher::~TabCloseableStateWatcher() {
@@ -261,9 +261,9 @@ void TabCloseableStateWatcher::SetCloseableState(bool closeable) {
can_close_tab_ = closeable;
// Notify of change in tab closeable state.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CLOSEABLE_STATE_CHANGED,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
content::Details<bool>(&can_close_tab_));
}
diff --git a/chrome/browser/chromeos/tab_closeable_state_watcher_browsertest.cc b/chrome/browser/chromeos/tab_closeable_state_watcher_browsertest.cc
index e183f5f..bb37933 100644
--- a/chrome/browser/chromeos/tab_closeable_state_watcher_browsertest.cc
+++ b/chrome/browser/chromeos/tab_closeable_state_watcher_browsertest.cc
@@ -16,6 +16,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -39,7 +40,8 @@ class TabCloseableStateWatcherTest : public InProcessBrowserTest {
// Wrapper for Browser::AddTabWithURL
void AddTabWithURL(Browser* browser, const GURL& url) {
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
AddTabAtIndexToBrowser(browser, 0, url, content::PAGE_TRANSITION_TYPED);
observer.Wait();
}
diff --git a/chrome/browser/chromeos/user_cros_settings_provider.cc b/chrome/browser/chromeos/user_cros_settings_provider.cc
index c01c897..a23b396 100644
--- a/chrome/browser/chromeos/user_cros_settings_provider.cc
+++ b/chrome/browser/chromeos/user_cros_settings_provider.cc
@@ -30,6 +30,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/installer/util/google_update_settings.h"
#include "content/browser/browser_thread.h"
+#include "content/public/browser/notification_service.h"
namespace chromeos {
@@ -69,7 +70,7 @@ class MigrationHelper : public content::NotificationObserver {
public:
explicit MigrationHelper() : callback_(NULL) {
registrar_.Add(this, chrome::NOTIFICATION_OWNERSHIP_CHECKED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
void set_callback(SignedSettingsHelper::Callback* callback) {
diff --git a/chrome/browser/chromeos/web_socket_proxy.cc b/chrome/browser/chromeos/web_socket_proxy.cc
index 0d685da..fe19458 100644
--- a/chrome/browser/chromeos/web_socket_proxy.cc
+++ b/chrome/browser/chromeos/web_socket_proxy.cc
@@ -36,8 +36,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/common/url_constants.h"
#include "googleurl/src/gurl.h"
@@ -192,9 +192,9 @@ inline size_t strlen(const void* s) {
void SendNotification(int port) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_WEB_SOCKET_PROXY_STARTED,
- NotificationService::AllSources(), content::Details<int>(&port));
+ content::NotificationService::AllSources(), content::Details<int>(&port));
}
class Conn;
diff --git a/chrome/browser/chromeos/web_socket_proxy_controller.cc b/chrome/browser/chromeos/web_socket_proxy_controller.cc
index 1368ce2..5436afa 100644
--- a/chrome/browser/chromeos/web_socket_proxy_controller.cc
+++ b/chrome/browser/chromeos/web_socket_proxy_controller.cc
@@ -24,7 +24,6 @@
#include "content/browser/browser_thread.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
#include "content/public/common/url_constants.h"
#include "googleurl/src/gurl.h"
#include "net/base/network_change_notifier.h"
diff --git a/chrome/browser/chromeos/wm_ipc.cc b/chrome/browser/chromeos/wm_ipc.cc
index f400996..f77f21c 100644
--- a/chrome/browser/chromeos/wm_ipc.cc
+++ b/chrome/browser/chromeos/wm_ipc.cc
@@ -14,7 +14,7 @@ extern "C" {
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "ui/base/x/x11_util.h"
#include "ui/gfx/rect.h"
@@ -303,7 +303,7 @@ void WmIpc::FetchLayoutModeProperty() {
GetAtomName(ATOM_CHROME_LAYOUT_MODE),
&value)) {
layout_mode_ = static_cast<WmIpcLayoutMode>(value);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LAYOUT_MODE_CHANGED,
content::Source<WmIpc>(this),
content::Details<WmIpcLayoutMode>(&layout_mode_));
diff --git a/chrome/browser/component_updater/component_updater_service.cc b/chrome/browser/component_updater/component_updater_service.cc
index 84e37d4d5..43bc3c9 100644
--- a/chrome/browser/component_updater/component_updater_service.cc
+++ b/chrome/browser/component_updater/component_updater_service.cc
@@ -25,7 +25,7 @@
#include "chrome/common/extensions/extension.h"
#include "content/browser/utility_process_host.h"
#include "content/common/net/url_fetcher.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
#include "net/base/escape.h"
#include "net/base/load_flags.h"
@@ -347,10 +347,10 @@ ComponentUpdateService::Status CrxUpdateService::Start() {
if (work_items_.empty())
return kOk;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_COMPONENT_UPDATER_STARTED,
content::Source<ComponentUpdateService>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
timer_.Start(FROM_HERE, base::TimeDelta::FromSeconds(config_->InitialDelay()),
this, &CrxUpdateService::ProcessPendingItems);
@@ -381,10 +381,10 @@ void CrxUpdateService::ScheduleNextRun(bool step_delay) {
int64 delay = step_delay ? config_->StepDelay() : config_->NextCheckDelay();
if (!step_delay) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_COMPONENT_UPDATER_SLEEPING,
content::Source<ComponentUpdateService>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
// Zero is only used for unit tests.
if (0 == delay)
return;
@@ -634,10 +634,10 @@ void CrxUpdateService::OnParseUpdateManifestSucceeded(
crx->next_version = Version(it->version);
++update_pending;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_COMPONENT_UPDATE_FOUND,
content::Source<std::string>(&crx->id),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
// All the components that are not mentioned in the manifest we
@@ -681,10 +681,10 @@ void CrxUpdateService::OnURLFetchComplete(const URLFetcher* source,
DCHECK_EQ(count, 1ul);
url_fetcher_.reset();
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_COMPONENT_UPDATE_READY,
content::Source<std::string>(&context->id),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
BrowserThread::PostDelayedTask(BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(this, &CrxUpdateService::Install,
diff --git a/chrome/browser/component_updater/component_updater_service_unittest.cc b/chrome/browser/component_updater/component_updater_service_unittest.cc
index 496e765..acd3fec 100644
--- a/chrome/browser/component_updater/component_updater_service_unittest.cc
+++ b/chrome/browser/component_updater/component_updater_service_unittest.cc
@@ -16,7 +16,7 @@
#include "content/browser/browser_thread.h"
#include "content/common/net/url_fetcher.h"
#include "content/public/browser/notification_observer.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/test/test_notification_tracker.h"
#include "googleurl/src/gurl.h"
@@ -151,8 +151,8 @@ class ComponentUpdaterTest : public testing::Test {
};
for (int ix = 0; ix != arraysize(notifications); ++ix) {
- notification_tracker_.ListenFor(notifications[ix],
- NotificationService::AllSources());
+ notification_tracker_.ListenFor(
+ notifications[ix], content::NotificationService::AllSources());
}
URLFetcher::enable_interception_for_tests(true);
}
diff --git a/chrome/browser/content_settings/content_settings_default_provider.cc b/chrome/browser/content_settings/content_settings_default_provider.cc
index 0bc7eac..4964c9e 100644
--- a/chrome/browser/content_settings/content_settings_default_provider.cc
+++ b/chrome/browser/content_settings/content_settings_default_provider.cc
@@ -20,7 +20,7 @@
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/browser/content_settings/content_settings_policy_provider.cc b/chrome/browser/content_settings/content_settings_policy_provider.cc
index d357ab3..342de2d 100644
--- a/chrome/browser/content_settings/content_settings_policy_provider.cc
+++ b/chrome/browser/content_settings/content_settings_policy_provider.cc
@@ -16,7 +16,7 @@
#include "chrome/common/content_settings_pattern.h"
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
namespace {
diff --git a/chrome/browser/content_settings/content_settings_pref_provider.cc b/chrome/browser/content_settings/content_settings_pref_provider.cc
index 9c825e7..21ed316 100644
--- a/chrome/browser/content_settings/content_settings_pref_provider.cc
+++ b/chrome/browser/content_settings/content_settings_pref_provider.cc
@@ -23,7 +23,7 @@
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/browser/content_settings/host_content_settings_map.cc b/chrome/browser/content_settings/host_content_settings_map.cc
index 99ace47..5d76b92 100644
--- a/chrome/browser/content_settings/host_content_settings_map.cc
+++ b/chrome/browser/content_settings/host_content_settings_map.cc
@@ -28,7 +28,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/common/content_switches.h"
#include "googleurl/src/gurl.h"
@@ -480,7 +480,7 @@ void HostContentSettingsMap::OnContentSettingChanged(
secondary_pattern,
content_type,
resource_identifier);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED,
content::Source<HostContentSettingsMap>(this),
content::Details<const ContentSettingsDetails>(&details));
diff --git a/chrome/browser/content_settings/mock_settings_observer.cc b/chrome/browser/content_settings/mock_settings_observer.cc
index 7bcacfc..94cada60 100644
--- a/chrome/browser/content_settings/mock_settings_observer.cc
+++ b/chrome/browser/content_settings/mock_settings_observer.cc
@@ -7,13 +7,13 @@
#include "chrome/browser/content_settings/content_settings_details.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "googleurl/src/gurl.h"
MockSettingsObserver::MockSettingsObserver() {
registrar_.Add(this, chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
MockSettingsObserver::~MockSettingsObserver() {}
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index 42ac3cb..4e1a5c0 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -27,7 +27,7 @@
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/view_messages.h"
#include "webkit/fileapi/file_system_types.h"
@@ -231,10 +231,10 @@ void TabSpecificContentSettings::OnContentBlocked(
if (!content_blocked_[type]) {
content_blocked_[type] = true;
// TODO: it would be nice to have a way of mocking this in tests.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED,
content::Source<TabContents>(tab_contents()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
}
@@ -243,10 +243,10 @@ void TabSpecificContentSettings::OnContentAccessed(ContentSettingsType type) {
<< "Geolocation settings handled by OnGeolocationPermissionSet";
if (!content_accessed_[type]) {
content_accessed_[type] = true;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED,
content::Source<TabContents>(tab_contents()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
}
@@ -349,10 +349,10 @@ void TabSpecificContentSettings::OnGeolocationPermissionSet(
bool allowed) {
geolocation_settings_state_.OnGeolocationPermissionSet(requesting_origin,
allowed);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED,
content::Source<TabContents>(tab_contents()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void TabSpecificContentSettings::ClearBlockedContentSettingsExceptForCookies() {
@@ -365,10 +365,10 @@ void TabSpecificContentSettings::ClearBlockedContentSettingsExceptForCookies() {
content_blockage_indicated_to_user_[i] = false;
}
load_plugins_link_enabled_ = true;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED,
content::Source<TabContents>(tab_contents()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void TabSpecificContentSettings::ClearCookieSpecificContentSettings() {
@@ -377,19 +377,19 @@ void TabSpecificContentSettings::ClearCookieSpecificContentSettings() {
content_blocked_[CONTENT_SETTINGS_TYPE_COOKIES] = false;
content_accessed_[CONTENT_SETTINGS_TYPE_COOKIES] = false;
content_blockage_indicated_to_user_[CONTENT_SETTINGS_TYPE_COOKIES] = false;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED,
content::Source<TabContents>(tab_contents()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void TabSpecificContentSettings::SetPopupsBlocked(bool blocked) {
content_blocked_[CONTENT_SETTINGS_TYPE_POPUPS] = blocked;
content_blockage_indicated_to_user_[CONTENT_SETTINGS_TYPE_POPUPS] = false;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED,
content::Source<TabContents>(tab_contents()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void TabSpecificContentSettings::GeolocationDidNavigate(
diff --git a/chrome/browser/crash_recovery_browsertest.cc b/chrome/browser/crash_recovery_browsertest.cc
index 4aedfe6..0bbb485 100644
--- a/chrome/browser/crash_recovery_browsertest.cc
+++ b/chrome/browser/crash_recovery_browsertest.cc
@@ -9,6 +9,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/navigation_entry.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/common/page_transition_types.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -18,7 +19,7 @@ namespace {
void SimulateRendererCrash(Browser* browser) {
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_TAB_CONTENTS_DISCONNECTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser->OpenURL(GURL(chrome::kChromeUICrashURL), GURL(), CURRENT_TAB,
content::PAGE_TRANSITION_TYPED);
observer.Wait();
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry.cc b/chrome/browser/custom_handlers/protocol_handler_registry.cc
index 9ce8bdc..2e75d8d 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry.cc
@@ -19,7 +19,7 @@
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
#include "content/browser/child_process_security_policy.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/base/network_delegate.h"
#include "net/url_request/url_request_redirect_job.h"
@@ -571,10 +571,10 @@ void ProtocolHandlerRegistry::PromoteHandler(const ProtocolHandler& handler) {
void ProtocolHandlerRegistry::NotifyChanged() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED,
content::Source<Profile>(profile_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
// IO thread methods -----------------------------------------------------------
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry.h b/chrome/browser/custom_handlers/protocol_handler_registry.h
index 3a13416..a0d2235 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry.h
+++ b/chrome/browser/custom_handlers/protocol_handler_registry.h
@@ -17,7 +17,7 @@
#include "chrome/browser/shell_integration.h"
#include "chrome/common/custom_handlers/protocol_handler.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_job.h"
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
index 91e1cd8..9c767d0 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
@@ -19,7 +19,7 @@
#include "content/browser/renderer_host/test_render_view_host.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "net/url_request/url_request.h"
namespace {
diff --git a/chrome/browser/debugger/devtools_sanity_unittest.cc b/chrome/browser/debugger/devtools_sanity_unittest.cc
index de5fd35..8431bdb 100644
--- a/chrome/browser/debugger/devtools_sanity_unittest.cc
+++ b/chrome/browser/debugger/devtools_sanity_unittest.cc
@@ -26,9 +26,9 @@
#include "content/browser/worker_host/worker_service.h"
#include "content/browser/worker_host/worker_service_observer.h"
#include "content/common/worker_messages.h"
-#include "content/common/notification_service.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_service.h"
#include "net/test/test_server.h"
namespace {
@@ -124,7 +124,8 @@ class DevToolsSanityTest : public InProcessBrowserTest {
ui_test_utils::NavigateToURL(browser(), url);
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
inspected_rvh_ = GetInspectedTab()->render_view_host();
window_ = DevToolsWindow::OpenDevToolsWindow(inspected_rvh_);
observer.Wait();
@@ -202,7 +203,7 @@ class DevToolsExtensionDebugTest : public DevToolsSanityTest,
{
content::NotificationRegistrar registrar;
registrar.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
CancelableQuitTask* delayed_quit =
new CancelableQuitTask("Extension load timed out.");
MessageLoop::current()->PostDelayedTask(FROM_HERE, delayed_quit,
@@ -225,7 +226,7 @@ class DevToolsExtensionDebugTest : public DevToolsSanityTest,
content::NotificationRegistrar registrar;
registrar.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
CancelableQuitTask* delayed_quit =
new CancelableQuitTask("Extension host load timed out.");
MessageLoop::current()->PostDelayedTask(FROM_HERE, delayed_quit,
diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc
index 5cac4c6..10a3dd1 100644
--- a/chrome/browser/debugger/devtools_window.cc
+++ b/chrome/browser/debugger/devtools_window.cc
@@ -39,8 +39,8 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/common/devtools_messages.h"
-#include "content/common/notification_service.h"
#include "content/public/browser/content_browser_client.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/common/bindings_policy.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/download/download_crx_util.cc b/chrome/browser/download/download_crx_util.cc
index 779cdc5..75006fb 100644
--- a/chrome/browser/download/download_crx_util.cc
+++ b/chrome/browser/download/download_crx_util.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/download/download_item.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace download_crx_util {
@@ -53,7 +53,8 @@ scoped_refptr<CrxInstaller> OpenChromeExtension(
ExtensionService* service = profile->GetExtensionService();
CHECK(service);
- NotificationService* nservice = NotificationService::current();
+ content::NotificationService* nservice =
+ content::NotificationService::current();
GURL nonconst_download_url = download_item.GetURL();
nservice->Notify(chrome::NOTIFICATION_EXTENSION_READY_FOR_INSTALL,
content::Source<Profile>(profile),
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc
index c77b8af..7b11a12 100644
--- a/chrome/browser/download/download_util.cc
+++ b/chrome/browser/download/download_util.cc
@@ -40,7 +40,6 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc
index 8677e58..c77f9ad 100644
--- a/chrome/browser/download/save_page_browsertest.cc
+++ b/chrome/browser/download/save_page_browsertest.cc
@@ -27,7 +27,7 @@
#include "content/browser/download/download_persistent_store_info.h"
#include "content/browser/net/url_request_mock_http_job.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -82,7 +82,7 @@ class SavePageBrowserTest : public InProcessBrowserTest {
ui_test_utils::TestNotificationObserver observer;
ui_test_utils::RegisterAndWait(&observer,
content::NOTIFICATION_SAVE_PACKAGE_SUCCESSFULLY_FINISHED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
return content::Details<DownloadItem>(observer.details()).ptr()->
original_url();
}
diff --git a/chrome/browser/enumerate_modules_model_win.cc b/chrome/browser/enumerate_modules_model_win.cc
index 83e2752..12f0227 100644
--- a/chrome/browser/enumerate_modules_model_win.cc
+++ b/chrome/browser/enumerate_modules_model_win.cc
@@ -26,7 +26,7 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -785,10 +785,10 @@ bool EnumerateModulesModel::ShouldShowConflictWarning() const {
void EnumerateModulesModel::AcknowledgeConflictNotification() {
if (!conflict_notification_acknowledged_) {
conflict_notification_acknowledged_ = true;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_MODULE_INCOMPATIBILITY_BADGE_CHANGE,
content::Source<EnumerateModulesModel>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
}
@@ -940,10 +940,10 @@ void EnumerateModulesModel::DoneScanning() {
if (limited_mode_)
return;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_MODULE_LIST_ENUMERATED,
content::Source<EnumerateModulesModel>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
// Command line flag must be enabled for the notification to get sent out.
// Otherwise we'd get the badge (while the feature is disabled) when we
@@ -952,10 +952,10 @@ void EnumerateModulesModel::DoneScanning() {
if (!cmd_line.HasSwitch(switches::kConflictingModulesCheck))
return;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_MODULE_INCOMPATIBILITY_BADGE_CHANGE,
content::Source<EnumerateModulesModel>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
GURL EnumerateModulesModel::ConstructHelpCenterUrl(
diff --git a/chrome/browser/extensions/app_notification_manager.cc b/chrome/browser/extensions/app_notification_manager.cc
index 84d5658..2b77004 100644
--- a/chrome/browser/extensions/app_notification_manager.cc
+++ b/chrome/browser/extensions/app_notification_manager.cc
@@ -11,7 +11,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
AppNotificationManager::AppNotificationManager(Profile* profile)
: profile_(profile) {
@@ -139,7 +139,7 @@ void AppNotificationManager::HandleLoadResults(const NotificationMap& map) {
notifications_[id].insert(notifications_[id].begin(),
list.begin(),
list.end());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED,
content::Source<Profile>(profile_),
content::Details<const std::string>(&id));
diff --git a/chrome/browser/extensions/app_notification_manager_unittest.cc b/chrome/browser/extensions/app_notification_manager_unittest.cc
index ab908e6..f405b91 100644
--- a/chrome/browser/extensions/app_notification_manager_unittest.cc
+++ b/chrome/browser/extensions/app_notification_manager_unittest.cc
@@ -9,7 +9,7 @@
#include "chrome/common/extensions/extension_test_util.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -109,7 +109,7 @@ TEST_F(AppNotificationManagerTest, MAYBE_ExtensionUninstall) {
util::ExpectListsEqual(list2, *mgr_->GetAll(id2));
// Send the uninstall notification for extension id1.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
content::Source<Profile>(profile_.get()),
content::Details<const std::string>(&id1));
diff --git a/chrome/browser/extensions/app_process_apitest.cc b/chrome/browser/extensions/app_process_apitest.cc
index 7f7ba77..4382c4d 100644
--- a/chrome/browser/extensions/app_process_apitest.cc
+++ b/chrome/browser/extensions/app_process_apitest.cc
@@ -16,6 +16,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "net/base/mock_host_resolver.h"
class AppApiTest : public ExtensionApiTest {
@@ -39,7 +40,8 @@ static void WindowOpenHelper(Browser* browser,
const GURL& url,
bool newtab_process_should_equal_opener) {
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
opener_host, L"", L"window.open('" + UTF8ToWide(url.spec()) + L"');"));
@@ -63,7 +65,7 @@ static void NavigateTabHelper(TabContents* contents, const GURL& url) {
bool result = false;
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
contents->render_view_host(), L"",
L"window.addEventListener('unload', function() {"
@@ -428,7 +430,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, OpenWebPopupFromWebIframe) {
ASSERT_TRUE(app);
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ui_test_utils::NavigateToURLWithDisposition(
browser(),
base_url.Resolve("path1/container.html"),
diff --git a/chrome/browser/extensions/apps_promo.cc b/chrome/browser/extensions/apps_promo.cc
index dd226da..6fd273c 100644
--- a/chrome/browser/extensions/apps_promo.cc
+++ b/chrome/browser/extensions/apps_promo.cc
@@ -15,7 +15,7 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/common/url_constants.h"
#include "net/base/load_flags.h"
#include "net/url_request/url_request_status.h"
@@ -388,10 +388,10 @@ bool AppsPromoLogoFetcher::HaveCachedLogo() {
void AppsPromoLogoFetcher::SavePromo() {
AppsPromo::SetPromo(promo_data_);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_WEB_STORE_PROMO_LOADED,
content::Source<Profile>(profile_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
bool AppsPromoLogoFetcher::SupportsLogoURL() {
diff --git a/chrome/browser/extensions/browser_action_apitest.cc b/chrome/browser/extensions/browser_action_apitest.cc
index 191f6ed..bf6fbf1 100644
--- a/chrome/browser/extensions/browser_action_apitest.cc
+++ b/chrome/browser/extensions/browser_action_apitest.cc
@@ -21,6 +21,7 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
@@ -38,7 +39,7 @@ class BrowserActionApiTest : public ExtensionApiTest {
ResultCatcher catcher;
ui_test_utils::WindowedNotificationObserver popup_observer(
chrome::NOTIFICATION_EXTENSION_POPUP_VIEW_READY,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
GetBrowserActionsBar().Press(index);
popup_observer.Wait();
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
@@ -397,7 +398,7 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, DISABLED_CloseBackgroundPage) {
ui_test_utils::WindowedNotificationObserver host_destroyed_observer(
chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Click the browser action.
browser()->profile()->GetExtensionService()->browser_event_router()->
diff --git a/chrome/browser/extensions/convert_web_app_browsertest.cc b/chrome/browser/extensions/convert_web_app_browsertest.cc
index 440a454..3210d58 100644
--- a/chrome/browser/extensions/convert_web_app_browsertest.cc
+++ b/chrome/browser/extensions/convert_web_app_browsertest.cc
@@ -15,6 +15,7 @@
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_service.h"
class ExtensionFromWebAppTest
: public InProcessBrowserTest, public content::NotificationObserver {
@@ -53,7 +54,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionFromWebAppTest, Basic) {
content::NotificationRegistrar registrar;
registrar.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
expected_extension_id_ = "fnpgoaochgbdfjndakichfafiocjjpmm";
ui_test_utils::NavigateToURL(
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index 86ea255..614757f 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -34,7 +34,7 @@
#include "chrome/common/extensions/extension_file_util.h"
#include "content/browser/browser_thread.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -444,10 +444,11 @@ void CrxInstaller::InstallUIAbort(bool user_initiated) {
extension_, histogram_name.c_str());
// Kill the theme loading bubble.
- NotificationService* service = NotificationService::current();
+ content::NotificationService* service =
+ content::NotificationService::current();
service->Notify(chrome::NOTIFICATION_NO_THEME_DETECTED,
content::Source<CrxInstaller>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
Release(); // balanced in ConfirmInstall().
NotifyCrxInstallComplete();
@@ -518,7 +519,8 @@ void CrxInstaller::ReportFailureFromFileThread(const std::string& error) {
void CrxInstaller::ReportFailureFromUIThread(const std::string& error) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- NotificationService* service = NotificationService::current();
+ content::NotificationService* service =
+ content::NotificationService::current();
service->Notify(chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
content::Source<CrxInstaller>(this),
content::Details<const std::string>(&error));
@@ -594,8 +596,8 @@ void CrxInstaller::NotifyCrxInstallComplete() {
// is problematic because they don't know anything about the
// extension before it is unpacked, so they can not filter based
// on the extension.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_CRX_INSTALLER_DONE,
content::Source<CrxInstaller>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
diff --git a/chrome/browser/extensions/execute_code_in_tab_function.cc b/chrome/browser/extensions/execute_code_in_tab_function.cc
index e8645d9..f71b869 100644
--- a/chrome/browser/extensions/execute_code_in_tab_function.cc
+++ b/chrome/browser/extensions/execute_code_in_tab_function.cc
@@ -24,7 +24,6 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
namespace keys = extension_tabs_module_constants;
diff --git a/chrome/browser/extensions/extension_accessibility_api.cc b/chrome/browser/extensions/extension_accessibility_api.cc
index 08e3a59..731b81e 100644
--- a/chrome/browser/extensions/extension_accessibility_api.cc
+++ b/chrome/browser/extensions/extension_accessibility_api.cc
@@ -17,7 +17,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace keys = extension_accessibility_api_constants;
@@ -43,28 +43,28 @@ ExtensionAccessibilityEventRouter::ExtensionAccessibilityEventRouter()
: enabled_(false) {
registrar_.Add(this,
chrome::NOTIFICATION_ACCESSIBILITY_WINDOW_OPENED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this,
chrome::NOTIFICATION_ACCESSIBILITY_WINDOW_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this,
chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this,
chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_ACTION,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this,
chrome::NOTIFICATION_ACCESSIBILITY_TEXT_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this,
chrome::NOTIFICATION_ACCESSIBILITY_MENU_OPENED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this,
chrome::NOTIFICATION_ACCESSIBILITY_MENU_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this,
chrome::NOTIFICATION_ACCESSIBILITY_VOLUME_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ExtensionAccessibilityEventRouter::~ExtensionAccessibilityEventRouter() {
diff --git a/chrome/browser/extensions/extension_apitest.cc b/chrome/browser/extensions/extension_apitest.cc
index b6c0d10..0631151 100644
--- a/chrome/browser/extensions/extension_apitest.cc
+++ b/chrome/browser/extensions/extension_apitest.cc
@@ -13,6 +13,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_service.h"
namespace {
@@ -28,9 +29,9 @@ ExtensionApiTest::ResultCatcher::ResultCatcher()
: profile_restriction_(NULL),
waiting_(false) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_TEST_PASSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_TEST_FAILED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ExtensionApiTest::ResultCatcher::~ResultCatcher() {
diff --git a/chrome/browser/extensions/extension_app_api.cc b/chrome/browser/extensions/extension_app_api.cc
index dd7506c..e301795 100644
--- a/chrome/browser/extensions/extension_app_api.cc
+++ b/chrome/browser/extensions/extension_app_api.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
+#include "content/public/browser/notification_service.h"
const char kBodyTextKey[] = "bodyText";
const char kExtensionIdKey[] = "extensionId";
@@ -70,7 +71,7 @@ bool AppNotifyFunction::RunImpl() {
manager->Add(id, item.release());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED,
content::Source<Profile>(profile_),
content::Details<const std::string>(&id));
@@ -92,7 +93,7 @@ bool AppClearAllNotificationsFunction::RunImpl() {
AppNotificationManager* manager =
profile()->GetExtensionService()->app_notification_manager();
manager->ClearAll(id);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED,
content::Source<Profile>(profile_),
content::Details<const std::string>(&id));
diff --git a/chrome/browser/extensions/extension_bookmarks_module.cc b/chrome/browser/extensions/extension_bookmarks_module.cc
index 21f6607..19d23f2 100644
--- a/chrome/browser/extensions/extension_bookmarks_module.cc
+++ b/chrome/browser/extensions/extension_bookmarks_module.cc
@@ -34,7 +34,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -79,15 +79,16 @@ void BookmarksFunction::Run() {
BookmarkModel* model = profile()->GetBookmarkModel();
if (!model->IsLoaded()) {
// Bookmarks are not ready yet. We'll wait.
- registrar_.Add(this, chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
- NotificationService::AllBrowserContextsAndSources());
+ registrar_.Add(
+ this, chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
+ content::NotificationService::AllBrowserContextsAndSources());
AddRef(); // Balanced in Observe().
return;
}
bool success = RunImpl();
if (success) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_BOOKMARKS_API_INVOKED,
content::Source<const Extension>(GetExtension()),
content::Details<const BookmarksFunction>(this));
diff --git a/chrome/browser/extensions/extension_browser_actions_api.cc b/chrome/browser/extensions/extension_browser_actions_api.cc
index 31ae81f..0a37658 100644
--- a/chrome/browser/extensions/extension_browser_actions_api.cc
+++ b/chrome/browser/extensions/extension_browser_actions_api.cc
@@ -11,7 +11,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/render_messages.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace {
// Errors.
@@ -38,10 +38,10 @@ bool BrowserActionFunction::RunImpl() {
if (!RunBrowserAction())
return false;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
content::Source<ExtensionAction>(browser_action_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
return true;
}
diff --git a/chrome/browser/extensions/extension_browser_event_router.cc b/chrome/browser/extensions/extension_browser_event_router.cc
index 6b7b6bb..af3e5db 100644
--- a/chrome/browser/extensions/extension_browser_event_router.cc
+++ b/chrome/browser/extensions/extension_browser_event_router.cc
@@ -20,7 +20,7 @@
#include "chrome/common/extensions/extension_constants.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace events = extension_event_names;
namespace tab_keys = extension_tabs_module_constants;
@@ -75,7 +75,7 @@ void ExtensionBrowserEventRouter::Init() {
// Needed for when no suitable window can be passed to an extension as the
// currently focused window.
registrar_.Add(this, content::NOTIFICATION_NO_KEY_WINDOW,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
#endif
// Init() can happen after the browser is running, so catch up with any
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index 8898459..f96fd61 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -27,7 +27,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
ExtensionBrowserTest::ExtensionBrowserTest()
: loaded_(false),
@@ -65,7 +65,7 @@ const Extension* ExtensionBrowserTest::LoadExtensionWithOptions(
{
content::NotificationRegistrar registrar;
registrar.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
service->LoadExtension(path, false);
ui_test_utils::RunMessageLoop();
}
@@ -242,13 +242,13 @@ bool ExtensionBrowserTest::InstallOrUpdateExtension(const std::string& id,
{
content::NotificationRegistrar registrar;
registrar.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar.Add(this, chrome::NOTIFICATION_EXTENSION_LOAD_ERROR,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ExtensionInstallUI* install_ui = NULL;
if (ui_type == INSTALL_UI_TYPE_CANCEL)
@@ -303,7 +303,7 @@ void ExtensionBrowserTest::ReloadExtension(const std::string& extension_id) {
service->ReloadExtension(extension_id);
ui_test_utils::RegisterAndWait(this,
chrome::NOTIFICATION_EXTENSION_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
void ExtensionBrowserTest::UnloadExtension(const std::string& extension_id) {
@@ -333,7 +333,7 @@ bool ExtensionBrowserTest::WaitForPageActionCountChangeTo(int count) {
target_page_action_count_ = count;
ui_test_utils::RegisterAndWait(this,
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
return location_bar->PageActionCount() == count;
}
@@ -345,7 +345,7 @@ bool ExtensionBrowserTest::WaitForPageActionVisibilityChangeTo(int count) {
target_visible_page_action_count_ = count;
ui_test_utils::RegisterAndWait(this,
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
return location_bar->PageActionVisibleCount() == count;
}
@@ -354,7 +354,7 @@ bool ExtensionBrowserTest::WaitForExtensionHostsToLoad() {
// Wait for all the extension hosts that exist to finish loading.
content::NotificationRegistrar registrar;
registrar.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ExtensionProcessManager* manager =
browser()->profile()->GetExtensionProcessManager();
@@ -378,7 +378,7 @@ bool ExtensionBrowserTest::WaitForExtensionInstall() {
int before = extension_installs_observed_;
ui_test_utils::RegisterAndWait(this,
chrome::NOTIFICATION_EXTENSION_INSTALLED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
return extension_installs_observed_ == (before + 1);
}
@@ -386,13 +386,13 @@ bool ExtensionBrowserTest::WaitForExtensionInstallError() {
int before = extension_installs_observed_;
ui_test_utils::RegisterAndWait(this,
chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
return extension_installs_observed_ == before;
}
void ExtensionBrowserTest::WaitForExtensionLoad() {
ui_test_utils::RegisterAndWait(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
WaitForExtensionHostsToLoad();
}
@@ -406,7 +406,7 @@ bool ExtensionBrowserTest::WaitForExtensionCrash(
}
ui_test_utils::RegisterAndWait(
this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
return (service->GetExtensionById(extension_id, true) == NULL);
}
diff --git a/chrome/browser/extensions/extension_browsertests_misc.cc b/chrome/browser/extensions/extension_browsertests_misc.cc
index 2b4f79a..c6ef3a0 100644
--- a/chrome/browser/extensions/extension_browsertests_misc.cc
+++ b/chrome/browser/extensions/extension_browsertests_misc.cc
@@ -26,6 +26,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/site_instance.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "net/base/net_util.h"
#include "net/test/test_server.h"
@@ -614,7 +615,7 @@ static void WindowOpenHelper(Browser* browser, const GURL& start_url,
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
browser->GetSelectedTabContents()->render_view_host(), L"",
L"window.open('" + UTF8ToWide(newtab_url) + L"');"));
diff --git a/chrome/browser/extensions/extension_cookies_api.cc b/chrome/browser/extensions/extension_cookies_api.cc
index aaa6067..7da0448 100644
--- a/chrome/browser/extensions/extension_cookies_api.cc
+++ b/chrome/browser/extensions/extension_cookies_api.cc
@@ -19,7 +19,7 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_error_utils.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/base/cookie_monster.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
@@ -35,7 +35,7 @@ void ExtensionCookiesEventRouter::Init() {
CHECK(registrar_.IsEmpty());
registrar_.Add(this,
chrome::NOTIFICATION_COOKIE_CHANGED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
void ExtensionCookiesEventRouter::Observe(
diff --git a/chrome/browser/extensions/extension_debugger_api.cc b/chrome/browser/extensions/extension_debugger_api.cc
index ec39215..23890c9 100644
--- a/chrome/browser/extensions/extension_debugger_api.cc
+++ b/chrome/browser/extensions/extension_debugger_api.cc
@@ -26,7 +26,7 @@
#include "content/browser/debugger/devtools_manager.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/devtools_messages.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
namespace keys = extension_debugger_api_constants;
diff --git a/chrome/browser/extensions/extension_event_router.cc b/chrome/browser/extensions/extension_event_router.cc
index 355daca..74dd20a 100644
--- a/chrome/browser/extensions/extension_event_router.cc
+++ b/chrome/browser/extensions/extension_event_router.cc
@@ -21,7 +21,7 @@
#include "chrome/common/extensions/extension_messages.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/renderer_host/render_process_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace {
@@ -92,9 +92,9 @@ ExtensionEventRouter::ExtensionEventRouter(Profile* profile)
: profile_(profile),
extension_devtools_manager_(profile->GetExtensionDevToolsManager()) {
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
content::Source<Profile>(profile_));
// TODO(tessamac): also get notified for background page crash/failure.
diff --git a/chrome/browser/extensions/extension_history_api.cc b/chrome/browser/extensions/extension_history_api.cc
index 5d6fd0f..cdae1f4 100644
--- a/chrome/browser/extensions/extension_history_api.cc
+++ b/chrome/browser/extensions/extension_history_api.cc
@@ -18,7 +18,8 @@
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
namespace keys = extension_history_api_constants;
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 5fad93c..0f7fa9b 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -45,7 +45,7 @@
#include "content/browser/tab_contents/popup_menu_helper_mac.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/view_messages.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/native_web_keyboard_event.h"
@@ -175,7 +175,7 @@ ExtensionHost::ExtensionHost(const Extension* extension,
}
ExtensionHost::~ExtensionHost() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED,
content::Source<Profile>(profile_),
content::Details<ExtensionHost>(this));
@@ -298,7 +298,7 @@ void ExtensionHost::Observe(int type,
NavigateToURL(url_);
break;
case content::NOTIFICATION_RENDERER_PROCESS_CREATED:
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PROCESS_CREATED,
content::Source<Profile>(profile_),
content::Details<ExtensionHost>(this));
@@ -346,7 +346,7 @@ void ExtensionHost::RenderViewGone(RenderViewHost* render_view_host,
// and they aren't all going to use ExtensionHost. This should be in someplace
// more central, like EPM maybe.
DCHECK_EQ(render_view_host_, render_view_host);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
content::Source<Profile>(profile_),
content::Details<ExtensionHost>(this));
@@ -388,7 +388,7 @@ void ExtensionHost::DidStopLoading() {
#endif
}
if (notify) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
content::Source<Profile>(profile_),
content::Details<ExtensionHost>(this));
@@ -431,7 +431,7 @@ void ExtensionHost::DocumentAvailableInMainFrame(RenderViewHost* rvh) {
void ExtensionHost::DocumentOnLoadCompletedInMainFrame(RenderViewHost* rvh,
int32 page_id) {
if (chrome::VIEW_TYPE_EXTENSION_POPUP == GetRenderViewType()) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_POPUP_VIEW_READY,
content::Source<Profile>(profile_),
content::Details<ExtensionHost>(this));
@@ -503,7 +503,7 @@ void ExtensionHost::Close(RenderViewHost* render_view_host) {
extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_DIALOG ||
extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE ||
extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
content::Source<Profile>(profile_),
content::Details<ExtensionHost>(this));
@@ -572,7 +572,7 @@ void ExtensionHost::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_POPUP) {
if (event.type == NativeWebKeyboardEvent::RawKeyDown &&
event.windowsKeyCode == ui::VKEY_ESCAPE) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
content::Source<Profile>(profile_),
content::Details<ExtensionHost>(this));
diff --git a/chrome/browser/extensions/extension_input_api.cc b/chrome/browser/extensions/extension_input_api.cc
index 86012cb..6621675 100644
--- a/chrome/browser/extensions/extension_input_api.cc
+++ b/chrome/browser/extensions/extension_input_api.cc
@@ -20,7 +20,7 @@
#include "views/widget/widget.h"
#if defined(USE_VIRTUAL_KEYBOARD)
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#endif
#if defined(OS_CHROMEOS) && defined(TOUCH_UI)
@@ -166,10 +166,10 @@ bool SendKeyboardEventInputFunction::RunImpl() {
#if defined(USE_VIRTUAL_KEYBOARD)
bool HideKeyboardFunction::RunImpl() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_HIDE_KEYBOARD_INVOKED,
content::Source<HideKeyboardFunction>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
return true;
}
@@ -185,7 +185,7 @@ bool SetKeyboardHeightFunction::RunImpl() {
// TODO(penghuang) Check the height is not greater than height of browser view
// and set the height of virtual keyboard directly instead of using
// notification.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_SET_KEYBOARD_HEIGHT_INVOKED,
content::Source<SetKeyboardHeightFunction>(this),
content::Details<int>(&height));
diff --git a/chrome/browser/extensions/extension_input_method_apitest.cc b/chrome/browser/extensions/extension_input_method_apitest.cc
index b04d820..a019386 100644
--- a/chrome/browser/extensions/extension_input_method_apitest.cc
+++ b/chrome/browser/extensions/extension_input_method_apitest.cc
@@ -11,7 +11,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -27,7 +27,7 @@ class SetInputMethodListener : public content::NotificationObserver {
// Creates listener, which should reply exactly |count_| times.
explicit SetInputMethodListener(int count) : count_(count) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_TEST_MESSAGE,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
virtual ~SetInputMethodListener() {
diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc
index 25466a6..409e6dd 100644
--- a/chrome/browser/extensions/extension_install_ui.cc
+++ b/chrome/browser/extensions/extension_install_ui.cc
@@ -33,7 +33,7 @@
#include "chrome/common/extensions/extension_resource.h"
#include "chrome/common/extensions/url_pattern.h"
#include "chrome/common/url_constants.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -323,10 +323,11 @@ void ExtensionInstallUI::OnImageLoaded(
case PERMISSIONS_PROMPT:
case RE_ENABLE_PROMPT:
case INSTALL_PROMPT: {
- NotificationService* service = NotificationService::current();
+ content::NotificationService* service =
+ content::NotificationService::current();
service->Notify(chrome::NOTIFICATION_EXTENSION_WILL_SHOW_CONFIRM_DIALOG,
content::Source<ExtensionInstallUI>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
Prompt prompt(prompt_type_);
prompt.SetPermissions(permissions_->GetWarningMessages());
@@ -347,7 +348,7 @@ void ExtensionInstallUI::OpenAppInstalledNTP(Browser* browser,
browser->GetSingletonTabNavigateParams(GURL(chrome::kChromeUINewTabURL));
browser::Navigate(&params);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_APP_INSTALLED_TO_NTP,
content::Source<TabContents>(params.target_contents->tab_contents()),
content::Details<const std::string>(&app_id));
diff --git a/chrome/browser/extensions/extension_management_api.cc b/chrome/browser/extensions/extension_management_api.cc
index 06c846d..fdf215b 100644
--- a/chrome/browser/extensions/extension_management_api.cc
+++ b/chrome/browser/extensions/extension_management_api.cc
@@ -27,7 +27,8 @@
#include "chrome/common/extensions/extension_error_utils.h"
#include "chrome/common/extensions/extension_icon_set.h"
#include "chrome/common/extensions/url_pattern.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
using base::IntToString;
namespace events = extension_event_names;
diff --git a/chrome/browser/extensions/extension_management_browsertest.cc b/chrome/browser/extensions/extension_management_browsertest.cc
index 2f33502..1bae8ee 100644
--- a/chrome/browser/extensions/extension_management_browsertest.cc
+++ b/chrome/browser/extensions/extension_management_browsertest.cc
@@ -21,6 +21,7 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/renderer_host/render_view_host.h"
+#include "content/public/browser/notification_service.h"
class ExtensionManagementTest : public ExtensionBrowserTest {
protected:
@@ -236,7 +237,8 @@ class NotificationListener : public content::NotificationObserver {
chrome::NOTIFICATION_EXTENSION_UPDATE_FOUND
};
for (size_t i = 0; i < arraysize(types); i++) {
- registrar_.Add(this, types[i], NotificationService::AllSources());
+ registrar_.Add(
+ this, types[i], content::NotificationService::AllSources());
}
}
~NotificationListener() {}
diff --git a/chrome/browser/extensions/extension_menu_manager.cc b/chrome/browser/extensions/extension_menu_manager.cc
index 1ac320f..d69539e 100644
--- a/chrome/browser/extensions/extension_menu_manager.cc
+++ b/chrome/browser/extensions/extension_menu_manager.cc
@@ -17,7 +17,8 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "ui/base/text/text_elider.h"
#include "ui/gfx/favicon_size.h"
#include "webkit/glue/context_menu.h"
diff --git a/chrome/browser/extensions/extension_menu_manager_unittest.cc b/chrome/browser/extensions/extension_menu_manager_unittest.cc
index 5492626..0a4cfc0 100644
--- a/chrome/browser/extensions/extension_menu_manager_unittest.cc
+++ b/chrome/browser/extensions/extension_menu_manager_unittest.cc
@@ -19,7 +19,7 @@
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/test/base/testing_profile.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/glue/context_menu.h"
@@ -311,7 +311,8 @@ TEST_F(ExtensionMenuManagerTest, ChangeParent) {
// Tests that we properly remove an extension's menu item when that extension is
// unloaded.
TEST_F(ExtensionMenuManagerTest, ExtensionUnloadRemovesMenuItems) {
- NotificationService* notifier = NotificationService::current();
+ content::NotificationService* notifier =
+ content::NotificationService::current();
ASSERT_TRUE(notifier != NULL);
// Create a test extension.
diff --git a/chrome/browser/extensions/extension_message_service.cc b/chrome/browser/extensions/extension_message_service.cc
index c90ca5c..f1febd7 100644
--- a/chrome/browser/extensions/extension_message_service.cc
+++ b/chrome/browser/extensions/extension_message_service.cc
@@ -19,7 +19,7 @@
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
// Since we have 2 ports for every channel, we just index channels by half the
@@ -117,11 +117,11 @@ void ExtensionMessageService::AllocatePortIdPair(int* port1, int* port2) {
ExtensionMessageService::ExtensionMessageService(Profile* profile)
: profile_(profile) {
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_DELETED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
ExtensionMessageService::~ExtensionMessageService() {
diff --git a/chrome/browser/extensions/extension_messages_apitest.cc b/chrome/browser/extensions/extension_messages_apitest.cc
index 36a1336..c4c867e 100644
--- a/chrome/browser/extensions/extension_messages_apitest.cc
+++ b/chrome/browser/extensions/extension_messages_apitest.cc
@@ -7,7 +7,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
namespace {
@@ -16,7 +16,7 @@ class MessageSender : public content::NotificationObserver {
public:
MessageSender() {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
private:
diff --git a/chrome/browser/extensions/extension_metrics_apitest.cc b/chrome/browser/extensions/extension_metrics_apitest.cc
index 3809c7a..f96d4ac 100644
--- a/chrome/browser/extensions/extension_metrics_apitest.cc
+++ b/chrome/browser/extensions/extension_metrics_apitest.cc
@@ -9,7 +9,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace {
@@ -86,7 +86,7 @@ class UserActionObserver : public content::NotificationObserver {
UserActionObserver::UserActionObserver() {
registrar_.Add(this, content::NOTIFICATION_USER_ACTION,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
void UserActionObserver::Observe(int type,
diff --git a/chrome/browser/extensions/extension_navigation_observer.cc b/chrome/browser/extensions/extension_navigation_observer.cc
index f093c62..a08a9ec 100644
--- a/chrome/browser/extensions/extension_navigation_observer.cc
+++ b/chrome/browser/extensions/extension_navigation_observer.cc
@@ -8,7 +8,7 @@
#include "chrome/browser/profiles/profile.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/navigation_entry.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
ExtensionNavigationObserver::ExtensionNavigationObserver(Profile* profile)
: profile_(profile) {
@@ -37,7 +37,7 @@ void ExtensionNavigationObserver::Observe(
void ExtensionNavigationObserver::RegisterForNotifications() {
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
void ExtensionNavigationObserver::PromptToEnableExtensionIfNecessary(
diff --git a/chrome/browser/extensions/extension_omnibox_api.cc b/chrome/browser/extensions/extension_omnibox_api.cc
index e51939e..25e1bbd 100644
--- a/chrome/browser/extensions/extension_omnibox_api.cc
+++ b/chrome/browser/extensions/extension_omnibox_api.cc
@@ -17,7 +17,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension_constants.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace events {
const char kOnInputStarted[] = "omnibox.onInputStarted";
@@ -99,9 +99,10 @@ void ExtensionOmniboxEventRouter::OnInputEntered(
profile->GetExtensionEventRouter()->DispatchEventToExtension(
extension_id, events::kOnInputEntered, json_args, profile, GURL());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_OMNIBOX_INPUT_ENTERED,
- content::Source<Profile>(profile), NotificationService::NoDetails());
+ content::Source<Profile>(profile),
+ content::NotificationService::NoDetails());
}
// static
@@ -140,7 +141,7 @@ bool OmniboxSendSuggestionsFunction::RunImpl() {
}
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_OMNIBOX_SUGGESTIONS_READY,
content::Source<Profile>(profile_),
content::Details<ExtensionOmniboxSuggestions>(&suggestions));
@@ -171,10 +172,10 @@ bool OmniboxSetDefaultSuggestionFunction::RunImpl() {
profile_->GetExtensionService()->GetPropertyBag(GetExtension()),
suggestion);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_OMNIBOX_DEFAULT_SUGGESTION_CHANGED,
content::Source<Profile>(profile_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
return true;
}
diff --git a/chrome/browser/extensions/extension_omnibox_apitest.cc b/chrome/browser/extensions/extension_omnibox_apitest.cc
index ed74ae1..2e96c73c 100644
--- a/chrome/browser/extensions/extension_omnibox_apitest.cc
+++ b/chrome/browser/extensions/extension_omnibox_apitest.cc
@@ -23,6 +23,7 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/notification_service.h"
#if defined(TOOLKIT_GTK)
#include "chrome/browser/ui/gtk/browser_window_gtk.h"
@@ -66,7 +67,7 @@ class OmniboxApiTest : public ExtensionApiTest {
void WaitForTemplateURLServiceToLoad() {
ui_test_utils::WindowedNotificationObserver loaded_observer(
chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
TemplateURLService* model =
TemplateURLServiceFactory::GetForProfile(browser()->profile());
model->Load();
diff --git a/chrome/browser/extensions/extension_permissions_api.cc b/chrome/browser/extensions/extension_permissions_api.cc
index 2c652ad..b6ce293 100644
--- a/chrome/browser/extensions/extension_permissions_api.cc
+++ b/chrome/browser/extensions/extension_permissions_api.cc
@@ -16,7 +16,7 @@
#include "chrome/common/extensions/extension_messages.h"
#include "chrome/common/extensions/extension_permission_set.h"
#include "chrome/common/extensions/url_pattern_set.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
namespace {
@@ -212,7 +212,7 @@ void ExtensionPermissionsManager::NotifyPermissionsUpdated(
// Notify other APIs or interested parties.
UpdatedExtensionPermissionsInfo info = UpdatedExtensionPermissionsInfo(
extension, changed, reason);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PERMISSIONS_UPDATED,
content::Source<Profile>(extension_service_->profile()),
content::Details<UpdatedExtensionPermissionsInfo>(&info));
diff --git a/chrome/browser/extensions/extension_permissions_api.h b/chrome/browser/extensions/extension_permissions_api.h
index a844065..7644a6a 100644
--- a/chrome/browser/extensions/extension_permissions_api.h
+++ b/chrome/browser/extensions/extension_permissions_api.h
@@ -12,7 +12,6 @@
#include "chrome/common/extensions/extension_permission_set.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_process_host.h"
-#include "content/common/notification_service.h"
namespace base {
class DictionaryValue;
diff --git a/chrome/browser/extensions/extension_preference_api.cc b/chrome/browser/extensions/extension_preference_api.cc
index 8d9291a..871d99b 100644
--- a/chrome/browser/extensions/extension_preference_api.cc
+++ b/chrome/browser/extensions/extension_preference_api.cc
@@ -23,7 +23,8 @@
#include "chrome/common/extensions/extension_error_utils.h"
#include "chrome/common/extensions/extension_permission_set.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
namespace {
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index 3c4ee0b..c5f03f2 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -15,7 +15,7 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/url_pattern.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
using base::Time;
@@ -1124,7 +1124,7 @@ void ExtensionPrefs::SetBrowserActionVisibility(const Extension* extension,
UpdateExtensionPref(extension->id(), kBrowserActionVisible,
Value::CreateBooleanValue(visible));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED,
content::Source<ExtensionPrefs>(this),
content::Details<const Extension>(extension));
@@ -1458,10 +1458,10 @@ void ExtensionPrefs::SetAppLauncherOrder(
for (size_t i = 0; i < extension_ids.size(); ++i)
SetAppLaunchIndex(extension_ids.at(i), i);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_LAUNCHER_REORDERED,
content::Source<ExtensionPrefs>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
int ExtensionPrefs::GetPageIndex(const std::string& extension_id) {
diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc
index c27c240..263ced9 100644
--- a/chrome/browser/extensions/extension_process_manager.cc
+++ b/chrome/browser/extensions/extension_process_manager.cc
@@ -24,7 +24,7 @@
#include "content/browser/browser_thread.h"
#include "content/browser/site_instance.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace {
@@ -108,9 +108,9 @@ ExtensionProcessManager::ExtensionProcessManager(Profile* profile)
// We can listen to everything for SITE_INSTANCE_DELETED because we check the
// |site_instance_id| in UnregisterExtensionSiteInstance.
registrar_.Add(this, content::NOTIFICATION_SITE_INSTANCE_DELETED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ExtensionProcessManager::~ExtensionProcessManager() {
@@ -467,7 +467,7 @@ void ExtensionProcessManager::OnExtensionHostCreated(ExtensionHost* host,
all_hosts_.insert(host);
if (is_background)
background_hosts_.insert(host);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_HOST_CREATED,
content::Source<ExtensionProcessManager>(this),
content::Details<ExtensionHost>(host));
@@ -493,7 +493,7 @@ IncognitoExtensionProcessManager::IncognitoExtensionProcessManager(
DCHECK(profile->IsOffTheRecord());
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_WINDOW_READY,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ExtensionHost* IncognitoExtensionProcessManager::CreateViewHost(
diff --git a/chrome/browser/extensions/extension_save_page_api.cc b/chrome/browser/extensions/extension_save_page_api.cc
index 39f226b..5942206 100644
--- a/chrome/browser/extensions/extension_save_page_api.cc
+++ b/chrome/browser/extensions/extension_save_page_api.cc
@@ -12,7 +12,8 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/download/mhtml_generation_manager.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
// Error messages.
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index a49a1f8..2e990da 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -91,7 +91,7 @@
#include "content/browser/plugin_service.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/pepper_plugin_registry.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
@@ -616,11 +616,11 @@ ExtensionService::ExtensionService(Profile* profile,
}
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
pref_change_registrar_.Init(profile->GetPrefs());
pref_change_registrar_.Add(prefs::kExtensionInstallAllowList, this);
pref_change_registrar_.Add(prefs::kExtensionInstallDenyList, this);
@@ -891,7 +891,7 @@ bool ExtensionService::UninstallExtension(
// managed extensions.
if (!Extension::UserMayDisable(extension->location()) &&
!external_uninstall) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UNINSTALL_NOT_ALLOWED,
content::Source<Profile>(profile_),
content::Details<const Extension>(extension));
@@ -959,7 +959,7 @@ bool ExtensionService::UninstallExtension(
UntrackTerminatedExtension(extension_id);
// Notify interested parties that we've uninstalled this extension.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
content::Source<Profile>(profile_),
content::Details<const std::string>(&extension_id));
@@ -1473,7 +1473,7 @@ void ExtensionService::NotifyExtensionLoaded(const Extension* extension) {
// Tell subsystems that use the EXTENSION_LOADED notification about the new
// extension.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_LOADED,
content::Source<Profile>(profile_),
content::Details<const Extension>(extension));
@@ -1587,7 +1587,7 @@ void ExtensionService::NotifyExtensionUnloaded(
const Extension* extension,
extension_misc::UnloadedExtensionReason reason) {
UnloadedExtensionInfo details(extension, reason);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UNLOADED,
content::Source<Profile>(profile_),
content::Details<UnloadedExtensionInfo>(&details));
@@ -2277,7 +2277,7 @@ void ExtensionService::UnloadExtension(
UnloadedExtensionInfo details(extension, reason);
details.already_disabled = true;
disabled_extensions_.erase(iter);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UNLOADED,
content::Source<Profile>(profile_),
content::Details<UnloadedExtensionInfo>(&details));
@@ -2349,10 +2349,10 @@ void ExtensionService::OnLoadedInstalledExtensions() {
}
ready_ = true;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSIONS_READY,
content::Source<Profile>(profile_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void ExtensionService::AddExtension(const Extension* extension) {
@@ -2390,7 +2390,7 @@ void ExtensionService::AddExtension(const Extension* extension) {
// TODO(aa): This seems dodgy. It seems that AddExtension() could get called
// with a disabled extension for other reasons other than that an update was
// disabled.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
content::Source<Profile>(profile_),
content::Details<const Extension>(extension));
@@ -2558,7 +2558,7 @@ void ExtensionService::OnExtensionInstalled(
<< " and update URL " << extension->update_url().spec()
<< "; not installing";
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_INSTALL_NOT_ALLOWED,
content::Source<Profile>(profile_),
content::Details<const Extension>(extension));
@@ -2609,7 +2609,7 @@ void ExtensionService::OnExtensionInstalled(
extension_prefs_->SetDelaysNetworkRequests(
extension->id(), extension->ImplicitlyDelaysNetworkStartup());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_INSTALLED,
content::Source<Profile>(profile_),
content::Details<const Extension>(extension));
@@ -2783,7 +2783,8 @@ void ExtensionService::ReportExtensionLoadError(
const FilePath& extension_path,
const std::string &error,
bool be_noisy) {
- NotificationService* service = NotificationService::current();
+ content::NotificationService* service =
+ content::NotificationService::current();
service->Notify(chrome::NOTIFICATION_EXTENSION_LOAD_ERROR,
content::Source<Profile>(profile_),
content::Details<const std::string>(&error));
@@ -2918,10 +2919,10 @@ bool ExtensionService::IsBackgroundPageReady(const Extension* extension) {
void ExtensionService::SetBackgroundPageReady(const Extension* extension) {
DCHECK(!extension->background_url().is_empty());
extension_runtime_data_[extension->id()].background_page_ready = true;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY,
content::Source<const Extension>(extension),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
bool ExtensionService::IsBeingUpgraded(const Extension* extension) {
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index 127737f..b23dc47 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -59,7 +59,7 @@
#include "content/browser/in_process_webkit/dom_storage_context.h"
#include "content/browser/in_process_webkit/webkit_context.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
#include "net/base/cookie_monster.h"
#include "net/base/cookie_options.h"
@@ -485,11 +485,11 @@ class ExtensionServiceTest
public:
ExtensionServiceTest() : installed_(NULL) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
virtual void Observe(int type,
@@ -3467,7 +3467,7 @@ class ExtensionsReadyRecorder : public content::NotificationObserver {
public:
ExtensionsReadyRecorder() : ready_(false) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSIONS_READY,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
void set_ready(bool value) { ready_ = value; }
diff --git a/chrome/browser/extensions/extension_settings_frontend_unittest.cc b/chrome/browser/extensions/extension_settings_frontend_unittest.cc
index 2e3f1ab..076eda3 100644
--- a/chrome/browser/extensions/extension_settings_frontend_unittest.cc
+++ b/chrome/browser/extensions/extension_settings_frontend_unittest.cc
@@ -14,9 +14,6 @@
#include "chrome/browser/extensions/extension_settings_storage.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/common/notification_service.h"
-#include "content/public/browser/notification_details.h"
-#include "content/public/browser/notification_source.h"
class ExtensionSettingsFrontendTest : public testing::Test {
public:
diff --git a/chrome/browser/extensions/extension_startup_browsertest.cc b/chrome/browser/extensions/extension_startup_browsertest.cc
index 147c313..835d274 100644
--- a/chrome/browser/extensions/extension_startup_browsertest.cc
+++ b/chrome/browser/extensions/extension_startup_browsertest.cc
@@ -19,6 +19,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_service.h"
#include "net/base/net_util.h"
// This file contains high-level startup tests for the extensions system. We've
@@ -92,7 +93,7 @@ class ExtensionStartupTestBase : public InProcessBrowserTest {
ui_test_utils::WindowedNotificationObserver user_scripts_observer(
chrome::NOTIFICATION_USER_SCRIPTS_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
UserScriptMaster* master = browser()->profile()->GetUserScriptMaster();
if (!master->ScriptsReady())
user_scripts_observer.Wait();
@@ -169,7 +170,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionsStartupTest, MAYBE_NoFileAccess) {
if (service->AllowFileAccess(service->extensions()->at(i))) {
ui_test_utils::WindowedNotificationObserver user_scripts_observer(
chrome::NOTIFICATION_USER_SCRIPTS_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
service->SetAllowFileAccess(service->extensions()->at(i), false);
user_scripts_observer.Wait();
}
diff --git a/chrome/browser/extensions/extension_tab_helper.cc b/chrome/browser/extensions/extension_tab_helper.cc
index ad8c933..0b85716 100644
--- a/chrome/browser/extensions/extension_tab_helper.cc
+++ b/chrome/browser/extensions/extension_tab_helper.cc
@@ -22,7 +22,7 @@
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
ExtensionTabHelper::ExtensionTabHelper(TabContentsWrapper* wrapper)
: TabContentsObserver(wrapper->tab_contents()),
@@ -55,10 +55,10 @@ void ExtensionTabHelper::SetExtensionApp(const Extension* extension) {
UpdateExtensionAppIcon(extension_app_);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED,
content::Source<ExtensionTabHelper>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void ExtensionTabHelper::SetExtensionAppById(
@@ -103,10 +103,10 @@ void ExtensionTabHelper::DidNavigateMainFramePostCommit(
if (browser_action) {
browser_action->ClearAllValuesForTab(
wrapper_->restore_tab_helper()->session_id().id());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
content::Source<ExtensionAction>(browser_action),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
ExtensionAction* page_action =
diff --git a/chrome/browser/extensions/extension_tab_id_map.cc b/chrome/browser/extensions/extension_tab_id_map.cc
index 3f8286d..c07da6f 100644
--- a/chrome/browser/extensions/extension_tab_id_map.cc
+++ b/chrome/browser/extensions/extension_tab_id_map.cc
@@ -14,7 +14,7 @@
#include "content/browser/renderer_host/render_process_host.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_observer.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
//
@@ -41,11 +41,11 @@ class ExtensionTabIdMap::TabObserver : public content::NotificationObserver {
ExtensionTabIdMap::TabObserver::TabObserver() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_DELETED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_TAB_PARENTED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
ExtensionTabIdMap::TabObserver::~TabObserver() {
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index 7cc8f14..221fbf3 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -47,7 +47,8 @@
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "skia/ext/image_operations.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/skia/include/core/SkBitmap.h"
diff --git a/chrome/browser/extensions/extension_test_api.cc b/chrome/browser/extensions/extension_test_api.cc
index a78707a..a8f85fc 100644
--- a/chrome/browser/extensions/extension_test_api.cc
+++ b/chrome/browser/extensions/extension_test_api.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace {
@@ -28,10 +28,10 @@ const char kNoTestConfigDataError[] = "Test configuration was not set.";
ExtensionTestPassFunction::~ExtensionTestPassFunction() {}
bool ExtensionTestPassFunction::RunImpl() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_TEST_PASSED,
content::Source<Profile>(dispatcher()->profile()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
return true;
}
@@ -40,7 +40,7 @@ ExtensionTestFailFunction::~ExtensionTestFailFunction() {}
bool ExtensionTestFailFunction::RunImpl() {
std::string message;
EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &message));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_TEST_FAILED,
content::Source<Profile>(dispatcher()->profile()),
content::Details<std::string>(&message));
@@ -80,7 +80,7 @@ bool ExtensionTestSendMessageFunction::RunImpl() {
std::string message;
EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &message));
AddRef(); // balanced in Reply
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_TEST_MESSAGE,
content::Source<ExtensionTestSendMessageFunction>(this),
content::Details<std::string>(&message));
diff --git a/chrome/browser/extensions/extension_test_message_listener.cc b/chrome/browser/extensions/extension_test_message_listener.cc
index 42df2b0..545925e 100644
--- a/chrome/browser/extensions/extension_test_message_listener.cc
+++ b/chrome/browser/extensions/extension_test_message_listener.cc
@@ -7,7 +7,7 @@
#include "chrome/browser/extensions/extension_test_api.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
ExtensionTestMessageListener::ExtensionTestMessageListener(
const std::string& expected_message,
@@ -17,7 +17,7 @@ ExtensionTestMessageListener::ExtensionTestMessageListener(
waiting_(false),
will_reply_(will_reply) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_TEST_MESSAGE,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ExtensionTestMessageListener::~ExtensionTestMessageListener() {}
diff --git a/chrome/browser/extensions/extension_toolbar_model.cc b/chrome/browser/extensions/extension_toolbar_model.cc
index ef2d276..6f8c695 100644
--- a/chrome/browser/extensions/extension_toolbar_model.cc
+++ b/chrome/browser/extensions/extension_toolbar_model.cc
@@ -11,7 +11,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
ExtensionToolbarModel::ExtensionToolbarModel(ExtensionService* service)
: service_(service),
diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc
index 29f7733..2294c1d 100644
--- a/chrome/browser/extensions/extension_updater.cc
+++ b/chrome/browser/extensions/extension_updater.cc
@@ -37,7 +37,7 @@
#include "chrome/common/extensions/extension_file_util.h"
#include "chrome/common/pref_names.h"
#include "content/browser/utility_process_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "crypto/sha2.h"
#include "googleurl/src/gurl.h"
@@ -1216,14 +1216,14 @@ void ExtensionUpdater::FetchUpdatedExtension(const std::string& id,
}
void ExtensionUpdater::NotifyStarted() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UPDATING_STARTED,
content::Source<Profile>(profile_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void ExtensionUpdater::NotifyUpdateFound(const std::string& extension_id) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UPDATE_FOUND,
content::Source<Profile>(profile_),
content::Details<const std::string>(&extension_id));
@@ -1231,10 +1231,10 @@ void ExtensionUpdater::NotifyUpdateFound(const std::string& extension_id) {
void ExtensionUpdater::NotifyIfFinished() {
if (in_progress_ids_.empty()) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UPDATING_FINISHED,
content::Source<Profile>(profile_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
VLOG(1) << "Sending EXTENSION_UPDATING_FINISHED";
}
}
diff --git a/chrome/browser/extensions/extension_warning_set.cc b/chrome/browser/extensions/extension_warning_set.cc
index f84a5ca..bbe2da8 100644
--- a/chrome/browser/extensions/extension_warning_set.cc
+++ b/chrome/browser/extensions/extension_warning_set.cc
@@ -8,7 +8,7 @@
#include "chrome/browser/ui/global_error_service.h"
#include "chrome/browser/ui/global_error_service_factory.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -126,10 +126,10 @@ void ExtensionWarningSet::SuppressBadgeForCurrentWarnings() {
}
void ExtensionWarningSet::NotifyWarningsChanged() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_WARNING_CHANGED,
content::Source<Profile>(profile_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void ExtensionWarningSet::ActivateBadge() {
diff --git a/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc b/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc
index 5476f68..bda21c73 100644
--- a/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc
+++ b/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/internal_auth.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "net/base/escape.h"
@@ -84,7 +84,7 @@ bool WebSocketProxyPrivateGetPassportForTCPFunction::RunImpl() {
delay_response = true;
registrar_.Add(
this, chrome::NOTIFICATION_WEB_SOCKET_PROXY_STARTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
chromeos::WebSocketProxyController::Initiate();
}
@@ -136,7 +136,7 @@ bool WebSocketProxyPrivateGetURLForTCPFunction::RunImpl() {
delay_response = true;
registrar_.Add(
this, chrome::NOTIFICATION_WEB_SOCKET_PROXY_STARTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
chromeos::WebSocketProxyController::Initiate();
}
diff --git a/chrome/browser/extensions/extension_webnavigation_api.cc b/chrome/browser/extensions/extension_webnavigation_api.cc
index 0b453a7..0cc2d01 100644
--- a/chrome/browser/extensions/extension_webnavigation_api.cc
+++ b/chrome/browser/extensions/extension_webnavigation_api.cc
@@ -19,7 +19,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "net/base/net_errors.h"
@@ -367,10 +367,10 @@ void ExtensionWebNavigationEventRouter::Init() {
content::Source<content::BrowserContext>(profile_));
registrar_.Add(this,
content::NOTIFICATION_TAB_ADDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this,
content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
}
diff --git a/chrome/browser/extensions/extension_webrequest_apitest.cc b/chrome/browser/extensions/extension_webrequest_apitest.cc
index c1c5d41..d77be88 100644
--- a/chrome/browser/extensions/extension_webrequest_apitest.cc
+++ b/chrome/browser/extensions/extension_webrequest_apitest.cc
@@ -9,7 +9,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/base/mock_host_resolver.h"
namespace {
@@ -19,7 +19,7 @@ class CancelLoginDialog : public content::NotificationObserver {
CancelLoginDialog() {
registrar_.Add(this,
chrome::NOTIFICATION_AUTH_NEEDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
virtual ~CancelLoginDialog() {}
diff --git a/chrome/browser/extensions/extension_webstore_private_apitest.cc b/chrome/browser/extensions/extension_webstore_private_apitest.cc
index beaa097..d7fbf65 100644
--- a/chrome/browser/extensions/extension_webstore_private_apitest.cc
+++ b/chrome/browser/extensions/extension_webstore_private_apitest.cc
@@ -16,7 +16,6 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
#include "net/base/mock_host_resolver.h"
namespace {
diff --git a/chrome/browser/extensions/external_policy_extension_loader.cc b/chrome/browser/extensions/external_policy_extension_loader.cc
index 88872b9..def4fa5 100644
--- a/chrome/browser/extensions/external_policy_extension_loader.cc
+++ b/chrome/browser/extensions/external_policy_extension_loader.cc
@@ -12,7 +12,8 @@
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "googleurl/src/gurl.h"
namespace {
diff --git a/chrome/browser/extensions/image_loading_tracker.cc b/chrome/browser/extensions/image_loading_tracker.cc
index 92965b2..d43ace0 100644
--- a/chrome/browser/extensions/image_loading_tracker.cc
+++ b/chrome/browser/extensions/image_loading_tracker.cc
@@ -10,7 +10,7 @@
#include "chrome/common/extensions/extension_resource.h"
#include "content/browser/browser_thread.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "skia/ext/image_operations.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "webkit/glue/image_decoder.h"
@@ -123,7 +123,7 @@ ImageLoadingTracker::ImageLoadingTracker(Observer* observer)
: observer_(observer),
next_id_(0) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ImageLoadingTracker::~ImageLoadingTracker() {
diff --git a/chrome/browser/extensions/image_loading_tracker_unittest.cc b/chrome/browser/extensions/image_loading_tracker_unittest.cc
index b848204..6496dd2 100644
--- a/chrome/browser/extensions/image_loading_tracker_unittest.cc
+++ b/chrome/browser/extensions/image_loading_tracker_unittest.cc
@@ -12,7 +12,7 @@
#include "chrome/common/extensions/extension_icon_set.h"
#include "chrome/common/extensions/extension_resource.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/size.h"
@@ -162,9 +162,9 @@ TEST_F(ImageLoadingTrackerTest, DeleteExtensionWhileWaitingForCache) {
// Send out notification the extension was uninstalled.
UnloadedExtensionInfo details(extension.get(),
extension_misc::UNLOAD_REASON_UNINSTALL);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UNLOADED,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
content::Details<UnloadedExtensionInfo>(&details));
// Chuck the extension, that way if anyone tries to access it we should crash
diff --git a/chrome/browser/extensions/network_delay_listener.cc b/chrome/browser/extensions/network_delay_listener.cc
index f35a1fe..b372c60 100644
--- a/chrome/browser/extensions/network_delay_listener.cc
+++ b/chrome/browser/extensions/network_delay_listener.cc
@@ -14,7 +14,7 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/url_request/url_request.h"
NetworkDelayListener::NetworkDelayListener()
@@ -24,11 +24,11 @@ NetworkDelayListener::NetworkDelayListener()
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
AddRef(); // Will be balanced in Cleanup().
}
diff --git a/chrome/browser/extensions/network_delay_listener_unittest.cc b/chrome/browser/extensions/network_delay_listener_unittest.cc
index cfae394..1223804 100644
--- a/chrome/browser/extensions/network_delay_listener_unittest.cc
+++ b/chrome/browser/extensions/network_delay_listener_unittest.cc
@@ -15,7 +15,7 @@
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "content/browser/renderer_host/resource_queue.h"
#include "content/browser/site_instance.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_test_job.h"
#include "net/url_request/url_request_test_util.h"
@@ -134,7 +134,7 @@ class NetworkDelayListenerTest
scoped_ptr<TestExtensionHost> background_host(
new TestExtensionHost(extension,
chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
content::Source<Profile>(profile_.get()),
content::Details<ExtensionHost>(background_host.get()));
@@ -164,7 +164,7 @@ TEST_F(NetworkDelayListenerTest, DelayAndLoad) {
// We don't care about a loaded extension dialog.
scoped_ptr<TestExtensionHost> dialog_host(
new TestExtensionHost(extension1_, chrome::VIEW_TYPE_EXTENSION_DIALOG));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
content::Source<Profile>(profile_.get()),
content::Details<ExtensionHost>(dialog_host.get()));
diff --git a/chrome/browser/extensions/speech_input/extension_speech_input_api.cc b/chrome/browser/extensions/speech_input/extension_speech_input_api.cc
index 33c5737..48cf173 100644
--- a/chrome/browser/extensions/speech_input/extension_speech_input_api.cc
+++ b/chrome/browser/extensions/speech_input/extension_speech_input_api.cc
@@ -10,6 +10,8 @@
#include "chrome/browser/extensions/speech_input/extension_speech_input_manager.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
namespace constants = extension_speech_input_api_constants;
diff --git a/chrome/browser/extensions/speech_input/extension_speech_input_api.h b/chrome/browser/extensions/speech_input/extension_speech_input_api.h
index fffbc1b..c0b2318 100644
--- a/chrome/browser/extensions/speech_input/extension_speech_input_api.h
+++ b/chrome/browser/extensions/speech_input/extension_speech_input_api.h
@@ -7,7 +7,7 @@
#pragma once
#include "chrome/browser/extensions/extension_function.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_observer.h"
class ExtensionSpeechInputManager;
diff --git a/chrome/browser/extensions/speech_input/extension_speech_input_manager.cc b/chrome/browser/extensions/speech_input/extension_speech_input_manager.cc
index b67f276..a5a92a7 100644
--- a/chrome/browser/extensions/speech_input/extension_speech_input_manager.cc
+++ b/chrome/browser/extensions/speech_input/extension_speech_input_manager.cc
@@ -17,7 +17,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
using namespace speech_input;
@@ -272,7 +272,7 @@ void ExtensionSpeechInputManager::DidStartReceivingAudioOnUIThread() {
state_ = kRecording;
VLOG(1) << "Sending start notification";
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_SPEECH_INPUT_RECORDING_STARTED,
content::Source<Profile>(profile_),
content::Details<std::string>(&extension_id_in_use_));
@@ -405,7 +405,7 @@ void ExtensionSpeechInputManager::DispatchError(
// Will set the error property in the ongoing extension function calls.
ExtensionError details(extension_id, error);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_SPEECH_INPUT_FAILED,
content::Source<Profile>(profile_),
content::Details<ExtensionError>(&details));
@@ -604,7 +604,7 @@ void ExtensionSpeechInputManager::StopSucceededOnUIThread() {
std::string extension_id = extension_id_in_use_;
ResetToIdleState();
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_SPEECH_INPUT_RECORDING_STOPPED,
// Guarded by the state_ == kShutdown check.
content::Source<Profile>(profile_),
diff --git a/chrome/browser/extensions/theme_installed_infobar_delegate.cc b/chrome/browser/extensions/theme_installed_infobar_delegate.cc
index e9832c6..e6a9373 100644
--- a/chrome/browser/extensions/theme_installed_infobar_delegate.cc
+++ b/chrome/browser/extensions/theme_installed_infobar_delegate.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources_standard.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/extensions/user_script_listener.cc b/chrome/browser/extensions/user_script_listener.cc
index ff0a036c..db7610d 100644
--- a/chrome/browser/extensions/user_script_listener.cc
+++ b/chrome/browser/extensions/user_script_listener.cc
@@ -12,7 +12,7 @@
#include "chrome/common/extensions/url_pattern.h"
#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/url_request/url_request.h"
struct UserScriptListener::ProfileData {
@@ -32,13 +32,13 @@ UserScriptListener::UserScriptListener()
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_USER_SCRIPTS_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
AddRef(); // Will be balanced in Cleanup().
}
diff --git a/chrome/browser/extensions/user_script_listener_unittest.cc b/chrome/browser/extensions/user_script_listener_unittest.cc
index faf744b..3d88cc6 100644
--- a/chrome/browser/extensions/user_script_listener_unittest.cc
+++ b/chrome/browser/extensions/user_script_listener_unittest.cc
@@ -17,7 +17,7 @@
#include "content/browser/renderer_host/global_request_id.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "content/browser/renderer_host/resource_queue.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_test_job.h"
#include "net/url_request/url_request_test_util.h"
@@ -157,10 +157,10 @@ TEST_F(UserScriptListenerTest, DelayAndUpdate) {
scoped_ptr<TestURLRequest> request(StartTestRequest(&delegate, kMatchingUrl));
ASSERT_FALSE(request->is_pending());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_USER_SCRIPTS_UPDATED,
content::Source<Profile>(profile_.get()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
MessageLoop::current()->RunAllPending();
EXPECT_EQ(kTestData, delegate.data_received());
}
@@ -180,10 +180,10 @@ TEST_F(UserScriptListenerTest, DelayAndUnload) {
// listener that the user scripts have been updated.
ASSERT_FALSE(request->is_pending());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_USER_SCRIPTS_UPDATED,
content::Source<Profile>(profile_.get()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
MessageLoop::current()->RunAllPending();
EXPECT_EQ(kTestData, delegate.data_received());
}
@@ -226,7 +226,7 @@ TEST_F(UserScriptListenerTest, MultiProfile) {
"content_script_yahoo.json", &error);
ASSERT_TRUE(extension.get());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_LOADED,
content::Source<Profile>(&profile2),
content::Details<Extension>(extension.get()));
@@ -237,19 +237,19 @@ TEST_F(UserScriptListenerTest, MultiProfile) {
// When the first profile's user scripts are ready, the request should still
// be blocked waiting for profile2.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_USER_SCRIPTS_UPDATED,
content::Source<Profile>(profile_.get()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
MessageLoop::current()->RunAllPending();
ASSERT_FALSE(request->is_pending());
EXPECT_TRUE(delegate.data_received().empty());
// After profile2 is ready, the request should proceed.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_USER_SCRIPTS_UPDATED,
content::Source<Profile>(&profile2),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
MessageLoop::current()->RunAllPending();
EXPECT_EQ(kTestData, delegate.data_received());
}
diff --git a/chrome/browser/extensions/user_script_master.cc b/chrome/browser/extensions/user_script_master.cc
index f3c5be1..f28003d 100644
--- a/chrome/browser/extensions/user_script_master.cc
+++ b/chrome/browser/extensions/user_script_master.cc
@@ -25,7 +25,7 @@
#include "chrome/common/extensions/extension_resource.h"
#include "chrome/common/extensions/extension_set.h"
#include "content/browser/renderer_host/render_process_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
// Helper function to parse greasesmonkey headers
static bool GetDeclarationValue(const base::StringPiece& line,
@@ -295,7 +295,7 @@ UserScriptMaster::UserScriptMaster(Profile* profile)
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
content::Source<Profile>(profile_));
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
UserScriptMaster::~UserScriptMaster() {
@@ -323,7 +323,7 @@ void UserScriptMaster::NewScriptsAvailable(base::SharedMemory* handle) {
SendUpdate(i.GetCurrentValue(), handle);
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_USER_SCRIPTS_UPDATED,
content::Source<Profile>(profile_),
content::Details<base::SharedMemory>(handle));
diff --git a/chrome/browser/extensions/user_script_master_unittest.cc b/chrome/browser/extensions/user_script_master_unittest.cc
index dfd2eee..0334a0c 100644
--- a/chrome/browser/extensions/user_script_master_unittest.cc
+++ b/chrome/browser/extensions/user_script_master_unittest.cc
@@ -16,7 +16,7 @@
#include "chrome/test/base/testing_profile.h"
#include "content/browser/browser_thread.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -44,7 +44,7 @@ class UserScriptMasterTest : public testing::Test,
// Register for all user script notifications.
registrar_.Add(this, chrome::NOTIFICATION_USER_SCRIPTS_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// UserScriptMaster posts tasks to the file thread so make the current
// thread look like one.
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc
index be79271..efa0c95 100644
--- a/chrome/browser/external_tab_container_win.cc
+++ b/chrome/browser/external_tab_container_win.cc
@@ -43,7 +43,7 @@
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/provisional_load_details.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/page_zoom.h"
#include "content/common/view_messages.h"
#include "content/public/browser/native_web_keyboard_event.h"
@@ -218,7 +218,7 @@ bool ExternalTabContainer::Init(Profile* profile,
registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB,
content::Source<TabContents>(tab_contents_->tab_contents()));
registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_DELETED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
TabContentsObserver::Observe(tab_contents_->tab_contents());
@@ -259,7 +259,7 @@ void ExternalTabContainer::Uninitialize() {
if (GetWidget()->GetRootView())
GetWidget()->GetRootView()->RemoveAllChildViews(true);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTERNAL_TAB_CLOSED,
content::Source<NavigationController>(&tab_contents_->controller()),
content::Details<ExternalTabContainer>(this));
diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc
index 1740379..967d1a1 100644
--- a/chrome/browser/favicon/favicon_tab_helper.cc
+++ b/chrome/browser/favicon/favicon_tab_helper.cc
@@ -16,7 +16,7 @@
#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/webui/web_ui.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "ui/gfx/codec/png_codec.h"
#include "ui/gfx/image/image.h"
@@ -138,10 +138,10 @@ void FaviconTabHelper::StartDownload(int id, const GURL& url, int image_size) {
}
void FaviconTabHelper::NotifyFaviconUpdated() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_FAVICON_UPDATED,
content::Source<TabContents>(tab_contents()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
tab_contents()->NotifyNavigationStateChanged(TabContents::INVALIDATE_TAB);
}
diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc
index 29b05b8..714c99c 100644
--- a/chrome/browser/first_run/first_run_win.cc
+++ b/chrome/browser/first_run/first_run_win.cc
@@ -37,7 +37,7 @@
#include "chrome/installer/util/shell_util.h"
#include "chrome/installer/util/util_constants.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "google_update_idl.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -60,10 +60,10 @@ class FirstRunDelayedTasks : public content::NotificationObserver {
explicit FirstRunDelayedTasks(Tasks task) {
if (task == INSTALL_EXTENSIONS) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSIONS_READY,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
virtual void Observe(int type,
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
index 07b55ba..ac3788b 100644
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
@@ -25,7 +25,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/common/geolocation_messages.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
// ClosedDelegateTracker ------------------------------------------------------
@@ -57,7 +57,7 @@ class ClosedDelegateTracker : public content::NotificationObserver {
ClosedDelegateTracker::ClosedDelegateTracker() {
registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ClosedDelegateTracker::~ClosedDelegateTracker() {
diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc
index 9abdc36..c4da6a9 100644
--- a/chrome/browser/geolocation/geolocation_browsertest.cc
+++ b/chrome/browser/geolocation/geolocation_browsertest.cc
@@ -30,7 +30,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/geoposition.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "net/base/net_util.h"
#include "net/test/test_server.h"
@@ -51,7 +51,7 @@ class IFrameLoader : public content::NotificationObserver {
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(controller));
registrar_.Add(this, chrome::NOTIFICATION_DOM_OPERATION_RESPONSE,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
std::string script = base::StringPrintf(
"window.domAutomationController.setAutomationId(0);"
"window.domAutomationController.send(addIFrame(%d, \"%s\"));",
@@ -117,17 +117,17 @@ class GeolocationNotificationObserver : public content::NotificationObserver {
navigation_started_(false),
navigation_completed_(false) {
registrar_.Add(this, chrome::NOTIFICATION_DOM_OPERATION_RESPONSE,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
if (wait_for_infobar) {
registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
} else {
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_LOAD_START,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
}
diff --git a/chrome/browser/google/google_url_tracker.cc b/chrome/browser/google/google_url_tracker.cc
index 92df0ca..20e18b8 100644
--- a/chrome/browser/google/google_url_tracker.cc
+++ b/chrome/browser/google/google_url_tracker.cc
@@ -22,7 +22,7 @@
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "net/base/load_flags.h"
#include "net/base/net_util.h"
@@ -278,10 +278,10 @@ void GoogleURLTracker::AcceptGoogleURL(const GURL& new_google_url) {
google_url_.spec());
g_browser_process->local_state()->SetString(prefs::kLastPromptedGoogleURL,
google_url_.spec());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_GOOGLE_URL_UPDATED,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
need_to_prompt_ = false;
}
@@ -343,7 +343,7 @@ void GoogleURLTracker::SearchCommitted() {
// This notification will fire a bit later in the same call chain we're
// currently in.
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
}
@@ -353,7 +353,7 @@ void GoogleURLTracker::OnNavigationPending(
controller_ = content::Source<NavigationController>(source).ptr();
search_url_ = pending_url;
registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_PENDING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Start listening for the commit notification. We also need to listen for the
// tab close command since that means the load will never commit.
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
diff --git a/chrome/browser/google/google_url_tracker_unittest.cc b/chrome/browser/google/google_url_tracker_unittest.cc
index d83015e..d224c05 100644
--- a/chrome/browser/google/google_url_tracker_unittest.cc
+++ b/chrome/browser/google/google_url_tracker_unittest.cc
@@ -15,7 +15,7 @@
#include "chrome/test/base/testing_pref_service.h"
#include "content/browser/browser_thread.h"
#include "content/common/net/url_fetcher.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/test/test_url_fetcher_factory.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context_getter.h"
@@ -189,9 +189,9 @@ void GoogleURLTrackerTest::MockSearchDomainCheckResponse(
void GoogleURLTrackerTest::RequestServerCheck() {
if (!registrar_.IsRegistered(observer_.get(),
chrome::NOTIFICATION_GOOGLE_URL_UPDATED,
- NotificationService::AllSources())) {
+ content::NotificationService::AllSources())) {
registrar_.Add(observer_.get(), chrome::NOTIFICATION_GOOGLE_URL_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
GoogleURLTracker::RequestServerCheck();
MessageLoop::current()->RunAllPending();
@@ -231,7 +231,7 @@ void GoogleURLTrackerTest::SearchCommitted(const GURL& search_url) {
google_url_tracker->SearchCommitted();
if (google_url_tracker->registrar_.IsRegistered(google_url_tracker,
content::NOTIFICATION_NAV_ENTRY_PENDING,
- NotificationService::AllSources()))
+ content::NotificationService::AllSources()))
google_url_tracker->search_url_ = search_url;
}
diff --git a/chrome/browser/history/history.cc b/chrome/browser/history/history.cc
index 2aea96b..00b3450 100644
--- a/chrome/browser/history/history.cc
+++ b/chrome/browser/history/history.cc
@@ -49,7 +49,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
#include "content/browser/download/download_persistent_store_info.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -97,11 +97,10 @@ class HistoryService::BackendDelegate : public HistoryBackend::Delegate {
int type,
history::HistoryDetails* details) OVERRIDE {
// Send the notification on the history thread.
- if (NotificationService::current()) {
+ if (content::NotificationService::current()) {
content::Details<history::HistoryDetails> det(details);
- NotificationService::current()->Notify(type,
- content::Source<Profile>(profile_),
- det);
+ content::NotificationService::current()->Notify(
+ type, content::Source<Profile>(profile_), det);
}
// Send the notification to the history service on the main thread.
message_loop_->PostTask(
@@ -792,7 +791,7 @@ void HistoryService::BroadcastNotifications(
// this to the proper type.
content::Details<history::HistoryDetails> det(details_deleted);
- NotificationService::current()->Notify(type, source, det);
+ content::NotificationService::current()->Notify(type, source, det);
}
void HistoryService::LoadBackendIfNecessary() {
@@ -822,7 +821,7 @@ void HistoryService::OnDBLoaded(int backend_id) {
return;
}
backend_loaded_ = true;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_HISTORY_LOADED,
content::Source<Profile>(profile_),
content::Details<HistoryService>(this));
diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc
index 9c63dcb..8ea268c 100644
--- a/chrome/browser/history/history_tab_helper.cc
+++ b/chrome/browser/history/history_tab_helper.cc
@@ -13,8 +13,9 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/title_updated_details.h"
-#include "content/common/notification_service.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
HistoryTabHelper::HistoryTabHelper(TabContents* tab_contents)
diff --git a/chrome/browser/history/top_sites.cc b/chrome/browser/history/top_sites.cc
index b5d2d12..f85d1d8 100644
--- a/chrome/browser/history/top_sites.cc
+++ b/chrome/browser/history/top_sites.cc
@@ -32,7 +32,7 @@
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -148,13 +148,13 @@ TopSites::TopSites(Profile* profile)
if (!profile_)
return;
- if (NotificationService::current()) {
+ if (content::NotificationService::current()) {
registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URLS_DELETED,
content::Source<Profile>(profile_));
// Listen for any nav commits. We'll ignore those not related to this
// profile when we get the notification.
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
// We create update objects here to be sure that dictionaries are created
@@ -932,9 +932,10 @@ void TopSites::MoveStateToLoaded() {
ProcessPendingCallbacks(pending_callbacks, filtered_urls);
- NotificationService::current()->Notify(chrome::NOTIFICATION_TOP_SITES_LOADED,
- content::Source<Profile>(profile_),
- content::Details<TopSites>(this));
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_TOP_SITES_LOADED,
+ content::Source<Profile>(profile_),
+ content::Details<TopSites>(this));
}
void TopSites::ResetThreadSafeCache() {
@@ -951,10 +952,10 @@ void TopSites::ResetThreadSafeImageCache() {
}
void TopSites::NotifyTopSitesChanged() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TOP_SITES_CHANGED,
content::Source<TopSites>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void TopSites::RestartQueryForTopSitesTimer(base::TimeDelta delta) {
@@ -1025,7 +1026,7 @@ void TopSites::OnTopSitesAvailableFromHistory(
SetTopSites(pages);
// Used only in testing.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TOP_SITES_UPDATED,
content::Source<TopSites>(this),
content::Details<CancelableRequestProvider::Handle>(&handle));
diff --git a/chrome/browser/importer/profile_writer.cc b/chrome/browser/importer/profile_writer.cc
index ab414e5..4d1495b 100644
--- a/chrome/browser/importer/profile_writer.cc
+++ b/chrome/browser/importer/profile_writer.cc
@@ -21,7 +21,6 @@
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
namespace {
diff --git a/chrome/browser/infobars/infobar_tab_helper.cc b/chrome/browser/infobars/infobar_tab_helper.cc
index 02ef2eb..ac10be6 100644
--- a/chrome/browser/infobars/infobar_tab_helper.cc
+++ b/chrome/browser/infobars/infobar_tab_helper.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/tab_contents/insecure_content_infobar_delegate.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/render_messages.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/browser/tab_contents/tab_contents.h"
InfoBarTabHelper::InfoBarTabHelper(TabContents* tab_contents)
@@ -44,7 +44,7 @@ void InfoBarTabHelper::AddInfoBar(InfoBarDelegate* delegate) {
// TODO(pkasting): Consider removing InfoBarTabHelper arg from delegate
// constructors and instead using a setter from here.
infobars_.push_back(delegate);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED,
content::Source<InfoBarTabHelper>(this),
content::Details<InfoBarAddedDetails>(delegate));
@@ -81,7 +81,7 @@ void InfoBarTabHelper::ReplaceInfoBar(InfoBarDelegate* old_delegate,
old_delegate->clear_owner();
InfoBarReplacedDetails replaced_details(old_delegate, new_delegate);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REPLACED,
content::Source<InfoBarTabHelper>(this),
content::Details<InfoBarReplacedDetails>(&replaced_details));
@@ -110,7 +110,7 @@ void InfoBarTabHelper::RemoveInfoBarInternal(InfoBarDelegate* delegate,
infobar->clear_owner();
InfoBarRemovedDetails removed_details(infobar, animate);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
content::Source<InfoBarTabHelper>(this),
content::Details<InfoBarRemovedDetails>(&removed_details));
diff --git a/chrome/browser/instant/instant_browsertest.cc b/chrome/browser/instant/instant_browsertest.cc
index 84709cf..9d7cc67 100644
--- a/chrome/browser/instant/instant_browsertest.cc
+++ b/chrome/browser/instant/instant_browsertest.cc
@@ -30,6 +30,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#define EXPECT_STR_EQ(ascii, utf16) \
EXPECT_EQ(ASCIIToWide(ascii), UTF16ToWide(utf16))
@@ -118,7 +119,7 @@ class InstantTest : public InProcessBrowserTest {
ui_test_utils::WindowedNotificationObserver service_loaded_observer(
chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
if (!model->loaded()) {
model->Load();
service_loaded_observer.Wait();
@@ -191,7 +192,7 @@ class InstantTest : public InProcessBrowserTest {
ASSERT_NO_FATAL_FAILURE(FindLocationBar());
ui_test_utils::WindowedNotificationObserver controller_shown_observer(
chrome::NOTIFICATION_INSTANT_CONTROLLER_SHOWN,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
location_bar_->location_entry()->SetUserText(UTF8ToUTF16(text));
controller_shown_observer.Wait();
}
@@ -618,7 +619,7 @@ IN_PROC_BROWSER_TEST_F(InstantTest, MAYBE_SearchServerDoesntSupportInstant) {
ui_test_utils::WindowedNotificationObserver tab_closed_observer(
content::NOTIFICATION_TAB_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
location_bar_->location_entry()->SetUserText(ASCIIToUTF16("d"));
ASSERT_TRUE(browser()->instant());
@@ -664,7 +665,7 @@ IN_PROC_BROWSER_TEST_F(InstantTest,
ui_test_utils::WindowedNotificationObserver tab_closed_observer(
content::NOTIFICATION_TAB_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Now type in some search text.
location_bar_->location_entry()->SetUserText(ASCIIToUTF16("d"));
@@ -812,7 +813,7 @@ IN_PROC_BROWSER_TEST_F(InstantTest, MAYBE_DontCrashOnBlockedJS) {
ui_test_utils::WindowedNotificationObserver instant_support_observer(
chrome::NOTIFICATION_INSTANT_SUPPORT_DETERMINED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
EnableInstant();
ASSERT_NO_FATAL_FAILURE(SetupInstantProvider("search.html"));
@@ -874,7 +875,7 @@ IN_PROC_BROWSER_TEST_F(InstantTest, MAYBE_PreloadsInstant) {
ui_test_utils::WindowedNotificationObserver instant_support_observer(
chrome::NOTIFICATION_INSTANT_SUPPORT_DETERMINED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Focusing the omnibox should cause instant to be preloaded.
FindLocationBar();
@@ -950,7 +951,7 @@ IN_PROC_BROWSER_TEST_F(InstantFieldTrialHiddenTest, MAYBE_ExperimentEnabled) {
SetupInstantProvider("search.html");
ui_test_utils::WindowedNotificationObserver instant_support_observer(
chrome::NOTIFICATION_INSTANT_SUPPORT_DETERMINED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
SetupLocationBar();
WaitForPreviewToNavigate();
instant_support_observer.Wait();
@@ -982,7 +983,7 @@ IN_PROC_BROWSER_TEST_F(InstantFieldTrialHiddenTest, MAYBE_SearchToNonSearch) {
ASSERT_TRUE(test_server()->Start());
ui_test_utils::WindowedNotificationObserver instant_support_observer(
chrome::NOTIFICATION_INSTANT_SUPPORT_DETERMINED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Type in some search text.
SetupInstantProvider("search.html");
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index 70c8fc3..ffbfc3e 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -27,7 +27,7 @@
#include "chrome/common/pref_names.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#if defined(TOOLKIT_VIEWS)
#include "views/focus/focus_manager.h"
@@ -186,10 +186,10 @@ bool InstantController::Update(TabContentsWrapper* tab_contents,
UpdateLoader(template_url, match.destination_url, match.transition, user_text,
verbatim, suggested_text);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_INSTANT_CONTROLLER_UPDATED,
content::Source<InstantController>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
return true;
}
@@ -471,10 +471,10 @@ void InstantController::UpdateIsDisplayable() {
delegate_->HideInstant();
} else {
delegate_->ShowInstant(loader_->preview_contents());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_INSTANT_CONTROLLER_SHOWN,
content::Source<InstantController>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
}
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
index a593e02a..cfe62bb 100644
--- a/chrome/browser/instant/instant_loader.cc
+++ b/chrome/browser/instant/instant_loader.cc
@@ -43,7 +43,7 @@
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "net/http/http_util.h"
@@ -566,9 +566,9 @@ void InstantLoader::TabContentsDelegateImpl::OnInstantSupportDetermined(
return;
content::Details<const bool> details(&result);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_INSTANT_SUPPORT_DETERMINED,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
details);
if (result)
diff --git a/chrome/browser/intranet_redirect_detector.cc b/chrome/browser/intranet_redirect_detector.cc
index 75fab0e..253795c 100644
--- a/chrome/browser/intranet_redirect_detector.cc
+++ b/chrome/browser/intranet_redirect_detector.cc
@@ -12,7 +12,6 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/base/registry_controlled_domain.h"
diff --git a/chrome/browser/jumplist_win.cc b/chrome/browser/jumplist_win.cc
index 5f22169..b450034 100644
--- a/chrome/browser/jumplist_win.cc
+++ b/chrome/browser/jumplist_win.cc
@@ -36,7 +36,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "googleurl/src/gurl.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/memory_purger.cc b/chrome/browser/memory_purger.cc
index 6d3f561..805da81 100644
--- a/chrome/browser/memory_purger.cc
+++ b/chrome/browser/memory_purger.cc
@@ -17,7 +17,7 @@
#include "content/browser/renderer_host/backing_store_manager.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/proxy/proxy_resolver.h"
#include "net/proxy/proxy_service.h"
#include "net/url_request/url_request_context.h"
@@ -63,10 +63,10 @@ void PurgeMemoryIOHelper::PurgeMemoryOnIOThread() {
(*i)->GetURLRequestContext()->proxy_service()->PurgeMemory();
// The appcache and safe browsing services listen for this notification.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_PURGE_MEMORY,
content::Source<void>(NULL),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
// -----------------------------------------------------------------------------
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index 674c4af..6c88db5 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -179,7 +179,7 @@
#include "content/browser/plugin_service.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/common/child_process_info.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/webplugininfo.h"
@@ -459,35 +459,35 @@ void MetricsService::SetUpNotifications(
content::NotificationRegistrar* registrar,
content::NotificationObserver* observer) {
registrar->Add(observer, chrome::NOTIFICATION_BROWSER_OPENED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar->Add(observer, chrome::NOTIFICATION_BROWSER_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar->Add(observer, content::NOTIFICATION_USER_ACTION,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar->Add(observer, content::NOTIFICATION_TAB_PARENTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar->Add(observer, content::NOTIFICATION_TAB_CLOSING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar->Add(observer, content::NOTIFICATION_LOAD_START,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar->Add(observer, content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar->Add(observer, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar->Add(observer, content::NOTIFICATION_RENDERER_PROCESS_HANG,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar->Add(observer, content::NOTIFICATION_CHILD_PROCESS_HOST_CONNECTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar->Add(observer, content::NOTIFICATION_CHILD_INSTANCE_CREATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar->Add(observer, content::NOTIFICATION_CHILD_PROCESS_CRASHED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar->Add(observer, chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar->Add(observer, chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar->Add(observer, chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
void MetricsService::Observe(int type,
@@ -1201,7 +1201,7 @@ void MetricsService::LogLoadComplete(
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- if (details == NotificationService::NoDetails())
+ if (details == content::NotificationService::NoDetails())
return;
// TODO(jar): There is a bug causing this to be called too many times, and
diff --git a/chrome/browser/metrics/metrics_service_uitest.cc b/chrome/browser/metrics/metrics_service_uitest.cc
index 20fca2b..82684af 100644
--- a/chrome/browser/metrics/metrics_service_uitest.cc
+++ b/chrome/browser/metrics/metrics_service_uitest.cc
@@ -24,7 +24,6 @@
#include "chrome/test/automation/browser_proxy.h"
#include "chrome/test/automation/tab_proxy.h"
#include "chrome/test/ui/ui_test.h"
-#include "content/common/notification_service.h"
#include "net/base/net_util.h"
class MetricsServiceTest : public UITest {
diff --git a/chrome/browser/metrics/thread_watcher.cc b/chrome/browser/metrics/thread_watcher.cc
index 0812fab..7050bae 100644
--- a/chrome/browser/metrics/thread_watcher.cc
+++ b/chrome/browser/metrics/thread_watcher.cc
@@ -15,7 +15,6 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/logging_chrome.h"
-#include "content/common/notification_service.h"
#if defined(OS_WIN)
#include "base/win/windows_version.h"
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc
index 78ca969..90a4c75 100644
--- a/chrome/browser/net/chrome_url_request_context.cc
+++ b/chrome/browser/net/chrome_url_request_context.cc
@@ -16,8 +16,9 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
#include "content/public/common/content_client.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "net/base/cookie_store.h"
#include "net/http/http_util.h"
diff --git a/chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc b/chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc
index 48f160c..ec849cd 100644
--- a/chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc
+++ b/chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc
@@ -19,7 +19,8 @@
#include "chrome/common/net/http_return.h"
#include "chrome/test/base/testing_profile.h"
#include "content/common/net/url_fetcher.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/test/test_url_fetcher_factory.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_errors.h"
diff --git a/chrome/browser/net/gaia/token_service.cc b/chrome/browser/net/gaia/token_service.cc
index 6e546d3..c71b2ed 100644
--- a/chrome/browser/net/gaia/token_service.cc
+++ b/chrome/browser/net/gaia/token_service.cc
@@ -12,7 +12,7 @@
#include "chrome/common/net/gaia/gaia_auth_fetcher.h"
#include "chrome/common/net/gaia/gaia_constants.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "net/url_request/url_request_context_getter.h"
@@ -228,7 +228,7 @@ void TokenService::FireTokenAvailableNotification(
const std::string& auth_token) {
TokenAvailableDetails details(service, auth_token);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TOKEN_AVAILABLE,
content::Source<TokenService>(this),
content::Details<const TokenAvailableDetails>(&details));
@@ -239,7 +239,7 @@ void TokenService::FireTokenRequestFailedNotification(
const GoogleServiceAuthError& error) {
TokenRequestFailedDetails details(service, error);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TOKEN_REQUEST_FAILED,
content::Source<TokenService>(this),
content::Details<const TokenRequestFailedDetails>(&details));
@@ -315,10 +315,10 @@ void TokenService::OnWebDataServiceRequestDone(WebDataService::Handle h,
LoadTokensIntoMemory(token_result->GetValue(), &token_map_);
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TOKEN_LOADING_FINISHED,
content::Source<TokenService>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
// Load tokens from the db_token map into the in memory token map.
diff --git a/chrome/browser/net/http_server_properties_manager_unittest.cc b/chrome/browser/net/http_server_properties_manager_unittest.cc
index 6c23ac3..6dfecc8 100644
--- a/chrome/browser/net/http_server_properties_manager_unittest.cc
+++ b/chrome/browser/net/http_server_properties_manager_unittest.cc
@@ -10,7 +10,6 @@
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_pref_service.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
#include "googleurl/src/gurl.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/notifications/balloon_host.cc b/chrome/browser/notifications/balloon_host.cc
index 87115ed..897c29c 100644
--- a/chrome/browser/notifications/balloon_host.cc
+++ b/chrome/browser/notifications/balloon_host.cc
@@ -17,7 +17,7 @@
#include "content/browser/renderer_host/browser_render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/site_instance.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/renderer_preferences.h"
#include "content/common/view_messages.h"
#include "content/public/browser/notification_source.h"
@@ -91,9 +91,10 @@ void BalloonHost::RenderViewCreated(RenderViewHost* render_view_host) {
void BalloonHost::RenderViewReady(RenderViewHost* render_view_host) {
should_notify_on_disconnect_ = true;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_NOTIFY_BALLOON_CONNECTED,
- content::Source<BalloonHost>(this), NotificationService::NoDetails());
+ content::Source<BalloonHost>(this),
+ content::NotificationService::NoDetails());
}
void BalloonHost::RenderViewGone(RenderViewHost* render_view_host,
@@ -207,9 +208,10 @@ void BalloonHost::NotifyDisconnect() {
return;
should_notify_on_disconnect_ = false;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
- content::Source<BalloonHost>(this), NotificationService::NoDetails());
+ content::Source<BalloonHost>(this),
+ content::NotificationService::NoDetails());
}
bool BalloonHost::IsRenderViewReady() const {
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc
index ed20a54..ca4857d 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -33,7 +33,7 @@
#include "content/browser/site_instance.h"
#include "content/browser/worker_host/worker_process_host.h"
#include "content/common/desktop_notification_messages.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -415,10 +415,10 @@ string16 DesktopNotificationService::DisplayNameForOrigin(
}
void DesktopNotificationService::NotifySettingsChange() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_DESKTOP_NOTIFICATION_SETTINGS_CHANGED,
content::Source<DesktopNotificationService>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
WebKit::WebNotificationPresenter::Permission
diff --git a/chrome/browser/notifications/notification_ui_manager.cc b/chrome/browser/notifications/notification_ui_manager.cc
index b35d49a7..422ebc39 100644
--- a/chrome/browser/notifications/notification_ui_manager.cc
+++ b/chrome/browser/notifications/notification_ui_manager.cc
@@ -16,7 +16,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/site_instance.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace {
const int kUserStatePollingIntervalSeconds = 1;
@@ -51,7 +51,7 @@ NotificationUIManager::NotificationUIManager(PrefService* local_state)
: balloon_collection_(NULL),
is_user_active_(true) {
registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
position_pref_.Init(prefs::kDesktopNotificationPosition, local_state, this);
#if defined(OS_MACOSX)
InitFullScreenMonitor();
diff --git a/chrome/browser/oom_priority_manager.cc b/chrome/browser/oom_priority_manager.cc
index 89c4a1e..e663204 100644
--- a/chrome/browser/oom_priority_manager.cc
+++ b/chrome/browser/oom_priority_manager.cc
@@ -25,7 +25,7 @@
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/zygote_host_linux.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#if !defined(OS_CHROMEOS)
@@ -92,13 +92,13 @@ OomPriorityManager::OomPriorityManager()
: focused_tab_pid_(0) {
registrar_.Add(this,
content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this,
content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this,
content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
OomPriorityManager::~OomPriorityManager() {
diff --git a/chrome/browser/oom_priority_manager_browsertest.cc b/chrome/browser/oom_priority_manager_browsertest.cc
index 6cb3a74..04e6f1d 100644
--- a/chrome/browser/oom_priority_manager_browsertest.cc
+++ b/chrome/browser/oom_priority_manager_browsertest.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
@@ -20,21 +21,24 @@ IN_PROC_BROWSER_TEST_F(OomPriorityManagerTest, OomPriorityManagerBasics) {
using namespace ui_test_utils;
// Get three tabs open. Load asynchronously to speed up the test.
- WindowedNotificationObserver load1(content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ WindowedNotificationObserver load1(
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
OpenURLParams open1(GURL("chrome://about"), GURL(),
CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false);
browser()->OpenURL(open1);
- WindowedNotificationObserver load2(content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ WindowedNotificationObserver load2(
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
OpenURLParams open2(GURL("chrome://credits"), GURL(),
NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_TYPED,
false);
browser()->OpenURL(open2);
- WindowedNotificationObserver load3(content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ WindowedNotificationObserver load3(
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
OpenURLParams open3(GURL("chrome://terms"), GURL(),
NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_TYPED,
false);
@@ -71,8 +75,9 @@ IN_PROC_BROWSER_TEST_F(OomPriorityManagerTest, OomPriorityManagerBasics) {
EXPECT_FALSE(g_browser_process->oom_priority_manager()->DiscardTab());
// Select the first tab. It should reload.
- WindowedNotificationObserver reload1(content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ WindowedNotificationObserver reload1(
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->SelectNumberedTab(0);
reload1.Wait();
EXPECT_FALSE(browser()->IsTabDiscarded(0));
diff --git a/chrome/browser/password_manager/password_store_default.cc b/chrome/browser/password_manager/password_store_default.cc
index e35ce20..c30dd2f 100644
--- a/chrome/browser/password_manager/password_store_default.cc
+++ b/chrome/browser/password_manager/password_store_default.cc
@@ -16,7 +16,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
using webkit_glue::PasswordForm;
@@ -130,7 +130,7 @@ void PasswordStoreDefault::AddLoginImpl(const PasswordForm& form) {
if (login_db_->AddLogin(form)) {
PasswordStoreChangeList changes;
changes.push_back(PasswordStoreChange(PasswordStoreChange::ADD, form));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
content::Source<PasswordStore>(this),
content::Details<PasswordStoreChangeList>(&changes));
@@ -141,7 +141,7 @@ void PasswordStoreDefault::UpdateLoginImpl(const PasswordForm& form) {
if (login_db_->UpdateLogin(form, NULL)) {
PasswordStoreChangeList changes;
changes.push_back(PasswordStoreChange(PasswordStoreChange::UPDATE, form));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
content::Source<PasswordStore>(this),
content::Details<PasswordStoreChangeList>(&changes));
@@ -152,7 +152,7 @@ void PasswordStoreDefault::RemoveLoginImpl(const PasswordForm& form) {
if (login_db_->RemoveLogin(form)) {
PasswordStoreChangeList changes;
changes.push_back(PasswordStoreChange(PasswordStoreChange::REMOVE, form));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
content::Source<PasswordStore>(this),
content::Details<PasswordStoreChangeList>(&changes));
@@ -170,7 +170,7 @@ void PasswordStoreDefault::RemoveLoginsCreatedBetweenImpl(
changes.push_back(PasswordStoreChange(PasswordStoreChange::REMOVE,
**it));
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
content::Source<PasswordStore>(this),
content::Details<PasswordStoreChangeList>(&changes));
diff --git a/chrome/browser/password_manager/password_store_mac.cc b/chrome/browser/password_manager/password_store_mac.cc
index 81f1b55..43423cb 100644
--- a/chrome/browser/password_manager/password_store_mac.cc
+++ b/chrome/browser/password_manager/password_store_mac.cc
@@ -21,7 +21,7 @@
#include "chrome/browser/password_manager/login_database.h"
#include "chrome/browser/password_manager/password_store_change.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/browser/notification_service_impl.h"
using webkit_glue::PasswordForm;
@@ -775,7 +775,7 @@ void PasswordStoreMac::AddLoginImpl(const PasswordForm& form) {
if (login_metadata_db_->AddLogin(form)) {
PasswordStoreChangeList changes;
changes.push_back(PasswordStoreChange(PasswordStoreChange::ADD, form));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
content::Source<PasswordStore>(this),
content::Details<PasswordStoreChangeList>(&changes));
@@ -810,7 +810,7 @@ void PasswordStoreMac::UpdateLoginImpl(const PasswordForm& form) {
form));
}
if (!changes.empty()) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
content::Source<PasswordStore>(this),
content::Details<PasswordStoreChangeList>(&changes));
@@ -841,7 +841,7 @@ void PasswordStoreMac::RemoveLoginImpl(const PasswordForm& form) {
PasswordStoreChangeList changes;
changes.push_back(PasswordStoreChange(PasswordStoreChange::REMOVE, form));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
content::Source<PasswordStore>(this),
content::Details<PasswordStoreChangeList>(&changes));
@@ -875,7 +875,7 @@ void PasswordStoreMac::RemoveLoginsCreatedBetweenImpl(
changes.push_back(PasswordStoreChange(PasswordStoreChange::REMOVE,
**it));
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
content::Source<PasswordStore>(this),
content::Details<PasswordStoreChangeList>(&changes));
@@ -1013,5 +1013,5 @@ void PasswordStoreMac::RemoveKeychainForms(
}
void PasswordStoreMac::CreateNotificationService() {
- notification_service_.reset(new NotificationService);
+ notification_service_.reset(new NotificationServiceImpl);
}
diff --git a/chrome/browser/password_manager/password_store_mac.h b/chrome/browser/password_manager/password_store_mac.h
index 3ee8339..cfd7297 100644
--- a/chrome/browser/password_manager/password_store_mac.h
+++ b/chrome/browser/password_manager/password_store_mac.h
@@ -15,7 +15,10 @@
#include "chrome/browser/password_manager/password_store.h"
class MacKeychain;
+
+namespace content {
class NotificationService;
+}
// Implements PasswordStore on top of the OS X Keychain, with an internal
// database for extra metadata. For an overview of the interactions with the
@@ -89,7 +92,7 @@ class PasswordStoreMac : public PasswordStore {
// Since we aren't running on a well-known thread but still want to send out
// notifications, we need to run our own service.
- scoped_ptr<NotificationService> notification_service_;
+ scoped_ptr<content::NotificationService> notification_service_;
DISALLOW_COPY_AND_ASSIGN(PasswordStoreMac);
};
diff --git a/chrome/browser/password_manager/password_store_x.cc b/chrome/browser/password_manager/password_store_x.cc
index f0e2319..c011ade 100644
--- a/chrome/browser/password_manager/password_store_x.cc
+++ b/chrome/browser/password_manager/password_store_x.cc
@@ -16,7 +16,7 @@
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
using std::vector;
using webkit_glue::PasswordForm;
@@ -37,7 +37,7 @@ void PasswordStoreX::AddLoginImpl(const PasswordForm& form) {
if (use_native_backend() && backend_->AddLogin(form)) {
PasswordStoreChangeList changes;
changes.push_back(PasswordStoreChange(PasswordStoreChange::ADD, form));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
content::Source<PasswordStore>(this),
content::Details<PasswordStoreChangeList>(&changes));
@@ -52,7 +52,7 @@ void PasswordStoreX::UpdateLoginImpl(const PasswordForm& form) {
if (use_native_backend() && backend_->UpdateLogin(form)) {
PasswordStoreChangeList changes;
changes.push_back(PasswordStoreChange(PasswordStoreChange::UPDATE, form));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
content::Source<PasswordStore>(this),
content::Details<PasswordStoreChangeList>(&changes));
@@ -67,7 +67,7 @@ void PasswordStoreX::RemoveLoginImpl(const PasswordForm& form) {
if (use_native_backend() && backend_->RemoveLogin(form)) {
PasswordStoreChangeList changes;
changes.push_back(PasswordStoreChange(PasswordStoreChange::REMOVE, form));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
content::Source<PasswordStore>(this),
content::Details<PasswordStoreChangeList>(&changes));
@@ -91,7 +91,7 @@ void PasswordStoreX::RemoveLoginsCreatedBetweenImpl(
changes.push_back(PasswordStoreChange(PasswordStoreChange::REMOVE,
**it));
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
content::Source<PasswordStore>(this),
content::Details<PasswordStoreChangeList>(&changes));
diff --git a/chrome/browser/plugin_data_remover_helper.cc b/chrome/browser/plugin_data_remover_helper.cc
index 8bc80e1..e922cc3 100644
--- a/chrome/browser/plugin_data_remover_helper.cc
+++ b/chrome/browser/plugin_data_remover_helper.cc
@@ -14,7 +14,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/browser_thread.h"
#include "content/browser/plugin_service.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
PluginDataRemoverHelper::PluginDataRemoverHelper()
: profile_(NULL),
diff --git a/chrome/browser/plugin_prefs.cc b/chrome/browser/plugin_prefs.cc
index 5e76865..27c30c2 100644
--- a/chrome/browser/plugin_prefs.cc
+++ b/chrome/browser/plugin_prefs.cc
@@ -30,7 +30,7 @@
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
#include "content/browser/plugin_service.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "webkit/plugins/npapi/plugin_group.h"
#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/webplugininfo.h"
@@ -540,8 +540,8 @@ void PluginPrefs::OnUpdatePreferences(
void PluginPrefs::NotifyPluginStatusChanged() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED,
content::Source<Profile>(profile_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
diff --git a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
index b789f6a..4e8e360 100644
--- a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
+++ b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
@@ -10,7 +10,6 @@
#include "chrome/browser/prefs/proxy_config_dictionary.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_store_observer_mock.h"
-#include "content/common/notification_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/policy/url_blacklist_manager_unittest.cc b/chrome/browser/policy/url_blacklist_manager_unittest.cc
index 80d9e7f..c3fc68e 100644
--- a/chrome/browser/policy/url_blacklist_manager_unittest.cc
+++ b/chrome/browser/policy/url_blacklist_manager_unittest.cc
@@ -11,7 +11,6 @@
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_pref_service.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
#include "googleurl/src/gurl.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/prefs/pref_model_associator.cc b/chrome/browser/prefs/pref_model_associator.cc
index 1928331..40f2dff 100644
--- a/chrome/browser/prefs/pref_model_associator.cc
+++ b/chrome/browser/prefs/pref_model_associator.cc
@@ -15,7 +15,6 @@
#include "chrome/browser/sync/protocol/preference_specifics.pb.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
using syncable::PREFERENCES;
diff --git a/chrome/browser/prefs/pref_notifier_impl.cc b/chrome/browser/prefs/pref_notifier_impl.cc
index 08a774f..ec5352b 100644
--- a/chrome/browser/prefs/pref_notifier_impl.cc
+++ b/chrome/browser/prefs/pref_notifier_impl.cc
@@ -8,7 +8,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/notification_observer.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
PrefNotifierImpl::PrefNotifierImpl(PrefService* service)
: pref_service_(service) {
@@ -78,7 +78,7 @@ void PrefNotifierImpl::OnPreferenceChanged(const std::string& path) {
void PrefNotifierImpl::OnInitializationCompleted(bool succeeded) {
DCHECK(CalledOnValidThread());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PREF_INITIALIZATION_COMPLETED,
content::Source<PrefService>(pref_service_),
content::Details<bool>(&succeeded));
diff --git a/chrome/browser/prefs/pref_notifier_impl_unittest.cc b/chrome/browser/prefs/pref_notifier_impl_unittest.cc
index 8eb017c..bf991e2 100644
--- a/chrome/browser/prefs/pref_notifier_impl_unittest.cc
+++ b/chrome/browser/prefs/pref_notifier_impl_unittest.cc
@@ -8,8 +8,9 @@
#include "chrome/browser/prefs/pref_value_store.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/testing_pref_service.h"
+#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "content/test/notification_observer_mock.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/prefs/pref_service.cc b/chrome/browser/prefs/pref_service.cc
index 72b8452..3a48b43 100644
--- a/chrome/browser/prefs/pref_service.cc
+++ b/chrome/browser/prefs/pref_service.cc
@@ -31,7 +31,6 @@
#include "chrome/browser/ui/profile_error_dialog.h"
#include "chrome/common/json_pref_store.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc
index 020424e..2d41228 100644
--- a/chrome/browser/prerender/prerender_browsertest.cc
+++ b/chrome/browser/prerender/prerender_browsertest.cc
@@ -36,7 +36,7 @@
#include "content/browser/debugger/devtools_manager.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/common/url_constants.h"
#include "grit/generated_resources.h"
#include "net/base/mock_host_resolver.h"
@@ -528,7 +528,7 @@ class PrerenderBrowserTest : public InProcessBrowserTest {
void ClickToNextPageAfterPrerender(Browser* browser) {
ui_test_utils::WindowedNotificationObserver new_page_observer(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
RenderViewHost* render_view_host =
browser->GetSelectedTabContents()->render_view_host();
render_view_host->ExecuteJavascriptInWebFrame(
@@ -548,7 +548,7 @@ class PrerenderBrowserTest : public InProcessBrowserTest {
void GoBackToPrerender(Browser* browser) {
ui_test_utils::WindowedNotificationObserver back_nav_observer(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser->GoBack(CURRENT_TAB);
back_nav_observer.Wait();
bool original_prerender_page = false;
diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc
index 0c16105..b1a8414 100644
--- a/chrome/browser/prerender/prerender_contents.cc
+++ b/chrome/browser/prerender/prerender_contents.cc
@@ -28,7 +28,7 @@
#include "content/browser/renderer_host/resource_request_details.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/view_messages.h"
#include "ui/gfx/rect.h"
@@ -292,7 +292,7 @@ void PrerenderContents::StartPrerendering(
// Close ourselves when the application is shutting down.
notification_registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Register for our parent profile to shutdown, so we can shut ourselves down
// as well (should only be called for OTR profiles, as we should receive
diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc
index 4acfdac..f7264ce 100644
--- a/chrome/browser/prerender/prerender_manager.cc
+++ b/chrome/browser/prerender/prerender_manager.cc
@@ -43,7 +43,7 @@
#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
namespace prerender {
diff --git a/chrome/browser/printing/print_dialog_cloud_uitest.cc b/chrome/browser/printing/print_dialog_cloud_uitest.cc
index bb6f8f5..83c278e 100644
--- a/chrome/browser/printing/print_dialog_cloud_uitest.cc
+++ b/chrome/browser/printing/print_dialog_cloud_uitest.cc
@@ -24,6 +24,7 @@
#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "net/url_request/url_request_filter.h"
#include "net/url_request/url_request_test_job.h"
@@ -247,7 +248,8 @@ IN_PROC_BROWSER_TEST_F(PrintDialogCloudTest, MAYBE_HandlersRegistered) {
// Close the dialog before finishing the test.
ui_test_utils::WindowedNotificationObserver signal(
- content::NOTIFICATION_TAB_CLOSED, NotificationService::AllSources());
+ content::NOTIFICATION_TAB_CLOSED,
+ content::NotificationService::AllSources());
EXPECT_TRUE(ui_test_utils::SendKeyPressSync(browser(), ui::VKEY_ESCAPE,
false, false, false, false));
signal.Wait();
diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc
index 9796f78..bf5b80d 100644
--- a/chrome/browser/printing/print_job.cc
+++ b/chrome/browser/printing/print_job.cc
@@ -9,7 +9,7 @@
#include "base/timer.h"
#include "chrome/browser/printing/print_job_worker.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "printing/printed_document.h"
#include "printing/printed_page.h"
@@ -124,7 +124,7 @@ void PrintJob::StartPrinting() {
// Tell everyone!
scoped_refptr<JobEventDetails> details(
new JobEventDetails(JobEventDetails::NEW_DOC, document_.get(), NULL));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PRINT_JOB_EVENT,
content::Source<PrintJob>(this),
content::Details<JobEventDetails>(details.get()));
@@ -166,7 +166,7 @@ void PrintJob::Cancel() {
// Make sure a Cancel() is broadcast.
scoped_refptr<JobEventDetails> details(
new JobEventDetails(JobEventDetails::FAILED, NULL, NULL));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PRINT_JOB_EVENT,
content::Source<PrintJob>(this),
content::Details<JobEventDetails>(details.get()));
@@ -273,7 +273,7 @@ void PrintJob::OnDocumentDone() {
scoped_refptr<JobEventDetails> details(
new JobEventDetails(JobEventDetails::JOB_DONE, document_.get(), NULL));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PRINT_JOB_EVENT,
content::Source<PrintJob>(this),
content::Details<JobEventDetails>(details.get()));
diff --git a/chrome/browser/printing/print_job_manager.cc b/chrome/browser/printing/print_job_manager.cc
index dad6ad7..7f4d105 100644
--- a/chrome/browser/printing/print_job_manager.cc
+++ b/chrome/browser/printing/print_job_manager.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/printing/printer_query.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "printing/printed_document.h"
#include "printing/printed_page.h"
@@ -18,7 +18,7 @@ namespace printing {
PrintJobManager::PrintJobManager() {
registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
PrintJobManager::~PrintJobManager() {
diff --git a/chrome/browser/printing/print_job_unittest.cc b/chrome/browser/printing/print_job_unittest.cc
index 54d6017..3fb56c9 100644
--- a/chrome/browser/printing/print_job_unittest.cc
+++ b/chrome/browser/printing/print_job_unittest.cc
@@ -8,7 +8,7 @@
#include "chrome/browser/printing/print_job_worker.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "printing/printed_pages_source.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -101,7 +101,7 @@ TEST_F(PrintJobTest, MAYBE_SimplePrint) {
content::NotificationRegistrar registrar_;
TestPrintNotifObserv observ;
registrar_.Add(&observ, content::NOTIFICATION_ALL,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
volatile bool check = false;
scoped_refptr<printing::PrintJob> job(new TestPrintJob(&check));
EXPECT_EQ(MessageLoop::current(), job->message_loop());
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
index 6b4925a..7616aea6 100644
--- a/chrome/browser/printing/print_job_worker.cc
+++ b/chrome/browser/printing/print_job_worker.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/printing/print_job.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "printing/print_job_constants.h"
#include "printing/printed_document.h"
#include "printing/printed_page.h"
@@ -38,7 +38,7 @@ class PrintJobWorker::NotificationTask : public Task {
virtual void Run() {
// Send the notification in the right thread.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PRINT_JOB_EVENT,
// We know that is is a PrintJob object in this circumstance.
content::Source<PrintJob>(static_cast<PrintJob*>(print_job_.get())),
diff --git a/chrome/browser/printing/print_preview_tab_controller_unittest.cc b/chrome/browser/printing/print_preview_tab_controller_unittest.cc
index 8b45f65..89bcedc9 100644
--- a/chrome/browser/printing/print_preview_tab_controller_unittest.cc
+++ b/chrome/browser/printing/print_preview_tab_controller_unittest.cc
@@ -12,7 +12,7 @@
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/common/url_constants.h"
@@ -99,7 +99,7 @@ TEST_F(PrintPreviewTabControllerUnitTest, TitleAfterReload) {
content::LoadCommittedDetails details;
details.type = content::NAVIGATION_TYPE_SAME_PAGE;
details.entry = entry.get();
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
content::Source<NavigationController>(&preview_tab->controller()),
content::Details<content::LoadCommittedDetails>(&details));
diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc
index 45f0700..f6498b8 100644
--- a/chrome/browser/printing/print_view_manager.cc
+++ b/chrome/browser/printing/print_view_manager.cc
@@ -19,7 +19,7 @@
#include "chrome/common/print_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
@@ -236,10 +236,10 @@ void PrintViewManager::OnDidPrintPage(
void PrintViewManager::OnPrintingFailed(int cookie) {
ReleasePrinterQuery(cookie);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PRINT_JOB_RELEASED,
content::Source<TabContents>(tab_contents()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
bool PrintViewManager::OnMessageReceived(const IPC::Message& message) {
@@ -278,10 +278,10 @@ void PrintViewManager::OnNotifyPrintJobEvent(
case JobEventDetails::FAILED: {
TerminatePrintJob(true);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PRINT_JOB_RELEASED,
content::Source<TabContentsWrapper>(tab_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
break;
}
case JobEventDetails::USER_INIT_DONE:
@@ -308,10 +308,10 @@ void PrintViewManager::OnNotifyPrintJobEvent(
printing_succeeded_ = true;
ReleasePrintJob();
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PRINT_JOB_RELEASED,
content::Source<TabContentsWrapper>(tab_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
break;
}
default: {
diff --git a/chrome/browser/profiles/avatar_menu_model.cc b/chrome/browser/profiles/avatar_menu_model.cc
index fd54aa5..e389eb6 100644
--- a/chrome/browser/profiles/avatar_menu_model.cc
+++ b/chrome/browser/profiles/avatar_menu_model.cc
@@ -17,7 +17,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/url_constants.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image.h"
@@ -53,7 +53,7 @@ AvatarMenuModel::AvatarMenuModel(ProfileInfoInterface* profile_cache,
// Register this as an observer of the info cache.
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Build the initial menu.
RebuildMenu();
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index 61f21a1..4db0ebe 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -52,7 +52,7 @@
#include "content/browser/in_process_webkit/webkit_context.h"
#include "content/browser/ssl/ssl_host_state.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/base/transport_security_state.h"
#include "net/http/http_server_properties.h"
#include "webkit/database/database_tracker.h"
@@ -117,9 +117,9 @@ void OffTheRecordProfileImpl::Init() {
}
OffTheRecordProfileImpl::~OffTheRecordProfileImpl() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_DESTROYED, content::Source<Profile>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext(
&GetResourceContext());
diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc
index 033d68a..b55c59c 100644
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -54,7 +54,6 @@
#include "content/browser/ssl/ssl_host_state.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/webui/web_ui.h"
-#include "content/common/notification_service.h"
#include "grit/locale_settings.h"
#include "ui/base/resource/resource_bundle.h"
#include "webkit/database/database_tracker.h"
diff --git a/chrome/browser/profiles/profile_dependency_manager.cc b/chrome/browser/profiles/profile_dependency_manager.cc
index 212fd81..914006b 100644
--- a/chrome/browser/profiles/profile_dependency_manager.cc
+++ b/chrome/browser/profiles/profile_dependency_manager.cc
@@ -20,7 +20,6 @@
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/sessions/session_service_factory.h"
#include "chrome/browser/sessions/tab_restore_service_factory.h"
-#include "content/common/notification_service.h"
class Profile;
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index c50855e..d37dcd2 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -101,7 +101,7 @@
#include "content/browser/speech/speech_input_manager.h"
#include "content/browser/ssl/ssl_host_state.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/browser_resources.h"
#include "grit/locale_settings.h"
#include "net/base/transport_security_state.h"
@@ -426,10 +426,10 @@ void ProfileImpl::DoFinalInit() {
if (delegate_)
delegate_->OnProfileCreated(this, true);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_CREATED,
content::Source<Profile>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void ProfileImpl::InitExtensions(bool extensions_enabled) {
@@ -631,10 +631,10 @@ void ProfileImpl::set_last_selected_directory(const FilePath& path) {
}
ProfileImpl::~ProfileImpl() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_DESTROYED,
content::Source<Profile>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
if (appcache_service_ && clear_local_state_on_exit_) {
BrowserThread::PostTask(
@@ -752,10 +752,10 @@ Profile* ProfileImpl::GetOffTheRecordProfile() {
scoped_ptr<Profile> p(CreateOffTheRecordProfile());
off_the_record_profile_.swap(p);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_CREATED,
content::Source<Profile>(off_the_record_profile_.get()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
return off_the_record_profile_.get();
}
diff --git a/chrome/browser/profiles/profile_info_cache.cc b/chrome/browser/profiles/profile_info_cache.cc
index 9a85788..988f0ff 100644
--- a/chrome/browser/profiles/profile_info_cache.cc
+++ b/chrome/browser/profiles/profile_info_cache.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -127,10 +127,10 @@ void ProfileInfoCache::AddProfileToCache(const FilePath& profile_path,
sorted_keys_.insert(FindPositionForProfile(key, name), key);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
}
void ProfileInfoCache::DeleteProfileFromCache(const FilePath& profile_path) {
@@ -141,10 +141,10 @@ void ProfileInfoCache::DeleteProfileFromCache(const FilePath& profile_path) {
cache->Remove(key, NULL);
sorted_keys_.erase(std::find(sorted_keys_.begin(), sorted_keys_.end(), key));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
}
size_t ProfileInfoCache::GetNumberOfProfiles() const {
@@ -227,10 +227,10 @@ void ProfileInfoCache::SetNameOfProfileAtIndex(size_t index,
sorted_keys_.erase(key_it);
sorted_keys_.insert(FindPositionForProfile(key, name), key);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
}
void ProfileInfoCache::SetUserNameOfProfileAtIndex(size_t index,
@@ -388,10 +388,10 @@ void ProfileInfoCache::SetInfoForProfileAtIndex(size_t index,
DictionaryValue* cache = update.Get();
cache->Set(sorted_keys_[index], info);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
}
std::string ProfileInfoCache::CacheKeyFromProfilePath(
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index 7686070..7f138d0 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -47,7 +47,7 @@
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "content/browser/resource_context.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/base/origin_bound_cert_service.h"
#include "net/http/http_transaction_factory.h"
#include "net/http/http_util.h"
@@ -103,7 +103,7 @@ class ChromeCookieMonsterDelegate : public net::CookieMonster::Delegate {
Profile* profile = profile_getter_.Run();
if (profile) {
ChromeCookieDetails cookie_details(&cookie, removed, cause);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_COOKIE_CHANGED,
content::Source<Profile>(profile),
content::Details<ChromeCookieDetails>(&cookie_details));
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 7ee8b3f..42d9b51 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -34,7 +34,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "net/http/http_transaction_factory.h"
#include "net/url_request/url_request_context.h"
@@ -205,7 +205,7 @@ ProfileManager::ProfileManager(const FilePath& user_data_dir)
registrar_.Add(
this,
chrome::NOTIFICATION_LOGIN_USER_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
#endif
}
@@ -441,10 +441,10 @@ void ProfileManager::SetWillImport() {
void ProfileManager::OnImportFinished(Profile* profile) {
will_import_ = false;
DCHECK(profile);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_IMPORT_FINISHED,
content::Source<Profile>(profile),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void ProfileManager::OnBrowserAdded(const Browser* browser) {}
diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc
index 4e23a73..76cd7e8 100644
--- a/chrome/browser/profiles/profile_manager_unittest.cc
+++ b/chrome/browser/profiles/profile_manager_unittest.cc
@@ -27,7 +27,7 @@
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_pref_service.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -139,8 +139,8 @@ TEST_F(ProfileManagerTest, LoggedInProfileDir) {
profile_manager_->GetInitialProfileDir().value());
profile_manager_->Observe(chrome::NOTIFICATION_LOGIN_USER_CHANGED,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
FilePath expected_logged_in(profile_dir);
EXPECT_EQ(expected_logged_in.value(),
profile_manager_->GetInitialProfileDir().value());
diff --git a/chrome/browser/remoting/firewall_traversal_observer.cc b/chrome/browser/remoting/firewall_traversal_observer.cc
index 4e55e35..ebdf850 100644
--- a/chrome/browser/remoting/firewall_traversal_observer.cc
+++ b/chrome/browser/remoting/firewall_traversal_observer.cc
@@ -12,7 +12,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/common/view_messages.h"
#include "ipc/ipc_message_macros.h"
diff --git a/chrome/browser/remoting/firewall_traversal_observer_unittest.cc b/chrome/browser/remoting/firewall_traversal_observer_unittest.cc
index 5b91c73..0b4103b 100644
--- a/chrome/browser/remoting/firewall_traversal_observer_unittest.cc
+++ b/chrome/browser/remoting/firewall_traversal_observer_unittest.cc
@@ -12,7 +12,6 @@
#include "chrome/test/base/testing_profile.h"
#include "content/browser/browser_thread.h"
#include "content/browser/tab_contents/test_tab_contents.h"
-#include "content/common/notification_service.h"
#include "content/common/view_messages.h"
#include "ipc/ipc_message.h"
diff --git a/chrome/browser/renderer_host/chrome_render_view_host_observer.cc b/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
index 9737c58..941601e 100644
--- a/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
+++ b/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
@@ -19,7 +19,7 @@
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/site_instance.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/view_messages.h"
ChromeRenderViewHostObserver::ChromeRenderViewHostObserver(
@@ -146,15 +146,15 @@ const Extension* ChromeRenderViewHostObserver::GetExtension() {
void ChromeRenderViewHostObserver::OnDomOperationResponse(
const std::string& json_string, int automation_id) {
DomOperationNotificationDetails details(json_string, automation_id);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_DOM_OPERATION_RESPONSE,
content::Source<RenderViewHost>(render_view_host()),
content::Details<DomOperationNotificationDetails>(&details));
}
void ChromeRenderViewHostObserver::OnFocusedEditableNodeTouched() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_FOCUSED_EDITABLE_NODE_TOUCHED,
content::Source<RenderViewHost>(render_view_host()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
index 494e975..3b76e42 100644
--- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
@@ -31,7 +31,7 @@
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "content/browser/renderer_host/resource_message_filter.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/resource_messages.h"
#include "net/base/load_flags.h"
@@ -79,10 +79,10 @@ void NotifyDownloadInitiatedOnUI(int render_process_id, int render_view_id) {
if (!rvh)
return;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_DOWNLOAD_INITIATED,
content::Source<RenderViewHost>(rvh),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
} // end namespace
diff --git a/chrome/browser/renderer_host/render_widget_host_view_views.cc b/chrome/browser/renderer_host/render_widget_host_view_views.cc
index e5d915c..75e3bb2 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_views.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_views.cc
@@ -20,7 +20,7 @@
#include "chrome/common/render_messages.h"
#include "content/browser/renderer_host/backing_store_skia.h"
#include "content/browser/renderer_host/render_widget_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/result_codes.h"
#include "content/common/view_messages.h"
#include "grit/ui_strings.h"
@@ -130,7 +130,7 @@ RenderWidgetHostViewViews::RenderWidgetHostViewViews(RenderWidgetHost* host)
SetPaintToLayer(true);
registrar_.Add(this,
chrome::NOTIFICATION_KEYBOARD_VISIBLE_BOUNDS_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
#endif
}
diff --git a/chrome/browser/renderer_host/web_cache_manager.cc b/chrome/browser/renderer_host/web_cache_manager.cc
index 07ae824..0ec33fd 100644
--- a/chrome/browser/renderer_host/web_cache_manager.cc
+++ b/chrome/browser/renderer_host/web_cache_manager.cc
@@ -19,7 +19,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
#include "content/browser/renderer_host/browser_render_process_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
using base::Time;
using base::TimeDelta;
@@ -65,9 +65,9 @@ WebCacheManager::WebCacheManager()
: global_size_limit_(GetDefaultGlobalSizeLimit()),
ALLOW_THIS_IN_INITIALIZER_LIST(revise_allocation_factory_(this)) {
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
WebCacheManager::~WebCacheManager() {
diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc
index 7af1767..dcde8bb 100644
--- a/chrome/browser/rlz/rlz.cc
+++ b/chrome/browser/rlz/rlz.cc
@@ -33,7 +33,7 @@
#include "chrome/installer/util/google_update_settings.h"
#include "content/browser/browser_thread.h"
#include "content/browser/tab_contents/navigation_entry.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace {
@@ -179,16 +179,16 @@ bool RLZTracker::Init(bool first_run, int delay, bool google_default_search,
// Register for notifications from the omnibox so that we can record when
// the user performs a first search.
registrar_.Add(this, chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// If instant is enabled we'll start searching as soon as the user starts
// typing in the omnibox (which triggers INSTANT_CONTROLLER_UPDATED).
registrar_.Add(this, chrome::NOTIFICATION_INSTANT_CONTROLLER_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Register for notifications from navigations, to see if the user has used
// the home page.
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ScheduleDelayedInit(delay);
@@ -291,9 +291,9 @@ void RLZTracker::Observe(int type,
call_record = true;
registrar_.Remove(this, chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Remove(this, chrome::NOTIFICATION_INSTANT_CONTROLLER_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
break;
case content::NOTIFICATION_NAV_ENTRY_PENDING: {
const NavigationEntry* entry =
@@ -306,7 +306,7 @@ void RLZTracker::Observe(int type,
call_record = true;
registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_PENDING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
break;
}
diff --git a/chrome/browser/rlz/rlz_unittest.cc b/chrome/browser/rlz/rlz_unittest.cc
index 0308c06..e89d6a0 100644
--- a/chrome/browser/rlz/rlz_unittest.cc
+++ b/chrome/browser/rlz/rlz_unittest.cc
@@ -17,7 +17,7 @@
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/google_update_constants.h"
#include "content/browser/tab_contents/navigation_entry.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -200,7 +200,7 @@ void RlzLibTest::TearDown() {
void RlzLibTest::SimulateOmniboxUsage() {
tracker_.Observe(chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
content::Details<AutocompleteLog>(NULL));
}
@@ -208,7 +208,7 @@ void RlzLibTest::SimulateHomepageUsage() {
NavigationEntry entry(NULL, 0, GURL(), GURL(), string16(),
content::PAGE_TRANSITION_HOME_PAGE, false);
tracker_.Observe(content::NOTIFICATION_NAV_ENTRY_PENDING,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
content::Details<NavigationEntry>(&entry));
}
@@ -543,9 +543,9 @@ TEST_F(RlzLibTest, ObserveHandlesBadArgs) {
NavigationEntry entry(NULL, 0, GURL(), GURL(), string16(),
content::PAGE_TRANSITION_LINK, false);
tracker_.Observe(content::NOTIFICATION_NAV_ENTRY_PENDING,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
content::Details<NavigationEntry>(NULL));
tracker_.Observe(content::NOTIFICATION_NAV_ENTRY_PENDING,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
content::Details<NavigationEntry>(&entry));
}
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc
index 872dfd2..3de105a 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
@@ -29,7 +29,8 @@
#include "content/browser/renderer_host/resource_request_details.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/common/view_messages.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chrome/browser/safe_browsing/client_side_detection_service.cc
index 6f05e59..322a004 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_service.cc
@@ -25,7 +25,7 @@
#include "chrome/common/safe_browsing/safebrowsing_messages.h"
#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/render_process_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "crypto/sha2.h"
#include "googleurl/src/gurl.h"
@@ -70,7 +70,7 @@ ClientSideDetectionService::ClientSideDetectionService(
ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)),
request_context_getter_(request_context_getter) {
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
ClientSideDetectionService::~ClientSideDetectionService() {
diff --git a/chrome/browser/safe_browsing/malware_details_history.cc b/chrome/browser/safe_browsing/malware_details_history.cc
index de3444e..6cfd1db 100644
--- a/chrome/browser/safe_browsing/malware_details_history.cc
+++ b/chrome/browser/safe_browsing/malware_details_history.cc
@@ -15,7 +15,6 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index 1b8988a..914a9fe 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -32,7 +32,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "net/base/registry_controlled_domain.h"
#include "net/url_request/url_request_context_getter.h"
@@ -210,9 +210,9 @@ void SafeBrowsingService::Initialize() {
// Track profile creation and destruction.
prefs_registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CREATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
prefs_registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
void SafeBrowsingService::ShutDown() {
@@ -541,7 +541,7 @@ void SafeBrowsingService::OnIOInitialize(
enabled_ = true;
registrar_.Add(this, content::NOTIFICATION_PURGE_MEMORY,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
MakeDatabaseAvailable();
diff --git a/chrome/browser/search_engines/search_provider_install_data.cc b/chrome/browser/search_engines/search_provider_install_data.cc
index ead0a10..4682b2a 100644
--- a/chrome/browser/search_engines/search_provider_install_data.cc
+++ b/chrome/browser/search_engines/search_provider_install_data.cc
@@ -20,7 +20,7 @@
#include "content/browser/browser_thread.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
typedef SearchHostToURLsMap::TemplateURLSet TemplateURLSet;
@@ -127,7 +127,7 @@ GoogleURLObserver::GoogleURLObserver(
: change_notifier_(change_notifier) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
registrar_.Add(this, chrome::NOTIFICATION_GOOGLE_URL_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, ui_death_notification, ui_death_source);
}
diff --git a/chrome/browser/search_engines/search_provider_install_data_unittest.cc b/chrome/browser/search_engines/search_provider_install_data_unittest.cc
index 1dcb980..fb12aad 100644
--- a/chrome/browser/search_engines/search_provider_install_data_unittest.cc
+++ b/chrome/browser/search_engines/search_provider_install_data_unittest.cc
@@ -18,7 +18,7 @@
#include "chrome/test/base/testing_pref_service.h"
#include "chrome/test/base/testing_profile.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -179,10 +179,10 @@ class SearchProviderInstallDataTest : public testing::Test {
// Make sure that the install data class on the UI thread gets cleaned up.
// It doesn't matter that this happens after install_data_ is deleted.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
content::Source<SearchProviderInstallDataTest>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
util_.TearDown();
testing::Test::TearDown();
diff --git a/chrome/browser/search_engines/template_url_service.cc b/chrome/browser/search_engines/template_url_service.cc
index 0b6a8dc..9d9f694 100644
--- a/chrome/browser/search_engines/template_url_service.cc
+++ b/chrome/browser/search_engines/template_url_service.cc
@@ -38,7 +38,7 @@
#include "chrome/common/guid.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/base/net_util.h"
#include "ui/base/l10n/l10n_util.h"
@@ -927,7 +927,7 @@ void TemplateURLService::Init(const Initializer* initializers,
PrefSetObserver::CreateDefaultSearchPrefSetObserver(prefs, this));
}
registrar_.Add(this, chrome::NOTIFICATION_GOOGLE_URL_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
if (num_initializers > 0) {
// This path is only hit by test code and is used to simulate a loaded
@@ -1043,10 +1043,10 @@ void TemplateURLService::ChangeToLoadedState() {
}
void TemplateURLService::NotifyLoaded() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED,
content::Source<TemplateURLService>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
for (size_t i = 0; i < pending_extension_ids_.size(); ++i) {
const Extension* extension = profile_->GetExtensionService()->
@@ -1552,7 +1552,7 @@ void TemplateURLService::RemoveNoNotify(const TemplateURL* template_url) {
if (profile_) {
content::Source<Profile> source(profile_);
TemplateURLID id = template_url->id();
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TEMPLATE_URL_REMOVED,
source,
content::Details<TemplateURLID>(&id));
diff --git a/chrome/browser/search_engines/template_url_service_test_util.cc b/chrome/browser/search_engines/template_url_service_test_util.cc
index 0fe9bc8..45e5206 100644
--- a/chrome/browser/search_engines/template_url_service_test_util.cc
+++ b/chrome/browser/search_engines/template_url_service_test_util.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -227,10 +227,10 @@ string16 TemplateURLServiceTestUtil::GetAndClearSearchTerm() {
void TemplateURLServiceTestUtil::SetGoogleBaseURL(
const std::string& base_url) const {
TemplateURLRef::SetGoogleBaseURL(new std::string(base_url));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_GOOGLE_URL_UPDATED,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
}
WebDataService* TemplateURLServiceTestUtil::GetWebDataService() {
diff --git a/chrome/browser/service/service_process_control.cc b/chrome/browser/service/service_process_control.cc
index a08f93a..368ff75 100644
--- a/chrome/browser/service/service_process_control.cc
+++ b/chrome/browser/service/service_process_control.cc
@@ -18,7 +18,7 @@
#include "chrome/common/service_process_util.h"
#include "content/browser/browser_thread.h"
#include "content/common/child_process_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "ui/base/ui_base_switches.h"
@@ -213,7 +213,7 @@ void ServiceProcessControl::OnChannelConnected(int32 peer_pid) {
} else {
if (registrar_.IsEmpty())
registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
RunConnectDoneTasks();
}
diff --git a/chrome/browser/sessions/restore_tab_helper.cc b/chrome/browser/sessions/restore_tab_helper.cc
index 2823e8e..074991e 100644
--- a/chrome/browser/sessions/restore_tab_helper.cc
+++ b/chrome/browser/sessions/restore_tab_helper.cc
@@ -7,7 +7,7 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/extensions/extension_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
RestoreTabHelper::RestoreTabHelper(TabContentsWrapper* tab)
@@ -20,10 +20,10 @@ RestoreTabHelper::~RestoreTabHelper() {
void RestoreTabHelper::SetWindowID(const SessionID& id) {
window_id_ = id;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_TAB_PARENTED,
content::Source<TabContentsWrapper>(tab_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
// Extension code in the renderer holds the ID of the window that hosts it.
// Notify it that the window ID changed.
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index e1befc6..eefb94b 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -33,7 +33,7 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/base/network_change_notifier.h"
#if defined(OS_CHROMEOS)
@@ -184,7 +184,7 @@ void TabLoader::TabIsLoading(NavigationController* controller) {
void TabLoader::StartLoading() {
registrar_.Add(this, content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
#if defined(OS_CHROMEOS)
if (!net::NetworkChangeNotifier::IsOffline()) {
loading_ = true;
diff --git a/chrome/browser/sessions/session_restore_browsertest.cc b/chrome/browser/sessions/session_restore_browsertest.cc
index 29f6d9d..1289f9f 100644
--- a/chrome/browser/sessions/session_restore_browsertest.cc
+++ b/chrome/browser/sessions/session_restore_browsertest.cc
@@ -14,6 +14,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/common/page_transition_types.h"
@@ -124,13 +125,15 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoreIndividualTabFromWindow) {
ui_test_utils::NavigateToURL(browser(), url1);
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->AddSelectedTabWithURL(url2, content::PAGE_TRANSITION_LINK);
observer.Wait();
}
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->AddSelectedTabWithURL(url3, content::PAGE_TRANSITION_LINK);
observer.Wait();
}
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index de031f6..1c570ac 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -33,7 +33,7 @@
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#if defined(OS_MACOSX)
@@ -458,30 +458,30 @@ void SessionService::Save() {
RecordSessionUpdateHistogramData(
chrome::NOTIFICATION_SESSION_SERVICE_SAVED,
&last_updated_save_time_);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_SESSION_SERVICE_SAVED,
content::Source<Profile>(profile()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
}
void SessionService::Init() {
// Register for the notifications we're interested in.
registrar_.Add(this, content::NOTIFICATION_TAB_PARENTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_TAB_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_NAV_LIST_PRUNED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_OPENED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(
this, chrome::NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
bool SessionService::ShouldNewWindowStartSession() {
diff --git a/chrome/browser/sessions/session_service_unittest.cc b/chrome/browser/sessions/session_service_unittest.cc
index d6b4479..e79d4cd 100644
--- a/chrome/browser/sessions/session_service_unittest.cc
+++ b/chrome/browser/sessions/session_service_unittest.cc
@@ -23,7 +23,7 @@
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
class SessionServiceTest : public BrowserWithTestWindowTest,
@@ -650,7 +650,7 @@ TEST_F(SessionServiceTest, GetCurrentSession) {
TEST_F(SessionServiceTest, SavedSessionNotification) {
content::NotificationRegistrar registrar_;
registrar_.Add(this, chrome::NOTIFICATION_SESSION_SERVICE_SAVED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
service()->Save();
EXPECT_EQ(sync_save_count_, 1);
}
diff --git a/chrome/browser/sidebar/sidebar_manager.cc b/chrome/browser/sidebar/sidebar_manager.cc
index 5c946c7..dc1d04d 100644
--- a/chrome/browser/sidebar/sidebar_manager.cc
+++ b/chrome/browser/sidebar/sidebar_manager.cc
@@ -14,7 +14,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
struct SidebarManager::SidebarStateForTab {
@@ -239,7 +239,7 @@ void SidebarManager::Observe(int type,
}
void SidebarManager::UpdateSidebar(SidebarContainer* host) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_SIDEBAR_CHANGED,
content::Source<SidebarManager>(this),
content::Details<SidebarContainer>(host));
diff --git a/chrome/browser/spellchecker/spellcheck_host_impl.cc b/chrome/browser/spellchecker/spellcheck_host_impl.cc
index 5cc84c6..946e5ab 100644
--- a/chrome/browser/spellchecker/spellcheck_host_impl.cc
+++ b/chrome/browser/spellchecker/spellcheck_host_impl.cc
@@ -23,7 +23,7 @@
#include "chrome/common/spellcheck_common.h"
#include "chrome/common/spellcheck_messages.h"
#include "content/browser/renderer_host/render_process_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
#include "net/url_request/url_request_context_getter.h"
@@ -101,7 +101,7 @@ SpellCheckHostImpl::SpellCheckHostImpl(
personal_file_directory.Append(chrome::kCustomDictionaryFileName);
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
SpellCheckHostImpl::~SpellCheckHostImpl() {
diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc
index 1b98d63..abe4a585 100644
--- a/chrome/browser/ssl/ssl_blocking_page.cc
+++ b/chrome/browser/ssl/ssl_blocking_page.cc
@@ -20,7 +20,7 @@
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
@@ -115,10 +115,10 @@ void SSLBlockingPage::UpdateEntry(NavigationEntry* entry) {
entry->ssl().set_cert_id(cert_id);
entry->ssl().set_cert_status(ssl_info.cert_status);
entry->ssl().set_security_bits(ssl_info.security_bits);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED,
content::Source<NavigationController>(&tab()->controller()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void SSLBlockingPage::CommandReceived(const std::string& command) {
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index b2ebc6e..a210105 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -18,7 +18,7 @@
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/base/cert_status_flags.h"
#include "net/test/test_server.h"
@@ -367,7 +367,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestHTTPSExpiredCertAndGoBackViaButton) {
ui_test_utils::WindowedNotificationObserver load_failed_observer(
content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Simulate user clicking on back button (crbug.com/39248).
browser()->GoBack(CURRENT_TAB);
@@ -503,7 +503,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestBadHTTPSDownload) {
// Now, start a transition to dangerous download.
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser::NavigateParams navigate_params(browser(), url_dangerous,
content::PAGE_TRANSITION_TYPED);
browser::Navigate(&navigate_params);
@@ -518,7 +519,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestBadHTTPSDownload) {
{
ui_test_utils::WindowedNotificationObserver observer(
chrome::NOTIFICATION_DOWNLOAD_INITIATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
tab->interstitial_page()->Proceed();
observer.Wait();
}
@@ -669,7 +670,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestDisplaysInsecureContentTwoTabs) {
params.tabstrip_index = 0;
params.source_contents = tab1;
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser::Navigate(&params);
TabContentsWrapper* tab2 = params.target_contents;
observer.Wait();
@@ -709,7 +711,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestRunsInsecureContentTwoTabs) {
params.disposition = NEW_FOREGROUND_TAB;
params.source_contents = tab1;
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser::Navigate(&params);
TabContentsWrapper* tab2 = params.target_contents;
observer.Wait();
@@ -884,7 +887,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestCloseTabWithUnsafePopup) {
// the first tab.
GURL url = test_server()->GetURL("files/ssl/google.html");
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->AddSelectedTabWithURL(url, content::PAGE_TRANSITION_TYPED);
observer.Wait();
diff --git a/chrome/browser/sync/backend_migrator_unittest.cc b/chrome/browser/sync/backend_migrator_unittest.cc
index 0f10842..873e844 100644
--- a/chrome/browser/sync/backend_migrator_unittest.cc
+++ b/chrome/browser/sync/backend_migrator_unittest.cc
@@ -77,7 +77,7 @@ class BackendMigratorTest : public testing::Test {
const syncable::ModelTypeSet& requested_types) {
if (status == DataTypeManager::OK) {
DataTypeManager::ConfigureResult result(status, requested_types);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
content::Source<DataTypeManager>(&manager_),
content::Details<const DataTypeManager::ConfigureResult>(&result));
@@ -87,7 +87,7 @@ class BackendMigratorTest : public testing::Test {
status,
requested_types,
errors);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
content::Source<DataTypeManager>(&manager_),
content::Details<const DataTypeManager::ConfigureResult>(&result));
diff --git a/chrome/browser/sync/glue/autofill_change_processor.cc b/chrome/browser/sync/glue/autofill_change_processor.cc
index ce1b0d9..f92f2df 100644
--- a/chrome/browser/sync/glue/autofill_change_processor.cc
+++ b/chrome/browser/sync/glue/autofill_change_processor.cc
@@ -24,7 +24,7 @@
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/guid.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace browser_sync {
@@ -422,7 +422,7 @@ void AutofillChangeProcessor::StartObserving() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
notification_registrar_.Add(this,
chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
void AutofillChangeProcessor::StopObserving() {
diff --git a/chrome/browser/sync/glue/autofill_data_type_controller.cc b/chrome/browser/sync/glue/autofill_data_type_controller.cc
index 74f9f32..f11fb11 100644
--- a/chrome/browser/sync/glue/autofill_data_type_controller.cc
+++ b/chrome/browser/sync/glue/autofill_data_type_controller.cc
@@ -15,7 +15,6 @@
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
#include "content/public/browser/notification_source.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/glue/autofill_profile_data_type_controller.cc b/chrome/browser/sync/glue/autofill_profile_data_type_controller.cc
index 152a4a2..bb16a32 100644
--- a/chrome/browser/sync/glue/autofill_profile_data_type_controller.cc
+++ b/chrome/browser/sync/glue/autofill_profile_data_type_controller.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
namespace browser_sync {
@@ -47,7 +47,7 @@ bool AutofillProfileDataTypeController::StartModels() {
return true;
} else {
notification_registrar_.Add(this, chrome::NOTIFICATION_WEB_DATABASE_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
return false;
}
}
@@ -61,7 +61,7 @@ void AutofillProfileDataTypeController::OnPersonalDataChanged() {
DoStartAssociationAsync();
} else {
notification_registrar_.Add(this, chrome::NOTIFICATION_WEB_DATABASE_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
}
diff --git a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
index 1e7fa57..4e4c231 100644
--- a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
@@ -19,7 +19,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/profile_mock.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -117,10 +117,10 @@ TEST_F(BookmarkDataTypeControllerTest, StartBookmarkModelNotReady) {
EXPECT_EQ(DataTypeController::MODEL_STARTING, bookmark_dtc_->state());
// Send the notification that the bookmark model has started.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
content::Source<Profile>(&profile_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
EXPECT_EQ(DataTypeController::RUNNING, bookmark_dtc_->state());
}
diff --git a/chrome/browser/sync/glue/data_type_manager_impl.cc b/chrome/browser/sync/glue/data_type_manager_impl.cc
index 3a58290..64c5692 100644
--- a/chrome/browser/sync/glue/data_type_manager_impl.cc
+++ b/chrome/browser/sync/glue/data_type_manager_impl.cc
@@ -18,7 +18,7 @@
#include "chrome/browser/sync/glue/sync_backend_host.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
@@ -457,10 +457,10 @@ void DataTypeManagerImpl::Abort(ConfigureStatus status,
}
void DataTypeManagerImpl::NotifyStart() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_SYNC_CONFIGURE_START,
content::Source<DataTypeManager>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void DataTypeManagerImpl::NotifyDone(const ConfigureResult& result) {
@@ -493,7 +493,7 @@ void DataTypeManagerImpl::NotifyDone(const ConfigureResult& result) {
NOTREACHED();
break;
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
content::Source<DataTypeManager>(this),
content::Details<const ConfigureResult>(&result));
@@ -508,10 +508,10 @@ void DataTypeManagerImpl::SetBlockedAndNotify() {
AddToConfigureTime();
VLOG(1) << "Accumulated spent configuring: "
<< configure_time_delta_.InSecondsF() << "s";
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_SYNC_CONFIGURE_BLOCKED,
content::Source<DataTypeManager>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void DataTypeManagerImpl::AddToConfigureTime() {
diff --git a/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc b/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc
index eccd6f8..e4387fd 100644
--- a/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc
+++ b/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc
@@ -19,7 +19,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/browser_thread.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/test/notification_observer_mock.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -78,10 +78,10 @@ class DataTypeManagerImplTest : public testing::Test {
virtual void SetUp() {
registrar_.Add(&observer_,
chrome::NOTIFICATION_SYNC_CONFIGURE_START,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(&observer_,
chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
DataTypeControllerMock* MakeBookmarkDTC() {
diff --git a/chrome/browser/sync/glue/data_type_manager_mock.h b/chrome/browser/sync/glue/data_type_manager_mock.h
index 34828d8..b7f3ca8 100644
--- a/chrome/browser/sync/glue/data_type_manager_mock.h
+++ b/chrome/browser/sync/glue/data_type_manager_mock.h
@@ -9,7 +9,7 @@
#include "chrome/browser/sync/api/sync_error.h"
#include "chrome/browser/sync/glue/data_type_manager.h"
#include "chrome/browser/sync/profile_sync_test_util.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_types.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -35,7 +35,7 @@ ACTION_P3(InvokeCallbackPointer, callback, datatype, callback_result) {
}
ACTION_P3(NotifyFromDataTypeManagerWithResult, dtm, type, result) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
type,
content::Source<browser_sync::DataTypeManager>(dtm),
content::Details<const browser_sync::DataTypeManager::ConfigureResult>(
@@ -43,9 +43,9 @@ ACTION_P3(NotifyFromDataTypeManagerWithResult, dtm, type, result) {
}
ACTION_P2(NotifyFromDataTypeManager, dtm, type) {
- NotificationService::current()->Notify(type,
+ content::NotificationService::current()->Notify(type,
content::Source<browser_sync::DataTypeManager>(dtm),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
namespace browser_sync {
diff --git a/chrome/browser/sync/glue/search_engine_data_type_controller_unittest.cc b/chrome/browser/sync/glue/search_engine_data_type_controller_unittest.cc
index a2abcb9..15e1534 100644
--- a/chrome/browser/sync/glue/search_engine_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/search_engine_data_type_controller_unittest.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/sync/profile_sync_service_mock.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/profile_mock.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
using browser_sync::ChangeProcessorMock;
@@ -107,10 +107,10 @@ TEST_F(SearchEngineDataTypeControllerTest, StartURLServiceNotReady) {
EXPECT_EQ(DataTypeController::MODEL_STARTING, search_engine_dtc_->state());
// Send the notification that the TemplateURLService has started.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED,
content::Source<TemplateURLService>(test_util_.model()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
EXPECT_EQ(DataTypeController::RUNNING, search_engine_dtc_->state());
}
diff --git a/chrome/browser/sync/glue/session_change_processor.cc b/chrome/browser/sync/glue/session_change_processor.cc
index 45b4d9e..4160df9 100644
--- a/chrome/browser/sync/glue/session_change_processor.cc
+++ b/chrome/browser/sync/glue/session_change_processor.cc
@@ -21,7 +21,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
@@ -270,10 +270,10 @@ void SessionChangeProcessor::ApplyChangesFromSyncModel(
}
// Notify foreign session handlers that there are new sessions.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED,
content::Source<Profile>(profile_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
StartObserving();
}
@@ -296,23 +296,23 @@ void SessionChangeProcessor::StartObserving() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(profile_);
notification_registrar_.Add(this, content::NOTIFICATION_TAB_PARENTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
notification_registrar_.Add(this, content::NOTIFICATION_TAB_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
notification_registrar_.Add(this, content::NOTIFICATION_NAV_LIST_PRUNED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
notification_registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
notification_registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
notification_registrar_.Add(this, chrome::NOTIFICATION_BROWSER_OPENED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
notification_registrar_.Add(this,
chrome::NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
notification_registrar_.Add(this,
content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
void SessionChangeProcessor::StopObserving() {
diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc
index 3a8233a..edec88d 100644
--- a/chrome/browser/sync/glue/session_model_associator.cc
+++ b/chrome/browser/sync/glue/session_model_associator.cc
@@ -28,7 +28,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/navigation_entry.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#if defined(OS_LINUX)
#include "base/linux_util.h"
@@ -533,10 +533,10 @@ bool SessionModelAssociator::DisassociateModels(SyncError* error) {
// There is no local model stored with which to disassociate, just notify
// foreign session handlers.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_FOREIGN_SESSION_DISABLED,
content::Source<Profile>(sync_service_->profile()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
return true;
}
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index ff5374d..20b1afc 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -33,7 +33,7 @@
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/net/gaia/gaia_constants.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/common/content_client.h"
static const int kSaveChangesIntervalSeconds = 10;
@@ -788,7 +788,7 @@ void SyncBackendHost::Core::NotifyUpdatedToken(const std::string& token) {
return;
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
TokenAvailableDetails details(GaiaConstants::kSyncService, token);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TOKEN_UPDATED,
content::Source<Profile>(host_->profile_),
content::Details<const TokenAvailableDetails>(&details));
diff --git a/chrome/browser/sync/glue/typed_url_change_processor.cc b/chrome/browser/sync/glue/typed_url_change_processor.cc
index b68b2a1..9ed54a3 100644
--- a/chrome/browser/sync/glue/typed_url_change_processor.cc
+++ b/chrome/browser/sync/glue/typed_url_change_processor.cc
@@ -18,7 +18,7 @@
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/protocol/typed_url_specifics.pb.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/browser/notification_service_impl.h"
namespace browser_sync {
@@ -47,8 +47,8 @@ TypedUrlChangeProcessor::TypedUrlChangeProcessor(
DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
// When running in unit tests, there is already a NotificationService object.
// Since only one can exist at a time per thread, check first.
- if (!NotificationService::current())
- notification_service_.reset(new NotificationService);
+ if (!content::NotificationService::current())
+ notification_service_.reset(new NotificationServiceImpl);
StartObserving();
}
diff --git a/chrome/browser/sync/glue/typed_url_change_processor.h b/chrome/browser/sync/glue/typed_url_change_processor.h
index a8c3044..8f4d555 100644
--- a/chrome/browser/sync/glue/typed_url_change_processor.h
+++ b/chrome/browser/sync/glue/typed_url_change_processor.h
@@ -18,9 +18,12 @@
#include "content/public/browser/notification_types.h"
class MessageLoop;
-class NotificationService;
class Profile;
+namespace content {
+class NotificationService;
+}
+
namespace history {
class HistoryBackend;
struct URLsDeletedDetails;
@@ -101,7 +104,7 @@ class TypedUrlChangeProcessor : public ChangeProcessor,
MessageLoop* expected_loop_;
- scoped_ptr<NotificationService> notification_service_;
+ scoped_ptr<content::NotificationService> notification_service_;
// The set of pending changes that will be written out on the next
// CommitChangesFromSyncModel() call.
diff --git a/chrome/browser/sync/glue/typed_url_data_type_controller.cc b/chrome/browser/sync/glue/typed_url_data_type_controller.cc
index 610ce0e..195f2cf 100644
--- a/chrome/browser/sync/glue/typed_url_data_type_controller.cc
+++ b/chrome/browser/sync/glue/typed_url_data_type_controller.cc
@@ -14,7 +14,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/profile_sync_service_password_unittest.cc b/chrome/browser/sync/profile_sync_service_password_unittest.cc
index 064e946..2f5f48e 100644
--- a/chrome/browser/sync/profile_sync_service_password_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_password_unittest.cc
@@ -165,10 +165,10 @@ class ProfileSyncServicePasswordTest : public AbstractProfileSyncServiceTest {
notification_service_->Init();
registrar_.Add(&observer_,
chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(&observer_,
chrome::NOTIFICATION_SYNC_CONFIGURE_BLOCKED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
virtual void TearDown() {
diff --git a/chrome/browser/sync/profile_sync_service_session_unittest.cc b/chrome/browser/sync/profile_sync_service_session_unittest.cc
index 1ff13f6..3132451 100644
--- a/chrome/browser/sync/profile_sync_service_session_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_session_unittest.cc
@@ -41,7 +41,7 @@
#include "content/browser/browser_thread.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -177,7 +177,7 @@ class ProfileSyncServiceSessionTest
window_bounds_,
ui::SHOW_STATE_NORMAL);
registrar_.Add(this, chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
void Observe(int type,
diff --git a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
index c55408a9..715f8d7 100644
--- a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
@@ -37,7 +37,7 @@
#include "chrome/common/net/gaia/gaia_constants.h"
#include "chrome/test/base/profile_mock.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/browser/sync/profile_sync_test_util.cc b/chrome/browser/sync/profile_sync_test_util.cc
index c37680c..dcf41aa 100644
--- a/chrome/browser/sync/profile_sync_test_util.cc
+++ b/chrome/browser/sync/profile_sync_test_util.cc
@@ -36,7 +36,7 @@ void ThreadNotificationService::TearDown() {
ThreadNotificationService::~ThreadNotificationService() {}
void ThreadNotificationService::InitTask() {
- service_.reset(new NotificationService());
+ service_.reset(new NotificationServiceImpl());
done_event_.Signal();
}
@@ -51,7 +51,7 @@ ThreadNotifier::ThreadNotifier(base::Thread* notify_thread)
void ThreadNotifier::Notify(int type,
const content::NotificationDetails& details) {
- Notify(type, NotificationService::AllSources(), details);
+ Notify(type, content::NotificationService::AllSources(), details);
}
void ThreadNotifier::Notify(int type,
@@ -73,6 +73,6 @@ ThreadNotifier::~ThreadNotifier() {}
void ThreadNotifier::NotifyTask(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- NotificationService::current()->Notify(type, source, details);
+ content::NotificationService::current()->Notify(type, source, details);
done_event_.Signal();
}
diff --git a/chrome/browser/sync/profile_sync_test_util.h b/chrome/browser/sync/profile_sync_test_util.h
index 8aaeed3..a1c52eb 100644
--- a/chrome/browser/sync/profile_sync_test_util.h
+++ b/chrome/browser/sync/profile_sync_test_util.h
@@ -14,7 +14,7 @@
#include "base/synchronization/waitable_event.h"
#include "chrome/browser/sync/profile_sync_service_observer.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/browser/notification_service_impl.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -24,9 +24,10 @@ class Thread;
}
ACTION_P(Notify, type) {
- NotificationService::current()->Notify(type,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::current()->Notify(
+ type,
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
}
ACTION(QuitUIMessageLoop) {
@@ -59,7 +60,7 @@ class ThreadNotificationService
base::WaitableEvent done_event_;
base::Thread* notification_thread_;
- scoped_ptr<NotificationService> service_;
+ scoped_ptr<NotificationServiceImpl> service_;
};
class ThreadNotifier : // NOLINT
diff --git a/chrome/browser/sync/signin_manager.cc b/chrome/browser/sync/signin_manager.cc
index 05adf8b..ca5be0c 100644
--- a/chrome/browser/sync/signin_manager.cc
+++ b/chrome/browser/sync/signin_manager.cc
@@ -15,7 +15,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/net/gaia/gaia_constants.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
const char kGetInfoEmailKey[] = "email";
@@ -198,7 +198,7 @@ void SigninManager::OnGetUserInfoSuccess(const std::string& key,
profile_->GetPrefs()->ScheduleSavePersistentPrefs();
GoogleServiceSigninSuccessDetails details(username_, password_);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL,
content::Source<Profile>(profile_),
content::Details<const GoogleServiceSigninSuccessDetails>(&details));
@@ -235,7 +235,7 @@ void SigninManager::OnTokenAuthFailure(const GoogleServiceAuthError& error) {
void SigninManager::OnClientLoginFailure(const GoogleServiceAuthError& error) {
DCHECK(!browser_sync::IsUsingOAuth());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_GOOGLE_SIGNIN_FAILED,
content::Source<Profile>(profile_),
content::Details<const GoogleServiceAuthError>(&error));
@@ -302,7 +302,7 @@ void SigninManager::OnUserInfoSuccess(const std::string& email) {
DCHECK(password_.empty());
GoogleServiceSigninSuccessDetails details(oauth_username_, "");
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL,
content::Source<Profile>(profile_),
content::Details<const GoogleServiceSigninSuccessDetails>(&details));
diff --git a/chrome/browser/sync/test/integration/autofill_helper.cc b/chrome/browser/sync/test/integration/autofill_helper.cc
index 8c70063..9ff003d 100644
--- a/chrome/browser/sync/test/integration/autofill_helper.cc
+++ b/chrome/browser/sync/test/integration/autofill_helper.cc
@@ -72,10 +72,10 @@ class AutofillDBThreadObserverHelper : public DBThreadObserverHelper {
virtual void RegisterObservers() {
registrar_.Add(&observer_,
chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(&observer_,
chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
};
diff --git a/chrome/browser/sync/util/extensions_activity_monitor.cc b/chrome/browser/sync/util/extensions_activity_monitor.cc
index 6a7cdcf..66b0fbb 100644
--- a/chrome/browser/sync/util/extensions_activity_monitor.cc
+++ b/chrome/browser/sync/util/extensions_activity_monitor.cc
@@ -9,7 +9,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace browser_sync {
@@ -34,7 +34,7 @@ class RegistrationTask : public Task {
// Observe.
registrar_->Add(monitor_,
chrome::NOTIFICATION_EXTENSION_BOOKMARKS_API_INVOKED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
private:
diff --git a/chrome/browser/sync/util/extensions_activity_monitor_unittest.cc b/chrome/browser/sync/util/extensions_activity_monitor_unittest.cc
index 7213af0..5e2283b 100644
--- a/chrome/browser/sync/util/extensions_activity_monitor_unittest.cc
+++ b/chrome/browser/sync/util/extensions_activity_monitor_unittest.cc
@@ -13,7 +13,7 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/browser/notification_service_impl.h"
#include "testing/gtest/include/gtest/gtest.h"
using browser_sync::ExtensionsActivityMonitor;
@@ -46,7 +46,7 @@ class BookmarkAPIEventTask : public Task {
extension_(e), function_(t), repeats_(repeats), done_(done) {}
virtual void Run() {
for (size_t i = 0; i < repeats_; i++) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_BOOKMARKS_API_INVOKED,
content::Source<Extension>(extension_.get()),
content::Details<const BookmarksFunction>(function_.get()));
@@ -91,16 +91,16 @@ class BookmarkAPIEventGenerator {
class DoUIThreadSetupTask : public Task {
public:
- DoUIThreadSetupTask(NotificationService** service,
+ DoUIThreadSetupTask(content::NotificationService** service,
base::WaitableEvent* done)
: service_(service), signal_when_done_(done) {}
virtual ~DoUIThreadSetupTask() {}
virtual void Run() {
- *service_ = new NotificationService();
+ *service_ = new NotificationServiceImpl();
signal_when_done_->Signal();
}
private:
- NotificationService** service_;
+ content::NotificationService** service_;
base::WaitableEvent* signal_when_done_;
DISALLOW_COPY_AND_ASSIGN(DoUIThreadSetupTask);
};
@@ -139,7 +139,7 @@ class ExtensionsActivityMonitorTest : public testing::Test {
return extension->id();
}
private:
- NotificationService* service_;
+ content::NotificationService* service_;
BrowserThread ui_thread_;
};
diff --git a/chrome/browser/tab_contents/background_contents.cc b/chrome/browser/tab_contents/background_contents.cc
index 191c97a..6b3187a 100644
--- a/chrome/browser/tab_contents/background_contents.cc
+++ b/chrome/browser/tab_contents/background_contents.cc
@@ -16,7 +16,7 @@
#include "content/browser/browsing_instance.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/site_instance.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/view_messages.h"
#include "ui/gfx/rect.h"
@@ -35,7 +35,7 @@ BackgroundContents::BackgroundContents(SiteInstance* site_instance,
// Close ourselves when the application is shutting down.
registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Register for our parent profile to shutdown, so we can shut ourselves down
// as well (should only be called for OTR profiles, as we should receive
@@ -55,7 +55,7 @@ BackgroundContents::~BackgroundContents() {
return;
Profile* profile = Profile::FromBrowserContext(
render_view_host_->process()->browser_context());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED,
content::Source<Profile>(profile),
content::Details<BackgroundContents>(this));
@@ -96,7 +96,7 @@ void BackgroundContents::DidNavigate(
Profile* profile = Profile::FromBrowserContext(
render_view_host->process()->browser_context());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED,
content::Source<Profile>(profile),
content::Details<BackgroundContents>(this));
@@ -152,7 +152,7 @@ gfx::NativeWindow BackgroundContents::GetDialogRootWindow() {
void BackgroundContents::Close(RenderViewHost* render_view_host) {
Profile* profile = Profile::FromBrowserContext(
render_view_host->process()->browser_context());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_CLOSED,
content::Source<Profile>(profile),
content::Details<BackgroundContents>(this));
@@ -164,7 +164,7 @@ void BackgroundContents::RenderViewGone(RenderViewHost* rvh,
int error_code) {
Profile* profile =
Profile::FromBrowserContext(rvh->process()->browser_context());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_TERMINATED,
content::Source<Profile>(profile),
content::Details<BackgroundContents>(this));
diff --git a/chrome/browser/tab_contents/chrome_interstitial_page.cc b/chrome/browser/tab_contents/chrome_interstitial_page.cc
index 49fad1d..d42a5eb 100644
--- a/chrome/browser/tab_contents/chrome_interstitial_page.cc
+++ b/chrome/browser/tab_contents/chrome_interstitial_page.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/renderer_preferences_util.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
ChromeInterstitialPage::ChromeInterstitialPage(TabContents* tab,
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index a5e1351..c03cd3e 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -64,6 +64,7 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
#include "content/common/content_restriction.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "net/base/escape.h"
#include "net/base/net_util.h"
@@ -1935,7 +1936,7 @@ void RenderViewContextMenu::OpenURL(
details.source_frame_id = frame_id;
details.target_url = url;
details.target_tab_contents = new_contents;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_RETARGETING,
content::Source<content::BrowserContext>(
source_tab_contents_->browser_context()),
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index baf54eb..cfc558e 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -36,7 +36,7 @@
#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/webui/web_ui.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/view_messages.h"
#include "net/base/network_change_notifier.h"
@@ -60,7 +60,7 @@ void FillFontFamilyMap(const PrefService* prefs,
RenderViewHostDelegateViewHelper::RenderViewHostDelegateViewHelper() {
registrar_.Add(this, content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
RenderViewHostDelegateViewHelper::~RenderViewHostDelegateViewHelper() {}
@@ -268,7 +268,7 @@ TabContents* RenderViewHostDelegateViewHelper::CreateNewWindowFromTabContents(
details.source_frame_id = params.opener_frame_id;
details.target_url = params.target_url;
details.target_tab_contents = new_contents;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_RETARGETING,
content::Source<content::BrowserContext>(
tab_contents->browser_context()),
@@ -277,7 +277,7 @@ TabContents* RenderViewHostDelegateViewHelper::CreateNewWindowFromTabContents(
if (tab_contents->delegate())
tab_contents->delegate()->TabContentsCreated(new_contents);
} else {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_CREATING_NEW_WINDOW_CANCELLED,
content::Source<TabContents>(tab_contents),
content::Details<const ViewHostMsg_CreateWindow_Params>(&params));
diff --git a/chrome/browser/tab_contents/thumbnail_generator.cc b/chrome/browser/tab_contents/thumbnail_generator.cc
index 4e23ac6..5fed912 100644
--- a/chrome/browser/tab_contents/thumbnail_generator.cc
+++ b/chrome/browser/tab_contents/thumbnail_generator.cc
@@ -19,7 +19,8 @@
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
#include "skia/ext/image_operations.h"
diff --git a/chrome/browser/tab_contents/thumbnail_generator_unittest.cc b/chrome/browser/tab_contents/thumbnail_generator_unittest.cc
index 7843916..b96333d 100644
--- a/chrome/browser/tab_contents/thumbnail_generator_unittest.cc
+++ b/chrome/browser/tab_contents/thumbnail_generator_unittest.cc
@@ -13,7 +13,7 @@
#include "content/browser/renderer_host/mock_render_process_host.h"
#include "content/browser/renderer_host/test_render_view_host.h"
#include "content/browser/tab_contents/render_view_host_manager.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/view_messages.h"
#include "content/public/browser/notification_types.h"
#include "skia/ext/platform_canvas.h"
@@ -68,7 +68,7 @@ class ThumbnailGeneratorTest : public testing::Test {
// Need to send out a create notification for the RWH to get hooked. This is
// a little scary in that we don't have a RenderView, but the only listener
// will want a RenderWidget, so it works out OK.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB,
content::Source<RenderViewHostManager>(NULL),
content::Details<RenderViewHost>(reinterpret_cast<RenderViewHost*>(
diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc
index 70d55de..bc2f9b6 100644
--- a/chrome/browser/tab_contents/web_contents_unittest.cc
+++ b/chrome/browser/tab_contents/web_contents_unittest.cc
@@ -22,7 +22,8 @@
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/test_tab_contents.h"
#include "content/common/content_constants.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/common/view_messages.h"
#include "content/public/browser/notification_source.h"
#include "content/public/common/bindings_policy.h"
diff --git a/chrome/browser/tabs/pinned_tab_service.cc b/chrome/browser/tabs/pinned_tab_service.cc
index 6c988c5..3f6116f 100644
--- a/chrome/browser/tabs/pinned_tab_service.cc
+++ b/chrome/browser/tabs/pinned_tab_service.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
static bool IsLastNormalBrowser(Browser* browser) {
for (BrowserList::const_iterator i = BrowserList::begin();
@@ -27,11 +27,11 @@ PinnedTabService::PinnedTabService(Profile* profile)
got_exiting_(false),
has_normal_browser_(false) {
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_OPENED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_APP_EXITING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
void PinnedTabService::Observe(int type,
diff --git a/chrome/browser/tabs/tab_finder.cc b/chrome/browser/tabs/tab_finder.cc
index cb8488a..0aa7523 100644
--- a/chrome/browser/tabs/tab_finder.cc
+++ b/chrome/browser/tabs/tab_finder.cc
@@ -18,7 +18,7 @@
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/view_messages.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
@@ -123,7 +123,7 @@ void TabFinder::Observe(int type,
TabFinder::TabFinder() {
registrar_.Add(this, content::NOTIFICATION_TAB_PARENTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
TabFinder::~TabFinder() {
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index cc28c61..5eca928 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -31,7 +31,7 @@
#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace {
@@ -68,7 +68,7 @@ TabStripModel::TabStripModel(TabStripModelDelegate* delegate, Profile* profile)
DCHECK(delegate_);
registrar_.Add(this,
content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this,
chrome::NOTIFICATION_EXTENSION_UNLOADED,
content::Source<Profile>(profile_));
diff --git a/chrome/browser/task_manager/task_manager_browsertest.cc b/chrome/browser/task_manager/task_manager_browsertest.cc
index bf7a425..ed6603e 100644
--- a/chrome/browser/task_manager/task_manager_browsertest.cc
+++ b/chrome/browser/task_manager/task_manager_browsertest.cc
@@ -28,6 +28,7 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/common/page_transition_types.h"
#include "grit/generated_resources.h"
#include "net/base/mock_host_resolver.h"
@@ -302,7 +303,7 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeHostedAppTabs) {
GURL url(base_url.Resolve("path1/empty.html"));
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
AddTabAtIndex(0, url, content::PAGE_TRANSITION_TYPED);
observer.Wait();
diff --git a/chrome/browser/task_manager/task_manager_notification_resource_provider.cc b/chrome/browser/task_manager/task_manager_notification_resource_provider.cc
index c8dd647..2e61039 100644
--- a/chrome/browser/task_manager/task_manager_notification_resource_provider.cc
+++ b/chrome/browser/task_manager/task_manager_notification_resource_provider.cc
@@ -13,7 +13,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
@@ -110,9 +110,9 @@ void TaskManagerNotificationResourceProvider::StartUpdating() {
// Register for notifications about extension process changes.
registrar_.Add(this, chrome::NOTIFICATION_NOTIFY_BALLOON_CONNECTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
void TaskManagerNotificationResourceProvider::StopUpdating() {
@@ -121,9 +121,9 @@ void TaskManagerNotificationResourceProvider::StopUpdating() {
// Unregister for notifications about extension process changes.
registrar_.Remove(this, chrome::NOTIFICATION_NOTIFY_BALLOON_CONNECTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Remove(this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Delete all the resources.
STLDeleteContainerPairSecondPointers(resources_.begin(), resources_.end());
diff --git a/chrome/browser/task_manager/task_manager_resource_providers.cc b/chrome/browser/task_manager/task_manager_resource_providers.cc
index c002fc0..5c64103 100644
--- a/chrome/browser/task_manager/task_manager_resource_providers.cc
+++ b/chrome/browser/task_manager/task_manager_resource_providers.cc
@@ -44,7 +44,7 @@
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
@@ -354,17 +354,17 @@ void TaskManagerTabContentsResourceProvider::StartUpdating() {
// Then we register for notifications to get new tabs.
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_SWAPPED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DISCONNECTED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
// TAB_CONTENTS_DISCONNECTED should be enough to know when to remove a
// resource. This is an attempt at mitigating a crasher that seem to
// indicate a resource is still referencing a deleted TabContents
// (http://crbug.com/7321).
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
void TaskManagerTabContentsResourceProvider::StopUpdating() {
@@ -372,14 +372,18 @@ void TaskManagerTabContentsResourceProvider::StopUpdating() {
updating_ = false;
// Then we unregister for notifications to get new tabs.
- registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
- NotificationService::AllBrowserContextsAndSources());
- registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_SWAPPED,
- NotificationService::AllBrowserContextsAndSources());
- registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DISCONNECTED,
- NotificationService::AllBrowserContextsAndSources());
- registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- NotificationService::AllBrowserContextsAndSources());
+ registrar_.Remove(
+ this, content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
+ content::NotificationService::AllBrowserContextsAndSources());
+ registrar_.Remove(
+ this, content::NOTIFICATION_TAB_CONTENTS_SWAPPED,
+ content::NotificationService::AllBrowserContextsAndSources());
+ registrar_.Remove(
+ this, content::NOTIFICATION_TAB_CONTENTS_DISCONNECTED,
+ content::NotificationService::AllBrowserContextsAndSources());
+ registrar_.Remove(
+ this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
+ content::NotificationService::AllBrowserContextsAndSources());
// Delete all the resources.
STLDeleteContainerPairSecondPointers(resources_.begin(), resources_.end());
@@ -604,11 +608,11 @@ void TaskManagerBackgroundContentsResourceProvider::StartUpdating() {
// Then we register for notifications to get new BackgroundContents.
registrar_.Add(this, chrome::NOTIFICATION_BACKGROUND_CONTENTS_OPENED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
void TaskManagerBackgroundContentsResourceProvider::StopUpdating() {
@@ -616,12 +620,15 @@ void TaskManagerBackgroundContentsResourceProvider::StopUpdating() {
updating_ = false;
// Unregister for notifications
- registrar_.Remove(this, chrome::NOTIFICATION_BACKGROUND_CONTENTS_OPENED,
- NotificationService::AllBrowserContextsAndSources());
- registrar_.Remove(this, chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED,
- NotificationService::AllBrowserContextsAndSources());
- registrar_.Remove(this, chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED,
- NotificationService::AllBrowserContextsAndSources());
+ registrar_.Remove(
+ this, chrome::NOTIFICATION_BACKGROUND_CONTENTS_OPENED,
+ content::NotificationService::AllBrowserContextsAndSources());
+ registrar_.Remove(
+ this, chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED,
+ content::NotificationService::AllBrowserContextsAndSources());
+ registrar_.Remove(
+ this, chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED,
+ content::NotificationService::AllBrowserContextsAndSources());
// Delete all the resources.
STLDeleteContainerPairSecondPointers(resources_.begin(), resources_.end());
@@ -906,9 +913,9 @@ void TaskManagerChildProcessResourceProvider::StartUpdating() {
// Register for notifications to get new child processes.
registrar_.Add(this, content::NOTIFICATION_CHILD_PROCESS_HOST_CONNECTED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
// Get the existing child processes.
BrowserThread::PostTask(
@@ -923,11 +930,13 @@ void TaskManagerChildProcessResourceProvider::StopUpdating() {
updating_ = false;
// Unregister for notifications to get new plugin processes.
- registrar_.Remove(this, content::NOTIFICATION_CHILD_PROCESS_HOST_CONNECTED,
- NotificationService::AllBrowserContextsAndSources());
- registrar_.Remove(this,
- content::NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED,
- NotificationService::AllBrowserContextsAndSources());
+ registrar_.Remove(
+ this, content::NOTIFICATION_CHILD_PROCESS_HOST_CONNECTED,
+ content::NotificationService::AllBrowserContextsAndSources());
+ registrar_.Remove(
+ this,
+ content::NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED,
+ content::NotificationService::AllBrowserContextsAndSources());
// Delete all the resources.
STLDeleteContainerPairSecondPointers(resources_.begin(), resources_.end());
@@ -1160,11 +1169,11 @@ void TaskManagerExtensionProcessResourceProvider::StartUpdating() {
// Register for notifications about extension process changes.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_CREATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
void TaskManagerExtensionProcessResourceProvider::StopUpdating() {
@@ -1172,12 +1181,15 @@ void TaskManagerExtensionProcessResourceProvider::StopUpdating() {
updating_ = false;
// Unregister for notifications about extension process changes.
- registrar_.Remove(this, chrome::NOTIFICATION_EXTENSION_PROCESS_CREATED,
- NotificationService::AllBrowserContextsAndSources());
- registrar_.Remove(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
- NotificationService::AllBrowserContextsAndSources());
- registrar_.Remove(this, chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED,
- NotificationService::AllBrowserContextsAndSources());
+ registrar_.Remove(
+ this, chrome::NOTIFICATION_EXTENSION_PROCESS_CREATED,
+ content::NotificationService::AllBrowserContextsAndSources());
+ registrar_.Remove(
+ this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
+ content::NotificationService::AllBrowserContextsAndSources());
+ registrar_.Remove(
+ this, chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED,
+ content::NotificationService::AllBrowserContextsAndSources());
// Delete all the resources.
STLDeleteContainerPairSecondPointers(resources_.begin(), resources_.end());
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
index 671d7b9..e0daa05 100644
--- a/chrome/browser/themes/theme_service.cc
+++ b/chrome/browser/themes/theme_service.cc
@@ -14,7 +14,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
#include "grit/ui_resources.h"
@@ -597,10 +597,11 @@ void ThemeService::LoadThemePrefs() {
void ThemeService::NotifyThemeChanged() {
VLOG(1) << "Sending BROWSER_THEME_CHANGED";
// Redraw!
- NotificationService* service = NotificationService::current();
+ content::NotificationService* service =
+ content::NotificationService::current();
service->Notify(chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
content::Source<ThemeService>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
#if defined(OS_MACOSX)
NotifyPlatformThemeChanged();
#endif // OS_MACOSX
diff --git a/chrome/browser/themes/theme_service_factory.cc b/chrome/browser/themes/theme_service_factory.cc
index 861614d..965eede 100644
--- a/chrome/browser/themes/theme_service_factory.cc
+++ b/chrome/browser/themes/theme_service_factory.cc
@@ -9,7 +9,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
#include "chrome/browser/themes/theme_service.h"
-#include "content/common/notification_service.h"
#if defined(TOOLKIT_USES_GTK)
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc
index a3ab0e1..a57972f 100644
--- a/chrome/browser/translate/translate_manager.cc
+++ b/chrome/browser/translate/translate_manager.cc
@@ -39,7 +39,7 @@
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
@@ -445,12 +445,12 @@ TranslateManager::TranslateManager()
: ALLOW_THIS_IN_INITIALIZER_LIST(weak_method_factory_(this)),
translate_script_expiration_delay_(kTranslateScriptExpirationDelayMS) {
notification_registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
notification_registrar_.Add(this,
chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
notification_registrar_.Add(this, chrome::NOTIFICATION_PAGE_TRANSLATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
void TranslateManager::InitiateTranslation(TabContents* tab,
diff --git a/chrome/browser/translate/translate_tab_helper.cc b/chrome/browser/translate/translate_tab_helper.cc
index ced575a..81e6ad1 100644
--- a/chrome/browser/translate/translate_tab_helper.cc
+++ b/chrome/browser/translate/translate_tab_helper.cc
@@ -8,7 +8,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/render_messages.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
TranslateTabHelper::TranslateTabHelper(TabContents* tab_contents)
: TabContentsObserver(tab_contents),
@@ -42,7 +42,7 @@ void TranslateTabHelper::OnLanguageDetermined(const std::string& language,
language_state_.LanguageDetermined(language, page_translatable);
std::string lang = language;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED,
content::Source<TabContents>(tab_contents()),
content::Details<std::string>(&lang));
@@ -55,7 +55,7 @@ void TranslateTabHelper::OnPageTranslated(int32 page_id,
language_state_.set_current_language(translated_lang);
language_state_.set_translation_pending(false);
PageTranslatedDetails details(original_lang, translated_lang, error_type);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PAGE_TRANSLATED,
content::Source<TabContents>(tab_contents()),
content::Details<PageTranslatedDetails>(&details));
diff --git a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc
index 3d7a778..e77f88d 100644
--- a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc
+++ b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc
@@ -9,7 +9,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/javascript_dialogs.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
AppModalDialog::AppModalDialog(content::DialogDelegate* delegate,
const string16& title)
@@ -28,10 +28,10 @@ void AppModalDialog::ShowModalDialog() {
CreateAndShowDialog();
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN,
content::Source<AppModalDialog>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void AppModalDialog::CreateAndShowDialog() {
diff --git a/chrome/browser/ui/auto_login_prompter.cc b/chrome/browser/ui/auto_login_prompter.cc
index 0e16490..0b4e3a2 100644
--- a/chrome/browser/ui/auto_login_prompter.cc
+++ b/chrome/browser/ui/auto_login_prompter.cc
@@ -26,9 +26,9 @@
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/url_canon.h"
diff --git a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc
index 3e4e257..94c70e9 100644
--- a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc
+++ b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc
@@ -13,7 +13,6 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
BlockedContentTabHelper::BlockedContentTabHelper(
TabContentsWrapper* tab_contents)
diff --git a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
index ab56535..6e5f641 100644
--- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
@@ -13,7 +13,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace {
@@ -31,9 +31,9 @@ BookmarkTabHelper::BookmarkTabHelper(TabContentsWrapper* tab_contents)
bookmark_drag_(NULL) {
// Register for notifications about URL starredness changing on any profile.
registrar_.Add(this, chrome::NOTIFICATION_URLS_STARRED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
BookmarkTabHelper::~BookmarkTabHelper() {
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 8f44bbb..3ab3c19 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -150,7 +150,7 @@
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/user_metrics.h"
#include "content/common/content_restriction.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/page_zoom.h"
#include "content/public/browser/notification_details.h"
#include "content/public/common/content_switches.h"
@@ -295,7 +295,7 @@ Browser::Browser(Type type, Profile* profile)
mouse_lock_state_(MOUSELOCK_NOT_REQUESTED),
window_has_shown_(false) {
registrar_.Add(this, content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
@@ -305,17 +305,17 @@ Browser::Browser(Type type, Profile* profile)
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(
this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
content::Source<ThemeService>(
ThemeServiceFactory::GetForProfile(profile_)));
registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Need to know when to alert the user of theme install delay.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_READY_FOR_INSTALL,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
PrefService* local_state = g_browser_process->local_state();
if (local_state) {
@@ -500,10 +500,10 @@ void Browser::InitBrowserWindow() {
}
#endif
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BROWSER_WINDOW_READY,
content::Source<Browser>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
PrefService* local_state = g_browser_process->local_state();
if (local_state && local_state->FindPreference(
@@ -1013,7 +1013,7 @@ void Browser::OnWindowClosing() {
tab_restore_service->BrowserClosing(tab_restore_service_delegate());
// TODO(sky): convert session/tab restore to use notification.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BROWSER_CLOSING,
content::Source<Browser>(this),
content::Details<bool>(&exiting));
@@ -1321,10 +1321,10 @@ void Browser::WindowFullscreenStateChanged() {
}
void Browser::NotifyFullscreenChange() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
content::Source<Browser>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
///////////////////////////////////////////////////////////////////////////////
@@ -3201,10 +3201,10 @@ void Browser::TabInsertedAt(TabContentsWrapper* contents,
void Browser::TabClosingAt(TabStripModel* tab_strip_model,
TabContentsWrapper* contents,
int index) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_TAB_CLOSING,
content::Source<NavigationController>(&contents->controller()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
// Sever the TabContents' connection back to us.
SetAsDelegate(contents, NULL);
@@ -3584,10 +3584,10 @@ void Browser::TabContentsFocused(TabContents* tab_content) {
}
bool Browser::TakeFocus(bool reverse) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_FOCUS_RETURNED_TO_BROWSER,
content::Source<Browser>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
return false;
}
@@ -5270,11 +5270,11 @@ bool Browser::OpenInstant(WindowOpenDisposition disposition) {
}
if (disposition == CURRENT_TAB) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_INSTANT_COMMITTED,
content::Source<TabContentsWrapper>(instant()->CommitCurrentPreview(
INSTANT_COMMIT_PRESSED_ENTER)),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
return true;
}
if (disposition == NEW_FOREGROUND_TAB) {
@@ -5290,10 +5290,10 @@ bool Browser::OpenInstant(WindowOpenDisposition disposition) {
instant()->last_transition_type(),
TabStripModel::ADD_ACTIVE);
instant()->CompleteRelease(preview_contents);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_INSTANT_COMMITTED,
content::Source<TabContentsWrapper>(preview_contents),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
return true;
}
// The omnibox currently doesn't use other dispositions, so we don't attempt
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index 02bbd56..9ddb466 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -40,6 +40,7 @@
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/common/page_transition_types.h"
#include "content/public/common/url_constants.h"
@@ -299,7 +300,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, CancelBeforeUnloadResetsURL) {
ui_test_utils::WindowedNotificationObserver host_destroyed_observer(
content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Cancel the dialog.
AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog();
@@ -380,10 +381,10 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NullOpenerRedirectForksProcess) {
ui_test_utils::WindowedNotificationObserver popup_observer(
content::NOTIFICATION_TAB_ADDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ui_test_utils::WindowedNotificationObserver nav_observer(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
oldtab->render_view_host()->
ExecuteJavascriptInWebFrame(string16(), ASCIIToUTF16(redirect_popup));
@@ -413,10 +414,10 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NullOpenerRedirectForksProcess) {
ui_test_utils::WindowedNotificationObserver popup_observer2(
content::NOTIFICATION_TAB_ADDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ui_test_utils::WindowedNotificationObserver nav_observer2(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
oldtab->render_view_host()->
ExecuteJavascriptInWebFrame(string16(), ASCIIToUTF16(refresh_popup));
@@ -465,10 +466,10 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, OtherRedirectsDontForkProcess) {
ui_test_utils::WindowedNotificationObserver popup_observer(
content::NOTIFICATION_TAB_ADDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ui_test_utils::WindowedNotificationObserver nav_observer(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
oldtab->render_view_host()->
ExecuteJavascriptInWebFrame(string16(), ASCIIToUTF16(dont_fork_popup));
@@ -494,7 +495,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, OtherRedirectsDontForkProcess) {
ui_test_utils::WindowedNotificationObserver nav_observer2(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
oldtab->render_view_host()->
ExecuteJavascriptInWebFrame(string16(), ASCIIToUTF16(navigate_str));
nav_observer2.Wait();
@@ -824,7 +825,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_TestNewTabExitsFullscreen) {
{
ui_test_utils::WindowedNotificationObserver fullscreen_observer(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->ToggleFullscreenModeForTab(fullscreen_tab, true);
fullscreen_observer.Wait();
ASSERT_TRUE(browser()->window()->IsFullscreen());
@@ -833,7 +834,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_TestNewTabExitsFullscreen) {
{
ui_test_utils::WindowedNotificationObserver fullscreen_observer(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
AddTabAtIndex(
1, GURL(chrome::kAboutBlankURL), content::PAGE_TRANSITION_TYPED);
fullscreen_observer.Wait();
@@ -860,7 +861,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_TestTabExitsItselfFromFullscreen) {
{
ui_test_utils::WindowedNotificationObserver fullscreen_observer(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->ToggleFullscreenModeForTab(fullscreen_tab, true);
fullscreen_observer.Wait();
ASSERT_TRUE(browser()->window()->IsFullscreen());
@@ -869,7 +870,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_TestTabExitsItselfFromFullscreen) {
{
ui_test_utils::WindowedNotificationObserver fullscreen_observer(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->ToggleFullscreenModeForTab(fullscreen_tab, false);
fullscreen_observer.Wait();
ASSERT_FALSE(browser()->window()->IsFullscreen());
@@ -896,7 +897,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_TestFullscreenBubbleMouseLockState) {
{
ui_test_utils::WindowedNotificationObserver fullscreen_observer(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->ToggleFullscreenModeForTab(fullscreen_tab, true);
fullscreen_observer.Wait();
ASSERT_TRUE(browser()->window()->IsFullscreen());
@@ -927,7 +928,7 @@ IN_PROC_BROWSER_TEST_F(
{
ui_test_utils::WindowedNotificationObserver fullscreen_observer(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
EXPECT_FALSE(browser()->window()->IsFullscreen());
EXPECT_FALSE(browser()->window()->InPresentationMode());
browser()->ToggleFullscreenModeForTab(fullscreen_tab, true);
@@ -939,7 +940,7 @@ IN_PROC_BROWSER_TEST_F(
{
ui_test_utils::WindowedNotificationObserver fullscreen_observer(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->TogglePresentationMode(false);
fullscreen_observer.Wait();
ASSERT_FALSE(browser()->window()->IsFullscreen());
@@ -951,7 +952,7 @@ IN_PROC_BROWSER_TEST_F(
// on Lion.
ui_test_utils::WindowedNotificationObserver fullscreen_observer(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->ToggleFullscreenMode(false);
fullscreen_observer.Wait();
ASSERT_TRUE(browser()->window()->IsFullscreen());
diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc
index 244b3b1..416784d 100644
--- a/chrome/browser/ui/browser_list.cc
+++ b/chrome/browser/ui/browser_list.cc
@@ -22,7 +22,7 @@
#include "content/browser/tab_contents/navigation_details.h"
#include "content/common/result_codes.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#if defined(OS_MACOSX)
#include "chrome/browser/chrome_browser_application_mac.h"
@@ -48,7 +48,7 @@ class BrowserActivityObserver : public content::NotificationObserver {
public:
BrowserActivityObserver() {
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
~BrowserActivityObserver() {}
@@ -248,10 +248,10 @@ void BrowserList::AddBrowser(Browser* browser) {
if (!activity_observer)
activity_observer = new BrowserActivityObserver;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BROWSER_OPENED,
content::Source<Browser>(browser),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
// Send out notifications after add has occurred. Do some basic checking to
// try to catch evil observers that change the list from under us.
@@ -269,10 +269,10 @@ void BrowserList::MarkAsCleanShutdown() {
}
void BrowserList::AttemptExitInternal() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_APP_EXITING,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
#if !defined(OS_MACOSX)
// On most platforms, closing all windows causes the application to exit.
@@ -293,10 +293,10 @@ void BrowserList::NotifyAndTerminate(bool fast_path) {
#endif
if (fast_path) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_APP_TERMINATING,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
}
#if defined(OS_CHROMEOS)
@@ -327,7 +327,7 @@ void BrowserList::RemoveBrowser(Browser* browser) {
// simply ignore the behavior on the Mac outside of unit tests.
// TODO(andybons): Fix the UI tests to Do The Right Thing.
bool closing_last_browser = (browsers_.size() == 1);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BROWSER_CLOSED,
content::Source<Browser>(browser),
content::Details<bool>(&closing_last_browser));
@@ -360,10 +360,10 @@ void BrowserList::RemoveBrowser(Browser* browser) {
// to call ProfileManager::ShutdownSessionServices() as part of the
// shutdown, because Browser::WindowClosing() already makes sure that the
// SessionService is created and notified.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_APP_TERMINATING,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
AllBrowsersClosedAndAppExiting();
}
}
@@ -524,16 +524,16 @@ static void TimeLimitedSessionEnding() {
static bool already_ended = false;
// We may get called in the middle of shutdown, e.g. http://crbug.com/70852
// In this case, do nothing.
- if (already_ended || !NotificationService::current())
+ if (already_ended || !content::NotificationService::current())
return;
already_ended = true;
browser_shutdown::OnShutdownStarting(browser_shutdown::END_SESSION);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_APP_EXITING,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
// Write important data first.
g_browser_process->EndSession();
@@ -542,10 +542,10 @@ static void TimeLimitedSessionEnding() {
// Send out notification. This is used during testing so that the test harness
// can properly shutdown before we exit.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_SESSION_END,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
// And shutdown.
browser_shutdown::Shutdown();
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index 60b0e5a..f12a381 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -33,6 +33,7 @@
#include "content/browser/browser_url_handler.h"
#include "content/browser/site_instance.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "net/http/http_util.h"
namespace {
@@ -565,7 +566,7 @@ void Navigate(NavigateParams* params) {
}
if (params->disposition != CURRENT_TAB) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_TAB_ADDED,
content::Source<TabContentsDelegate>(params->browser),
content::Details<TabContents>(params->target_contents->tab_contents()));
diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc
index 2ac3d38..1dbb518 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.cc
+++ b/chrome/browser/ui/browser_navigator_browsertest.cc
@@ -20,6 +20,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
namespace {
@@ -137,7 +138,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_SingletonTabExisting) {
// As the registrar object goes out of scope, this will get unregistered
registrar.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->AddSelectedTabWithURL(
singleton_url1, content::PAGE_TRANSITION_LINK);
@@ -922,7 +923,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
params.disposition = OFF_THE_RECORD;
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser::Navigate(&params);
observer.Wait();
}
@@ -989,7 +991,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
NavigateFromDefaultToOptionsInSameTab) {
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenOptionsDialog();
observer.Wait();
}
@@ -1006,7 +1009,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenOptionsDialog();
observer.Wait();
}
@@ -1026,7 +1030,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenOptionsDialog();
observer.Wait();
}
@@ -1045,7 +1050,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenOptionsDialog();
observer.Wait();
}
@@ -1058,7 +1064,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
NavigateFromNTPToOptionsSingleton) {
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenOptionsDialog();
observer.Wait();
}
@@ -1069,7 +1076,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenOptionsDialog();
observer.Wait();
}
@@ -1082,7 +1090,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
NavigateFromNTPToOptionsPageInSameTab) {
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->ShowOptionsTab(chrome::kPersonalOptionsSubPage);
observer.Wait();
}
@@ -1095,7 +1104,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->ShowOptionsTab(chrome::kPersonalOptionsSubPage);
observer.Wait();
}
@@ -1108,13 +1118,15 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
NavigateFromOtherTabToSingletonOptions) {
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenOptionsDialog();
observer.Wait();
}
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->AddSelectedTabWithURL(
GetGoogleURL(), content::PAGE_TRANSITION_LINK);
observer.Wait();
@@ -1122,7 +1134,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenOptionsDialog();
observer.Wait();
}
@@ -1173,7 +1186,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
NavigateFromDefaultToHistoryInSameTab) {
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->ShowHistoryTab();
observer.Wait();
}
@@ -1186,7 +1200,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
NavigateFromDefaultToBookmarksInSameTab) {
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenBookmarkManager();
observer.Wait();
}
@@ -1199,7 +1214,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
NavigateFromDefaultToDownloadsInSameTab) {
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->ShowDownloadsTab();
observer.Wait();
}
diff --git a/chrome/browser/ui/cocoa/base_bubble_controller.mm b/chrome/browser/ui/cocoa/base_bubble_controller.mm
index 168fa71..0a7b509 100644
--- a/chrome/browser/ui/cocoa/base_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/base_bubble_controller.mm
@@ -11,7 +11,7 @@
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -28,7 +28,7 @@ class Bridge : public content::NotificationObserver {
public:
explicit Bridge(BaseBubbleController* controller) : controller_(controller) {
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_HIDDEN,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
// content::NotificationObserver:
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
index 201f852..28dcab6 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
@@ -14,7 +14,7 @@
#include "content/browser/user_metrics.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util_mac.h"
@@ -41,9 +41,9 @@ BookmarkBubbleNotificationBridge::BookmarkBubbleNotificationBridge(
// registrar_ will automatically RemoveAll() when destroyed so we
// don't need to do so explicitly.
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_TAB_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
// At this time all notifications instigate the same behavior (go
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm
index 641e2b5..fd09f81 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm
@@ -11,7 +11,7 @@
#include "chrome/browser/ui/cocoa/browser_window_controller.h"
#include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
#import "chrome/browser/ui/cocoa/info_bubble_window.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
#import "testing/gtest_mac.h"
#include "testing/platform_test.h"
@@ -472,10 +472,10 @@ TEST_F(BookmarkBubbleControllerTest, BubbleGoesAwayOnNewTab) {
// are "just enough" to run tests without being complete. Instead
// we fake the notification that would be triggered by a tab
// creation. See TabContents::NotifyConnected().
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
content::Source<TabContents>(NULL),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
// Confirm bubble going bye-bye.
EXPECT_TRUE(IsWindowClosing());
diff --git a/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm b/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
index 42192f6..0e05ef4 100644
--- a/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
+++ b/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
@@ -16,7 +16,7 @@
#import "chrome/browser/ui/cocoa/image_utils.h"
#import "chrome/browser/ui/cocoa/menu_controller.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/resource/resource_bundle.h"
@@ -40,7 +40,7 @@ class Observer : public content::NotificationObserver {
public:
Observer(AvatarButtonController* button) : button_(button) {
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
// NotificationObserver:
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
index 9038022..3980096 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -42,7 +42,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/notification_details.h"
#include "grit/chromium_strings.h"
diff --git a/chrome/browser/ui/cocoa/history_menu_bridge.mm b/chrome/browser/ui/cocoa/history_menu_bridge.mm
index 56eae82..93c7003 100644
--- a/chrome/browser/ui/cocoa/history_menu_bridge.mm
+++ b/chrome/browser/ui/cocoa/history_menu_bridge.mm
@@ -20,7 +20,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
diff --git a/chrome/browser/ui/cocoa/info_bubble_window.mm b/chrome/browser/ui/cocoa/info_bubble_window.mm
index 044055a..aa4b5c9 100644
--- a/chrome/browser/ui/cocoa/info_bubble_window.mm
+++ b/chrome/browser/ui/cocoa/info_bubble_window.mm
@@ -9,7 +9,7 @@
#include "base/memory/scoped_nsobject.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
@@ -34,7 +34,7 @@ class AppNotificationBridge : public content::NotificationObserver {
public:
explicit AppNotificationBridge(InfoBubbleWindow* owner) : owner_(owner) {
registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
// Overridden from content::NotificationObserver.
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index 17aa6b9..400078e 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -49,7 +49,7 @@
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "net/base/net_util.h"
@@ -105,7 +105,7 @@ LocationBarViewMac::LocationBarViewMac(
registrar_.Add(this,
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
edit_bookmarks_enabled_.Init(prefs::kEditBookmarksEnabled,
profile_->GetPrefs(), this);
@@ -184,10 +184,10 @@ void LocationBarViewMac::UpdatePageActions() {
RefreshPageActionDecorations();
Layout();
if (page_action_decorations_.size() != count_before) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
content::Source<LocationBar>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
}
@@ -196,10 +196,10 @@ void LocationBarViewMac::InvalidatePageActions() {
DeletePageActionDecorations();
Layout();
if (page_action_decorations_.size() != count_before) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
content::Source<LocationBar>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
}
diff --git a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
index 00c19b9..268132d 100644
--- a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
@@ -18,7 +18,7 @@
#include "chrome/common/extensions/extension_action.h"
#include "chrome/common/extensions/extension_resource.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "skia/ext/skia_utils_mac.h"
namespace {
@@ -186,7 +186,7 @@ void PageActionDecoration::UpdateVisibility(TabContents* contents,
if (IsVisible() != visible) {
SetVisible(visible);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
content::Source<ExtensionAction>(page_action_),
content::Details<TabContents>(contents));
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index fe4dead..5da896c 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -55,7 +55,6 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
diff --git a/chrome/browser/ui/cocoa/theme_install_bubble_view.mm b/chrome/browser/ui/cocoa/theme_install_bubble_view.mm
index 60d433e..ae97124 100644
--- a/chrome/browser/ui/cocoa/theme_install_bubble_view.mm
+++ b/chrome/browser/ui/cocoa/theme_install_bubble_view.mm
@@ -6,9 +6,10 @@
#import "chrome/browser/ui/cocoa/theme_install_bubble_view.h"
+#include "base/logging.h"
#include "base/memory/scoped_nsobject.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util_mac.h"
@@ -64,27 +65,27 @@ ThemeInstallBubbleView::ThemeInstallBubbleView(NSWindow* window)
registrar_.Add(
this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
// Close when we are installing an extension, not a theme.
registrar_.Add(
this,
chrome::NOTIFICATION_NO_THEME_DETECTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_INSTALLED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Don't let the bubble overlap the confirm dialog.
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_WILL_SHOW_CONFIRM_DIALOG,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Add the view.
[cocoa_view_ setFrame:parent_bounds];
diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
index 342dd89..a5f5f68 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
@@ -49,7 +49,7 @@
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_observer.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -104,7 +104,7 @@ class NotificationBridge : public content::NotificationObserver {
explicit NotificationBridge(ToolbarController* controller)
: controller_(controller) {
registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED,
content::Source<Profile>([controller browser]->profile()));
}
diff --git a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
index afcbd19..bd4b9c1 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
+++ b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
@@ -21,7 +21,7 @@
#include "chrome/browser/profiles/profile.h"
#include "content/browser/user_metrics.h"
#include "content/public/browser/notification_observer.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/chromium_strings.h"
@@ -64,8 +64,9 @@ class ZoomLevelObserver : public content::NotificationObserver {
public:
explicit ZoomLevelObserver(WrenchMenuController* controller)
: controller_(controller) {
- registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
- NotificationService::AllBrowserContextsAndSources());
+ registrar_.Add(
+ this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
+ content::NotificationService::AllBrowserContextsAndSources());
}
void Observe(int type,
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
index 5c7ffd3..65833ac 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -23,7 +23,7 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "net/base/net_util.h"
#include "ui/base/l10n/l10n_util.h"
@@ -327,11 +327,11 @@ class ContentSettingCookiesBubbleModel : public ContentSettingSingleRadioGroup {
virtual void OnCustomLinkClicked() OVERRIDE {
if (!tab_contents())
return;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN,
content::Source<TabSpecificContentSettings>(
tab_contents()->content_settings()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
browser()->ShowCollectedCookiesDialog(tab_contents());
}
};
diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
index a0966ec..3341305 100644
--- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
+++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
@@ -21,6 +21,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "net/test/test_server.h"
#include "ui/base/keycodes/keyboard_codes.h"
@@ -1061,7 +1062,8 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_NoIncognitoPrepopulate) {
Profile* incognito_profile = browser()->profile()->GetOffTheRecordProfile();
Browser* incognito_browser = Browser::Create(incognito_profile);
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
incognito_browser->AddSelectedTabWithURL(
url, content::PAGE_TRANSITION_START_PAGE);
observer.Wait();
@@ -1120,7 +1122,8 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FitWindow) {
params.initial_bounds = gfx::Rect(0, 0, 250, 500);
Browser* popup = Browser::CreateWithParams(params);
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
popup->AddSelectedTabWithURL(GURL(chrome::kAboutBlankURL),
content::PAGE_TRANSITION_LINK);
// Wait for the page to finish loading.
diff --git a/chrome/browser/ui/find_bar/find_tab_helper.cc b/chrome/browser/ui/find_bar/find_tab_helper.cc
index 3fff646..96c442a 100644
--- a/chrome/browser/ui/find_bar/find_tab_helper.cc
+++ b/chrome/browser/ui/find_bar/find_tab_helper.cc
@@ -11,7 +11,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/view_message_enums.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h"
@@ -146,7 +146,7 @@ void FindTabHelper::HandleFindReply(int request_id,
last_search_result_ = FindNotificationDetails(
request_id, number_of_matches, selection, active_match_ordinal,
final_update);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_FIND_RESULT_AVAILABLE,
content::Source<TabContents>(tab_contents()),
content::Details<FindNotificationDetails>(&last_search_result_));
diff --git a/chrome/browser/ui/global_error_service.cc b/chrome/browser/ui/global_error_service.cc
index 30a4b7bb..3e47cc8 100644
--- a/chrome/browser/ui/global_error_service.cc
+++ b/chrome/browser/ui/global_error_service.cc
@@ -9,7 +9,7 @@
#include "base/stl_util.h"
#include "chrome/browser/ui/global_error.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
GlobalErrorService::GlobalErrorService(Profile* profile) : profile_(profile) {
}
@@ -60,7 +60,7 @@ GlobalError* GlobalErrorService::GetFirstGlobalErrorWithBubbleView() const {
}
void GlobalErrorService::NotifyErrorsChanged(GlobalError* error) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED,
content::Source<Profile>(profile_),
content::Details<GlobalError>(error));
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
index 4bf68e7..b9c15f2 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
@@ -38,7 +38,8 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/ui_resources.h"
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc
index 395f929b..861e57e 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
index 3a148a8..2ae7d51 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
@@ -24,7 +24,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/gtk/gtk_hig_constants.h"
#include "ui/base/l10n/l10n_util.h"
@@ -59,10 +59,10 @@ void BookmarkBubbleGtk::BubbleClosing(BubbleGtk* bubble,
apply_edits_ = false;
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_BUBBLE_HIDDEN,
content::Source<Profile>(profile_->GetOriginalProfile()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void BookmarkBubbleGtk::Observe(int type,
diff --git a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
index 6209bf9..35b3ac0 100644
--- a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
@@ -32,7 +32,6 @@
#include "chrome/common/extensions/extension_action.h"
#include "chrome/common/extensions/extension_resource.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/ui/gtk/browser_titlebar.cc b/chrome/browser/ui/gtk/browser_titlebar.cc
index 87a0f79..ae2b935 100644
--- a/chrome/browser/ui/gtk/browser_titlebar.cc
+++ b/chrome/browser/ui/gtk/browser_titlebar.cc
@@ -41,7 +41,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
@@ -336,7 +336,7 @@ void BrowserTitlebar::Init() {
avatar_button_.reset(new AvatarMenuButtonGtk(browser_window_->browser()));
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
#if defined(USE_GCONF)
// Either read the gconf database and register for updates (on GNOME), or use
diff --git a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
index 1380dc2..17df62c 100644
--- a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
@@ -44,7 +44,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -102,7 +102,7 @@ BrowserToolbarGtk::BrowserToolbarGtk(Browser* browser, BrowserWindowGtk* window)
registrar_.Add(this,
chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this,
chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED,
content::Source<Profile>(browser_->profile()));
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc
index dd196c0..674b6e1 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc
@@ -84,7 +84,7 @@
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -1529,10 +1529,10 @@ bool BrowserWindowGtk::CanClose() const {
}
// Empty TabStripModel, it's now safe to allow the Window to be closed.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_WINDOW_CLOSED,
content::Source<GtkWindow>(window_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
return true;
}
diff --git a/chrome/browser/ui/gtk/bubble/bubble_gtk.cc b/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
index 3a3962a..089dae6 100644
--- a/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "ui/base/gtk/gtk_hig_constants.h"
#include "ui/base/gtk/gtk_windowing.h"
#include "ui/gfx/gtk_util.h"
diff --git a/chrome/browser/ui/gtk/custom_button.cc b/chrome/browser/ui/gtk/custom_button.cc
index 1d7f8e4..0e0bfef 100644
--- a/chrome/browser/ui/gtk/custom_button.cc
+++ b/chrome/browser/ui/gtk/custom_button.cc
@@ -5,12 +5,13 @@
#include "chrome/browser/ui/gtk/custom_button.h"
#include "base/basictypes.h"
+#include "base/logging.h"
#include "chrome/browser/ui/gtk/cairo_cached_surface.h"
#include "chrome/browser/ui/gtk/gtk_chrome_button.h"
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/theme_resources_standard.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/ui/gtk/download/download_item_gtk.cc b/chrome/browser/ui/gtk/download/download_item_gtk.cc
index 4449d5c..38bfa84 100644
--- a/chrome/browser/ui/gtk/download/download_item_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_item_gtk.cc
@@ -24,7 +24,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/download/download_item.h"
#include "content/browser/download/download_manager.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "third_party/skia/include/core/SkBitmap.h"
diff --git a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
index 713ddf8..68e5cfa 100644
--- a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
@@ -20,7 +20,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/download/download_item.h"
#include "content/browser/download/download_stats.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
diff --git a/chrome/browser/ui/gtk/find_bar_gtk.cc b/chrome/browser/ui/gtk/find_bar_gtk.cc
index 1513267..2a4337b 100644
--- a/chrome/browser/ui/gtk/find_bar_gtk.cc
+++ b/chrome/browser/ui/gtk/find_bar_gtk.cc
@@ -34,7 +34,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/ui/gtk/global_history_menu.cc b/chrome/browser/ui/gtk/global_history_menu.cc
index 7028c3ba..d075b1a 100644
--- a/chrome/browser/ui/gtk/global_history_menu.cc
+++ b/chrome/browser/ui/gtk/global_history_menu.cc
@@ -23,7 +23,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/url_constants.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "ui/base/gtk/owned_widget_gtk.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/gtk/global_menu_bar.cc b/chrome/browser/ui/gtk/global_menu_bar.cc
index 2840f32..3639dde 100644
--- a/chrome/browser/ui/gtk/global_menu_bar.cc
+++ b/chrome/browser/ui/gtk/global_menu_bar.cc
@@ -17,7 +17,6 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/ui/gtk/gtk_theme_service.cc b/chrome/browser/ui/gtk/gtk_theme_service.cc
index 17c5341..f90aa9c 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.cc
+++ b/chrome/browser/ui/gtk/gtk_theme_service.cc
@@ -27,7 +27,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "grit/theme_resources.h"
@@ -338,7 +338,7 @@ bool GtkThemeService::HasCustomImage(int id) const {
void GtkThemeService::InitThemesFor(NotificationObserver* observer) {
observer->Observe(chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
content::Source<ThemeService>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void GtkThemeService::SetTheme(const Extension* extension) {
diff --git a/chrome/browser/ui/gtk/infobars/infobar_gtk.cc b/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
index e0a2db6..eb22a33 100644
--- a/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
+++ b/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "ui/base/gtk/gtk_expanded_container.h"
#include "ui/base/gtk/gtk_hig_constants.h"
#include "ui/base/gtk/gtk_signal_registrar.h"
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index 3b39f4e..c6f0dd6 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -54,7 +54,7 @@
#include "chrome/common/extensions/extension_resource.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
@@ -553,7 +553,7 @@ void LocationBarViewGtk::OnSetFocus() {
Profile* profile = browser_->profile();
AccessibilityTextBoxInfo info(profile,
l10n_util::GetStringUTF8(IDS_ACCNAME_LOCATION), false);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED,
content::Source<Profile>(profile),
content::Details<AccessibilityTextBoxInfo>(&info));
@@ -659,10 +659,10 @@ void LocationBarViewGtk::UpdatePageActions() {
gtk_box_pack_end(GTK_BOX(page_action_hbox_.get()),
page_action_views_[i]->widget(), FALSE, FALSE, 0);
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
content::Source<LocationBar>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
TabContents* contents = GetTabContents();
@@ -685,10 +685,10 @@ void LocationBarViewGtk::InvalidatePageActions() {
size_t count_before = page_action_views_.size();
page_action_views_.reset();
if (page_action_views_.size() != count_before) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
content::Source<LocationBar>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
}
@@ -1535,7 +1535,7 @@ void LocationBarViewGtk::PageActionViewGtk::UpdateVisibility(
gtk_widget_hide_all(event_box_.get());
if (visible != old_visible) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
content::Source<ExtensionAction>(page_action_),
content::Details<TabContents>(contents));
diff --git a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
index 9aa37a8..b49f72c 100644
--- a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
+++ b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
@@ -32,8 +32,6 @@
#include "chrome/common/extensions/extension.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#include "content/common/notification_service.h"
-#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc b/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc
index 2d875c5..5cf9267 100644
--- a/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc
+++ b/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc
@@ -26,7 +26,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/omnibox/omnibox_view.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/theme_resources.h"
#include "ui/base/gtk/gtk_hig_constants.h"
#include "ui/base/gtk/gtk_windowing.h"
diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc
index af059c2..2768926 100644
--- a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc
+++ b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc
@@ -26,7 +26,7 @@
#include "chrome/browser/ui/toolbar/toolbar_model.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
#include "net/base/escape.h"
diff --git a/chrome/browser/ui/gtk/overflow_button.cc b/chrome/browser/ui/gtk/overflow_button.cc
index 9f31401..ae2137a 100644
--- a/chrome/browser/ui/gtk/overflow_button.cc
+++ b/chrome/browser/ui/gtk/overflow_button.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/theme_resources.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/ui/gtk/status_bubble_gtk.cc b/chrome/browser/ui/gtk/status_bubble_gtk.cc
index 30fb60c..f081ff7 100644
--- a/chrome/browser/ui/gtk/status_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/status_bubble_gtk.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/ui/gtk/rounded_window.h"
#include "chrome/browser/ui/gtk/slide_animator_gtk.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/gtk/gtk_hig_constants.h"
#include "ui/base/text/text_elider.h"
diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
index 84d3300c..8867d75 100644
--- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
@@ -20,7 +20,7 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
index a14ea30..cbd8618 100644
--- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
@@ -27,7 +27,7 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
#include "grit/ui_resources.h"
diff --git a/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc b/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc
index 8c4b766..ba964db 100644
--- a/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc
+++ b/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/gtk/rounded_window.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/gtk/gtk_hig_constants.h"
#include "ui/base/gtk/gtk_screen_utils.h"
@@ -60,27 +60,27 @@ ThemeInstallBubbleViewGtk::ThemeInstallBubbleViewGtk(GtkWidget* parent)
registrar_.Add(
this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
// Close when we are installing an extension, not a theme.
registrar_.Add(
this,
chrome::NOTIFICATION_NO_THEME_DETECTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_INSTALLED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Don't let the bubble overlap the confirm dialog.
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_WILL_SHOW_CONFIRM_DIALOG,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ThemeInstallBubbleViewGtk::~ThemeInstallBubbleViewGtk() {
diff --git a/chrome/browser/ui/login/login_prompt.cc b/chrome/browser/ui/login/login_prompt.cc
index 8e11439..0e5135e 100644
--- a/chrome/browser/ui/login/login_prompt.cc
+++ b/chrome/browser/ui/login/login_prompt.cc
@@ -21,7 +21,7 @@
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "net/base/auth.h"
#include "net/base/net_util.h"
@@ -195,18 +195,20 @@ void LoginHandler::AddObservers() {
// This is probably OK; we need to listen to everything and we break out of
// the Observe() if we aren't handling the same auth_info().
registrar_.Add(this, chrome::NOTIFICATION_AUTH_SUPPLIED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, chrome::NOTIFICATION_AUTH_CANCELLED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
void LoginHandler::RemoveObservers() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- registrar_.Remove(this, chrome::NOTIFICATION_AUTH_SUPPLIED,
- NotificationService::AllBrowserContextsAndSources());
- registrar_.Remove(this, chrome::NOTIFICATION_AUTH_CANCELLED,
- NotificationService::AllBrowserContextsAndSources());
+ registrar_.Remove(
+ this, chrome::NOTIFICATION_AUTH_SUPPLIED,
+ content::NotificationService::AllBrowserContextsAndSources());
+ registrar_.Remove(
+ this, chrome::NOTIFICATION_AUTH_CANCELLED,
+ content::NotificationService::AllBrowserContextsAndSources());
DCHECK(registrar_.IsEmpty());
}
@@ -265,7 +267,8 @@ void LoginHandler::NotifyAuthNeeded() {
if (WasAuthHandled())
return;
- NotificationService* service = NotificationService::current();
+ content::NotificationService* service =
+ content::NotificationService::current();
NavigationController* controller = NULL;
TabContents* requesting_contents = GetTabContentsForLogin();
@@ -283,7 +286,8 @@ void LoginHandler::NotifyAuthCancelled() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(WasAuthHandled());
- NotificationService* service = NotificationService::current();
+ content::NotificationService* service =
+ content::NotificationService::current();
NavigationController* controller = NULL;
TabContents* requesting_contents = GetTabContentsForLogin();
@@ -306,7 +310,8 @@ void LoginHandler::NotifyAuthSupplied(const string16& username,
if (!requesting_contents)
return;
- NotificationService* service = NotificationService::current();
+ content::NotificationService* service =
+ content::NotificationService::current();
NavigationController* controller = &requesting_contents->controller();
AuthSuppliedLoginNotificationDetails details(this, username, password);
diff --git a/chrome/browser/ui/login/login_prompt_browsertest.cc b/chrome/browser/ui/login/login_prompt_browsertest.cc
index 09821f3..528edfd 100644
--- a/chrome/browser/ui/login/login_prompt_browsertest.cc
+++ b/chrome/browser/ui/login/login_prompt_browsertest.cc
@@ -16,7 +16,8 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "net/base/auth.h"
#include "net/base/mock_host_resolver.h"
diff --git a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
index 850ddca..718f89b 100644
--- a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
+++ b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
@@ -32,7 +32,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/base/mock_host_resolver.h"
#include "ui/base/events.h"
#include "ui/base/keycodes/keyboard_codes.h"
@@ -229,7 +229,7 @@ class OmniboxViewTest : public InProcessBrowserTest,
(tab_count < expected_tab_count ?
content::NOTIFICATION_TAB_PARENTED :
content::NOTIFICATION_TAB_CLOSED),
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
while (!HasFailure() && browser->tab_count() != expected_tab_count)
ui_test_utils::RunMessageLoop();
diff --git a/chrome/browser/ui/panels/base_panel_browser_test.cc b/chrome/browser/ui/panels/base_panel_browser_test.cc
index 187298d..08a2a80 100644
--- a/chrome/browser/ui/panels/base_panel_browser_test.cc
+++ b/chrome/browser/ui/panels/base_panel_browser_test.cc
@@ -18,6 +18,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/test_tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/common/url_constants.h"
#if defined(OS_MACOSX)
@@ -246,7 +247,7 @@ Panel* BasePanelBrowserTest::CreatePanelWithParams(
} else {
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
panel_browser->AddSelectedTabWithURL(params.url,
content::PAGE_TRANSITION_START_PAGE);
observer.Wait();
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index 74e1f1a..246636e 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -17,6 +17,7 @@
#include "chrome/common/extensions/extension.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "ui/gfx/rect.h"
diff --git a/chrome/browser/ui/panels/panel_browser_view.cc b/chrome/browser/ui/panels/panel_browser_view.cc
index 746e47c..de26f11 100644
--- a/chrome/browser/ui/panels/panel_browser_view.cc
+++ b/chrome/browser/ui/panels/panel_browser_view.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/ui/webui/task_manager_dialog.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/l10n/l10n_util.h"
@@ -176,10 +176,10 @@ void PanelBrowserView::OnWidgetActivationChanged(views::Widget* widget,
StopDrawingAttention();
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
content::Source<Panel>(panel()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
bool PanelBrowserView::AcceleratorPressed(
@@ -197,10 +197,10 @@ bool PanelBrowserView::AcceleratorPressed(
}
void PanelBrowserView::AnimationEnded(const ui::Animation* animation) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
content::Source<Panel>(panel()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void PanelBrowserView::AnimationProgressed(const ui::Animation* animation) {
diff --git a/chrome/browser/ui/panels/panel_browser_window_gtk.cc b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
index 4c8f9f0..954554c 100644
--- a/chrome/browser/ui/panels/panel_browser_window_gtk.cc
+++ b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/ui/panels/panel_manager.h"
#include "chrome/browser/ui/panels/panel_settings_menu_model.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/dragdrop/gtk_dnd_util.h"
@@ -148,10 +148,10 @@ void PanelBrowserWindowGtk::OnSizeChanged(int width, int height) {
StartBoundsAnimation(gfx::Rect(bounds_.x(), top, width, height));
panel_->OnWindowSizeAvailable();
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_WINDOW_SIZE_KNOWN,
content::Source<Panel>(panel_.get()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
bool PanelBrowserWindowGtk::UseCustomFrame() {
@@ -196,10 +196,10 @@ void PanelBrowserWindowGtk::ActiveWindowChanged(GdkWindow* active_window) {
if (was_active == IsActive()) // State didn't change.
return;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
content::Source<Panel>(panel_.get()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
BrowserWindowGtk::TitleDecoration PanelBrowserWindowGtk::GetWindowTitle(
@@ -428,10 +428,10 @@ void PanelBrowserWindowGtk::DidProcessEvent(GdkEvent* event) {
}
void PanelBrowserWindowGtk::AnimationEnded(const ui::Animation* animation) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
content::Source<Panel>(panel_.get()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void PanelBrowserWindowGtk::AnimationProgressed(
diff --git a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
index 05e0664..b1c07fd 100644
--- a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
+++ b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
@@ -33,7 +33,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/ui_resources.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image.h"
@@ -442,10 +442,10 @@ enum {
if (windowShim_->panel()->expansion_state() == Panel::EXPANDED)
[self enableTabContentsViewAutosizing];
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
content::Source<Panel>(windowShim_->panel()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
- (void)terminateBoundsAnimation {
@@ -512,10 +512,10 @@ enum {
[[self titlebarView] stopDrawingAttention];
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
content::Source<Panel>(windowShim_->panel()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
- (void)windowDidResignKey:(NSNotification*)notification {
@@ -534,10 +534,10 @@ enum {
rwhv->SetActive(false);
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
content::Source<Panel>(windowShim_->panel()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
@end
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
index db38d5d..a862aa4 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
@@ -54,7 +54,7 @@
#include "chrome/common/render_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "grit/platform_locale_settings.h"
@@ -296,9 +296,9 @@ TabContentsWrapper::TabContentsWrapper(TabContents* contents)
omnibox_search_hint_.reset(new OmniboxSearchHint(this));
registrar_.Add(this, chrome::NOTIFICATION_GOOGLE_URL_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_USER_STYLE_SHEET_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
#if defined(OS_POSIX) && !defined(OS_MACOSX)
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
content::Source<ThemeService>(
@@ -615,7 +615,7 @@ void TabContentsWrapper::Observe(int type,
// Internal helpers
void TabContentsWrapper::OnSnapshot(const SkBitmap& bitmap) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_SNAPSHOT_TAKEN,
content::Source<TabContentsWrapper>(this),
content::Details<const SkBitmap>(&bitmap));
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index a884f78..11bddf2 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -35,7 +35,7 @@
#include "chrome/common/profiling.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/chromium_strings.h"
@@ -211,7 +211,7 @@ WrenchMenuModel::WrenchMenuModel(ui::AcceleratorProvider* provider,
this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
content::Source<HostZoomMap>(browser_->profile()->GetHostZoomMap()));
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
WrenchMenuModel::~WrenchMenuModel() {
diff --git a/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc b/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc
index 684ae7a..692def3 100644
--- a/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc
+++ b/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc
@@ -12,7 +12,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "views/controls/button/text_button.h"
#include "views/layout/grid_layout.h"
@@ -160,7 +160,7 @@ TEST_F(AccessibilityEventRouterViewsTest, MAYBE_TestFocusNotification) {
content::NotificationRegistrar registrar;
registrar.Add(this,
chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Switch on accessibility event notifications.
ExtensionAccessibilityEventRouter* accessibility_event_router =
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
index 3fc1553..9333a6f 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -40,7 +40,8 @@
#include "content/browser/tab_contents/page_navigator.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/common/page_transition_types.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
index 1888bf8..7fe3804 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
@@ -22,7 +22,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/base/view_event_test_base.h"
#include "content/browser/tab_contents/page_navigator.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/accessibility/accessibility_types.h"
#include "ui/base/clipboard/clipboard.h"
@@ -479,7 +479,7 @@ class ContextMenuNotificationObserver : public content::NotificationObserver {
: task_(task) {
registrar_.Add(this,
chrome::NOTIFICATION_BOOKMARK_CONTEXT_MENU_SHOWN,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
virtual void Observe(int type,
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
index 1b6ddfb..c887083 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
@@ -17,7 +17,7 @@
#include "chrome/browser/ui/views/bubble/bubble.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/keycodes/keyboard_codes.h"
@@ -103,7 +103,7 @@ void BookmarkBubbleView::Show(views::Widget* parent,
bookmark_bubble_->set_bubble(bubble);
bubble->SizeToContents();
GURL url_ptr(url);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_BUBBLE_SHOWN,
content::Source<Profile>(profile->GetOriginalProfile()),
content::Details<GURL>(&url_ptr));
@@ -317,10 +317,10 @@ void BookmarkBubbleView::BubbleClosing(Bubble* bubble,
if (delegate_)
delegate_->BubbleClosing(bubble, closed_by_escape);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_BUBBLE_HIDDEN,
content::Source<Profile>(profile_->GetOriginalProfile()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
bool BookmarkBubbleView::CloseOnEscape() {
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc b/chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc
index f63b779..0972af4 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "views/controls/menu/menu_item_view.h"
@@ -43,10 +43,10 @@ BookmarkContextMenu::~BookmarkContextMenu() {
}
void BookmarkContextMenu::RunMenuAt(const gfx::Point& point) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_CONTEXT_MENU_SHOWN,
content::Source<BookmarkContextMenu>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
// width/height don't matter here.
if (menu_runner_->RunMenuAt(
parent_widget_, NULL, gfx::Rect(point.x(), point.y(), 0, 0),
diff --git a/chrome/browser/ui/views/bubble/bubble.cc b/chrome/browser/ui/views/bubble/bubble.cc
index 37940db..7745709 100644
--- a/chrome/browser/ui/views/bubble/bubble.cc
+++ b/chrome/browser/ui/views/bubble/bubble.cc
@@ -8,7 +8,6 @@
#include "chrome/browser/ui/views/bubble/border_contents.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/gfx/color_utils.h"
diff --git a/chrome/browser/ui/views/constrained_window_views.cc b/chrome/browser/ui/views/constrained_window_views.cc
index 1bedf82..d48427c 100644
--- a/chrome/browser/ui/views/constrained_window_views.cc
+++ b/chrome/browser/ui/views/constrained_window_views.cc
@@ -19,7 +19,6 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/ui/views/dom_view_browsertest.cc b/chrome/browser/ui/views/dom_view_browsertest.cc
index cfa8e43..9781993 100644
--- a/chrome/browser/ui/views/dom_view_browsertest.cc
+++ b/chrome/browser/ui/views/dom_view_browsertest.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/ui/views/dom_view.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "views/widget/widget.h"
@@ -33,7 +34,7 @@ IN_PROC_BROWSER_TEST_F(DOMViewTest, TestShowAndHide) {
dom_view->Init(browser()->profile(), NULL);
ui_test_utils::WindowedNotificationObserver load_stop_observer(
content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
dom_view->LoadURL(GURL("http://www.google.com"));
load_stop_observer.Wait();
one->Show();
@@ -54,7 +55,7 @@ IN_PROC_BROWSER_TEST_F(DOMViewTest, TestRemoveAndDelete) {
dom_view->Init(browser()->profile(), NULL);
ui_test_utils::WindowedNotificationObserver load_stop_observer(
content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
dom_view->LoadURL(GURL("http://www.google.com"));
load_stop_observer.Wait();
one->Show();
@@ -79,7 +80,7 @@ IN_PROC_BROWSER_TEST_F(DOMViewTest, TestReparent) {
dom_view->Init(browser()->profile(), NULL);
ui_test_utils::WindowedNotificationObserver load_stop_observer(
content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
dom_view->LoadURL(GURL("http://www.google.com"));
load_stop_observer.Wait();
one->Show();
diff --git a/chrome/browser/ui/views/file_manager_dialog_browsertest.cc b/chrome/browser/ui/views/file_manager_dialog_browsertest.cc
index 1a6bed8..38146c1 100644
--- a/chrome/browser/ui/views/file_manager_dialog_browsertest.cc
+++ b/chrome/browser/ui/views/file_manager_dialog_browsertest.cc
@@ -22,6 +22,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/renderer_host/render_view_host.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "webkit/fileapi/file_system_context.h"
#include "webkit/fileapi/file_system_mount_point_provider.h"
@@ -143,7 +144,7 @@ IN_PROC_BROWSER_TEST_F(FileManagerDialogBrowserTest, SelectFileAndCancel) {
// that the window has closed.
ui_test_utils::WindowedNotificationObserver host_destroyed(
content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
RenderViewHost* host = dialog_->GetRenderViewHost();
string16 main_frame;
string16 script = ASCIIToUTF16(
@@ -213,7 +214,7 @@ IN_PROC_BROWSER_TEST_F(FileManagerDialogBrowserTest, SelectFileAndOpen) {
// that the window has closed.
ui_test_utils::WindowedNotificationObserver host_destroyed(
content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
RenderViewHost* host = dialog_->GetRenderViewHost();
string16 main_frame;
string16 script = ASCIIToUTF16(
@@ -279,7 +280,7 @@ IN_PROC_BROWSER_TEST_F(FileManagerDialogBrowserTest, SelectFileAndSave) {
// that the window has closed.
ui_test_utils::WindowedNotificationObserver host_destroyed(
content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
RenderViewHost* host = dialog_->GetRenderViewHost();
string16 main_frame;
string16 script = ASCIIToUTF16(
@@ -340,7 +341,7 @@ IN_PROC_BROWSER_TEST_F(FileManagerDialogBrowserTest,
// that the window has closed.
ui_test_utils::WindowedNotificationObserver host_destroyed(
content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
RenderViewHost* host = dialog_->GetRenderViewHost();
string16 main_frame;
string16 script = ASCIIToUTF16(
diff --git a/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc b/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
index 0408ed0..89c3749 100644
--- a/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
+++ b/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
@@ -16,6 +16,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "net/test/test_server.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/keycodes/keyboard_codes.h"
@@ -163,7 +164,8 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, FocusRestoreOnTabSwitch) {
// Open another tab (tab B).
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->AddSelectedTabWithURL(url, content::PAGE_TRANSITION_TYPED);
observer.Wait();
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 31d8ec6..a268212 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -81,7 +81,7 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/common/content_switches.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -1675,10 +1675,10 @@ bool BrowserView::CanClose() {
}
// Empty TabStripModel, it's now safe to allow the Window to be closed.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_WINDOW_CLOSED,
content::Source<gfx::NativeWindow>(frame_->GetNativeWindow()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
return true;
}
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index febcc68..8086cee 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -21,7 +21,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
@@ -84,7 +84,7 @@ GlassBrowserFrameView::GlassBrowserFrameView(BrowserFrame* frame,
UpdateAvatarInfo();
if (!browser_view_->IsOffTheRecord()) {
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
}
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index dc623fd..d47a170 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -25,7 +25,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -206,7 +206,7 @@ OpaqueBrowserFrameView::OpaqueBrowserFrameView(BrowserFrame* frame,
UpdateAvatarInfo();
if (!browser_view_->IsOffTheRecord()) {
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
#if defined(USE_VIRTUAL_KEYBOARD)
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 82f1119..aefe220 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -43,7 +43,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
@@ -335,10 +335,10 @@ void LocationBarView::UpdatePageActions() {
size_t count_before = page_action_views_.size();
RefreshPageActionViews();
if (page_action_views_.size() != count_before) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
content::Source<LocationBar>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
Layout();
@@ -349,10 +349,10 @@ void LocationBarView::InvalidatePageActions() {
size_t count_before = page_action_views_.size();
DeletePageActionViews();
if (page_action_views_.size() != count_before) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
content::Source<LocationBar>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
}
@@ -995,7 +995,7 @@ void LocationBarView::RefreshPageActionViews() {
ExtensionAction* action = (*i)->image_view()->page_action();
if (old_visibility.find(action) == old_visibility.end() ||
old_visibility[action] != (*i)->IsVisible()) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
content::Source<ExtensionAction>(action),
content::Details<TabContents>(contents));
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index a7b9408..f958484 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -15,7 +15,6 @@
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
#include "net/base/escape.h"
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
index 33cb8a0..0561bfe 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
@@ -33,7 +33,6 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
#include "googleurl/src/url_util.h"
#include "grit/generated_resources.h"
#include "net/base/escape.h"
diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index 6bfd318..0455cbd 100644
--- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -23,7 +23,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "views/controls/menu/menu_item_view.h"
#include "views/controls/menu/menu_model_adapter.h"
#include "views/controls/menu/menu_runner.h"
@@ -140,7 +140,7 @@ BrowserTabStripController::BrowserTabStripController(Browser* browser,
notification_registrar_.Add(this,
chrome::NOTIFICATION_TAB_CLOSEABLE_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
BrowserTabStripController::~BrowserTabStripController() {
diff --git a/chrome/browser/ui/views/theme_install_bubble_view.cc b/chrome/browser/ui/views/theme_install_bubble_view.cc
index d4824d2..edef346 100644
--- a/chrome/browser/ui/views/theme_install_bubble_view.cc
+++ b/chrome/browser/ui/views/theme_install_bubble_view.cc
@@ -7,7 +7,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
@@ -49,27 +49,27 @@ ThemeInstallBubbleView::ThemeInstallBubbleView(TabContents* tab_contents)
registrar_.Add(
this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
// Close when we are installing an extension, not a theme.
registrar_.Add(
this,
chrome::NOTIFICATION_NO_THEME_DETECTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_INSTALLED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Don't let the bubble overlap the confirm dialog.
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_WILL_SHOW_CONFIRM_DIALOG,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
popup_ = new views::Widget;
views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index f51ba3f..106a768 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -23,7 +23,7 @@
#include "chrome/common/pref_names.h"
#include "content/browser/accessibility/browser_accessibility_state.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -115,14 +115,14 @@ ToolbarView::ToolbarView(Browser* browser)
}
registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
#if defined(OS_WIN) && !defined(USE_AURA)
registrar_.Add(this, chrome::NOTIFICATION_CRITICAL_UPGRADE_INSTALLED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
#endif
registrar_.Add(this,
chrome::NOTIFICATION_MODULE_INCOMPATIBILITY_BADGE_CHANGE,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED,
content::Source<Profile>(browser_->profile()));
}
diff --git a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
index de7d612..e69f2b8 100644
--- a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
+++ b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
@@ -21,7 +21,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/site_instance.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/ime/text_input_type.h"
@@ -210,16 +210,16 @@ KeyboardWidget::KeyboardWidget()
views::TextInputTypeTracker::GetInstance()->AddTextInputTypeObserver(this);
registrar_.Add(this,
chrome::NOTIFICATION_FOCUSED_EDITABLE_NODE_TOUCHED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this,
chrome::NOTIFICATION_HIDE_KEYBOARD_INVOKED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this,
chrome::NOTIFICATION_SET_KEYBOARD_HEIGHT_INVOKED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this,
content::NOTIFICATION_APP_TERMINATING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
#if defined(OS_CHROMEOS)
chromeos::input_method::InputMethodManager* manager =
@@ -262,7 +262,7 @@ void KeyboardWidget::ShowKeyboardForWidget(views::Widget* widget) {
Show();
bool visible = true;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_KEYBOARD_VISIBILITY_CHANGED,
content::Source<KeyboardWidget>(this),
content::Details<bool>(&visible));
@@ -276,7 +276,7 @@ void KeyboardWidget::Hide() {
animation_->Hide();
bool visible = false;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_KEYBOARD_VISIBILITY_CHANGED,
content::Source<KeyboardWidget>(this),
content::Details<bool>(&visible));
@@ -328,7 +328,7 @@ void KeyboardWidget::AnimationEnded(const ui::Animation* animation) {
else
keyboard_rect = GetWindowScreenBounds();
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_KEYBOARD_VISIBLE_BOUNDS_CHANGED,
content::Source<KeyboardWidget>(this),
content::Details<gfx::Rect>(&keyboard_rect));
diff --git a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc
index e51e3d8..32d1e66 100644
--- a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc
+++ b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc
@@ -25,7 +25,7 @@ class VirtualKeyboardManagerTest : public InProcessBrowserTest,
void SetupNotificationListener() {
registrar_.Add(this,
chrome::NOTIFICATION_KEYBOARD_VISIBILITY_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
private:
@@ -82,7 +82,7 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardManagerTest, TestVisibility) {
// Open a new tab that does not give focus to a textfield onload.
ui_test_utils::WindowedNotificationObserver load_stop_observer(
content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->AddSelectedTabWithURL(base_url.Resolve("blank.html"),
content::PAGE_TRANSITION_LINK);
load_stop_observer.Wait();
diff --git a/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc b/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc
index 59faec3..c0bfba6 100644
--- a/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc
+++ b/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc
@@ -7,7 +7,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
@@ -19,7 +19,7 @@ class NavigationNotificationObserver : public content::NotificationObserver {
: got_navigation_(false),
http_status_code_(0) {
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
virtual void Observe(int type,
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
index 8948d5a..64c98fa 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
@@ -30,7 +30,7 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "net/base/dnsrr_resolver.h"
#include "ui/base/l10n/l10n_util.h"
@@ -136,7 +136,7 @@ NetworkStateInformer::NetworkStateInformer(WebUI* web_ui) : web_ui_(web_ui) {
cros->AddNetworkManagerObserver(this);
registrar_.Add(this,
chrome::NOTIFICATION_LOGIN_PROXY_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
NetworkStateInformer::~NetworkStateInformer() {
@@ -623,10 +623,10 @@ void SigninScreenHandler::SendUserList(bool animated) {
}
void SigninScreenHandler::HandleLoginWebuiReady(const base::ListValue* args) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_WEBUI_READY,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
}
void SigninScreenHandler::HandleLoginRequestNetworkState(
diff --git a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
index 4509a2f..ab9cc7c 100644
--- a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
@@ -22,7 +22,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -461,16 +461,16 @@ void SimUnlockHandler::EnterCode(const std::string& code,
}
void SimUnlockHandler::NotifyOnEnterPinEnded(bool cancelled) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_ENTER_PIN_ENDED,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
content::Details<bool>(&cancelled));
}
void SimUnlockHandler::NotifyOnRequirePinChangeEnded(bool new_value) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_REQUIRE_PIN_SETTING_CHANGE_ENDED,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
content::Details<bool>(&new_value));
}
diff --git a/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc b/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
index a278ef0..36636fb 100644
--- a/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
+++ b/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
@@ -21,7 +21,7 @@
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/webui/conflicts_ui.cc b/chrome/browser/ui/webui/conflicts_ui.cc
index 4bb477c..979ae3b 100644
--- a/chrome/browser/ui/webui/conflicts_ui.cc
+++ b/chrome/browser/ui/webui/conflicts_ui.cc
@@ -23,7 +23,7 @@
#include "content/browser/user_metrics.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -102,7 +102,7 @@ void ConflictsDOMHandler::RegisterMessages() {
void ConflictsDOMHandler::HandleRequestModuleList(const ListValue* args) {
// This request is handled asynchronously. See Observe for when we reply back.
registrar_.Add(this, chrome::NOTIFICATION_MODULE_LIST_ENUMERATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
EnumerateModulesModel::GetInstance()->ScanNow();
}
diff --git a/chrome/browser/ui/webui/html_dialog_ui.cc b/chrome/browser/ui/webui/html_dialog_ui.cc
index 66c5046..77da852 100644
--- a/chrome/browser/ui/webui/html_dialog_ui.cc
+++ b/chrome/browser/ui/webui/html_dialog_ui.cc
@@ -11,7 +11,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/common/bindings_policy.h"
static base::LazyInstance<PropertyAccessor<HtmlDialogUIDelegate*> >
@@ -68,10 +68,10 @@ void HtmlDialogUI::RenderViewCreated(RenderViewHost* render_view_host) {
AddMessageHandler(*it);
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_HTML_DIALOG_SHOWN,
content::Source<HtmlDialogUI>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void HtmlDialogUI::OnDialogClosed(const ListValue* args) {
diff --git a/chrome/browser/ui/webui/media/media_internals_proxy.cc b/chrome/browser/ui/webui/media/media_internals_proxy.cc
index c532e4e..c04bc0c 100644
--- a/chrome/browser/ui/webui/media/media_internals_proxy.cc
+++ b/chrome/browser/ui/webui/media/media_internals_proxy.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/io_thread.h"
#include "chrome/browser/media/media_internals.h"
#include "chrome/browser/ui/webui/media/media_internals_handler.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/public/browser/notification_types.h"
@@ -27,7 +27,7 @@ MediaInternalsProxy::MediaInternalsProxy()
: ThreadSafeObserverImpl(net::NetLog::LOG_ALL_BUT_BYTES) {
io_thread_ = g_browser_process->io_thread();
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
void MediaInternalsProxy::Observe(int type,
diff --git a/chrome/browser/ui/webui/metrics_handler.cc b/chrome/browser/ui/webui/metrics_handler.cc
index e74edd5..4b9301c 100644
--- a/chrome/browser/ui/webui/metrics_handler.cc
+++ b/chrome/browser/ui/webui/metrics_handler.cc
@@ -15,7 +15,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
using base::ListValue;
@@ -98,7 +98,7 @@ void MetricsHandler::HandleLogEventTime(const ListValue* args) {
} else {
NOTREACHED();
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_METRIC_EVENT_DURATION,
content::Source<TabContents>(tab),
content::Details<MetricEventDurationDetails>(&details));
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index 6f87803..aec33db 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -42,7 +42,7 @@
#include "chrome/common/web_apps.h"
#include "content/browser/disposition_utils.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
@@ -542,7 +542,7 @@ void AppLauncherHandler::HandleGetApps(const ListValue* args) {
pref_change_registrar_.Add(prefs::kNTPAppPageNames, this);
registrar_.Add(this, chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
diff --git a/chrome/browser/ui/webui/ntp/bookmarks_handler.cc b/chrome/browser/ui/webui/ntp/bookmarks_handler.cc
index ca7a866..aa928eda 100644
--- a/chrome/browser/ui/webui/ntp/bookmarks_handler.cc
+++ b/chrome/browser/ui/webui/ntp/bookmarks_handler.cc
@@ -17,7 +17,6 @@
#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
// TODO(csilv):
// Much of this implementation is based on the classes defined in
diff --git a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
index 548234ac..f585889 100644
--- a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
+++ b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
@@ -19,8 +19,7 @@
#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/url_constants.h"
-#include "content/common/notification_service.h"
-#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
namespace browser_sync {
diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
index 300ff34..59f451b 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/web_resource/notification_promo.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -157,8 +157,9 @@ void NewTabPageHandler::DismissIntroMessage(PrefService* prefs) {
}
void NewTabPageHandler::NotifyPromoResourceChanged() {
- NotificationService* service = NotificationService::current();
+ content::NotificationService* service =
+ content::NotificationService::current();
service->Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED,
content::Source<NewTabPageHandler>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
index 5664e2f..4d4a35c 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -46,7 +46,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -138,7 +138,7 @@ void NewTabUI::PaintTimeout() {
// Painting has quieted down. Log this as the full time to run.
base::TimeDelta load_time = last_paint_ - start_;
int load_time_ms = static_cast<int>(load_time.InMilliseconds());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_INITIAL_NEW_TAB_UI_LOAD,
content::Source<Profile>(GetProfile()),
content::Details<int>(&load_time_ms));
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index 955d50b..21a7f27 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -38,7 +38,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -172,7 +172,7 @@ NTPResourceCache::NTPResourceCache(Profile* profile) : profile_(profile) {
content::Source<ThemeService>(
ThemeServiceFactory::GetForProfile(profile)));
registrar_.Add(this, chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Watch for pref changes that cause us to need to invalidate the HTML cache.
pref_change_registrar_.Init(profile_->GetPrefs());
diff --git a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
index 8a926d0..92d5827 100644
--- a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
@@ -22,7 +22,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/url_constants.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/common/url_constants.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -62,7 +62,7 @@ ChangePictureOptionsHandler::ChangePictureOptionsHandler()
profile_image_data_url_(chrome::kAboutBlankURL),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ChangePictureOptionsHandler::~ChangePictureOptionsHandler() {
diff --git a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
index 1f5c300..a2a274b 100644
--- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
@@ -43,7 +43,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/time_format.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -59,9 +59,9 @@ InternetOptionsHandler::InternetOptionsHandler()
: chromeos::CrosOptionsPageUIHandler(NULL),
proxy_settings_(NULL) {
registrar_.Add(this, chrome::NOTIFICATION_REQUIRE_PIN_SETTING_CHANGE_ENDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_ENTER_PIN_ENDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
cros_ = chromeos::CrosLibrary::Get()->GetNetworkLibrary();
if (cros_) {
cros_->AddNetworkManagerObserver(this);
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index a4280c5..34299a3 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -28,7 +28,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/public/common/content_switches.h"
@@ -277,19 +277,19 @@ void ContentSettingsHandler::GetLocalizedValues(
void ContentSettingsHandler::Initialize() {
notification_registrar_.Add(
this, chrome::NOTIFICATION_PROFILE_CREATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
notification_registrar_.Add(
this, chrome::NOTIFICATION_PROFILE_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
UpdateHandlersEnabledRadios();
UpdateAllExceptionsViewsFromModel();
notification_registrar_.Add(
this, chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
notification_registrar_.Add(
this, chrome::NOTIFICATION_DESKTOP_NOTIFICATION_SETTINGS_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
Profile* profile = Profile::FromWebUI(web_ui_);
notification_registrar_.Add(
this, chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED,
diff --git a/chrome/browser/ui/webui/options/extension_settings_handler.cc b/chrome/browser/ui/webui/options/extension_settings_handler.cc
index 5ee7afa..b26030a 100644
--- a/chrome/browser/ui/webui/options/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/extension_settings_handler.cc
@@ -32,7 +32,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
@@ -216,19 +216,19 @@ void ExtensionSettingsHandler::MaybeRegisterForNotifications() {
content::Source<Profile>(profile));
registrar_.Add(this,
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this,
content::NOTIFICATION_RENDER_VIEW_HOST_CREATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this,
content::NOTIFICATION_RENDER_VIEW_HOST_DELETED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this,
chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this,
chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED,
diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.cc b/chrome/browser/ui/webui/options/manage_profile_handler.cc
index b9fb4d2..971b184 100644
--- a/chrome/browser/ui/webui/options/manage_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc
@@ -15,7 +15,7 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
ManageProfileHandler::ManageProfileHandler() {
@@ -44,7 +44,7 @@ void ManageProfileHandler::GetLocalizedValues(
void ManageProfileHandler::Initialize() {
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
SendProfileNames();
}
diff --git a/chrome/browser/ui/webui/options/personal_options_handler.cc b/chrome/browser/ui/webui/options/personal_options_handler.cc
index 434766c..80bdd68 100644
--- a/chrome/browser/ui/webui/options/personal_options_handler.cc
+++ b/chrome/browser/ui/webui/options/personal_options_handler.cc
@@ -33,7 +33,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -56,7 +56,7 @@ PersonalOptionsHandler::PersonalOptionsHandler() {
#if defined(OS_CHROMEOS)
registrar_.Add(this,
chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
#endif
}
@@ -349,7 +349,7 @@ void PersonalOptionsHandler::Initialize() {
content::Source<ThemeService>(
ThemeServiceFactory::GetForProfile(profile)));
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ObserveThemeChanged();
ProfileSyncService* sync_service = profile->GetProfileSyncService();
diff --git a/chrome/browser/ui/webui/plugins_ui.cc b/chrome/browser/ui/webui/plugins_ui.cc
index 07d609e..55d49384 100644
--- a/chrome/browser/ui/webui/plugins_ui.cc
+++ b/chrome/browser/ui/webui/plugins_ui.cc
@@ -31,7 +31,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/plugin_service.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/ui/webui/sync_promo_handler.cc b/chrome/browser/ui/webui/sync_promo_handler.cc
index dc57b42..8129813 100644
--- a/chrome/browser/ui/webui/sync_promo_handler.cc
+++ b/chrome/browser/ui/webui/sync_promo_handler.cc
@@ -20,7 +20,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
SyncPromoHandler::SyncPromoHandler(ProfileManager* profile_manager)
@@ -53,7 +53,7 @@ WebUIMessageHandler* SyncPromoHandler::Attach(WebUI* web_ui) {
&web_ui->tab_contents()->controller()));
// Listen to see if the window we're in gets closed.
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
return SyncSetupHandler::Attach(web_ui);
}
diff --git a/chrome/browser/ui/webui/task_manager_handler.cc b/chrome/browser/ui/webui/task_manager_handler.cc
index acd8f52..1ac7463 100644
--- a/chrome/browser/ui/webui/task_manager_handler.cc
+++ b/chrome/browser/ui/webui/task_manager_handler.cc
@@ -16,7 +16,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "webkit/glue/webpreferences.h"
@@ -354,10 +354,10 @@ void TaskManagerHandler::EnableTaskManager(const ListValue* indexes) {
model_->AddObserver(this);
model_->StartUpdating();
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TASK_MANAGER_WINDOW_READY,
content::Source<TaskManagerModel>(model_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void TaskManagerHandler::OpenAboutMemory(const ListValue* indexes) {
diff --git a/chrome/browser/upgrade_detector.cc b/chrome/browser/upgrade_detector.cc
index 6fb47a1..e083375 100644
--- a/chrome/browser/upgrade_detector.cc
+++ b/chrome/browser/upgrade_detector.cc
@@ -11,7 +11,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/theme_resources.h"
// How long to wait between checks for whether the user has been idle.
@@ -76,10 +76,10 @@ void UpgradeDetector::NotifyUpgradeDetected() {
void UpgradeDetector::NotifyUpgradeRecommended() {
notify_upgrade_ = true;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
content::Source<UpgradeDetector>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
if (is_critical_upgrade_) {
int idle_timer = UseTestingIntervals() ?
@@ -111,10 +111,10 @@ void UpgradeDetector::IdleCallback(IdleState state) {
case IDLE_STATE_IDLE:
// Computer has been idle for long enough, show warning.
idle_check_timer_.Stop();
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_CRITICAL_UPGRADE_INSTALLED,
content::Source<UpgradeDetector>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
break;
case IDLE_STATE_ACTIVE:
case IDLE_STATE_UNKNOWN:
diff --git a/chrome/browser/user_style_sheet_watcher.cc b/chrome/browser/user_style_sheet_watcher.cc
index ee26f960..49fec0a 100644
--- a/chrome/browser/user_style_sheet_watcher.cc
+++ b/chrome/browser/user_style_sheet_watcher.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
using ::base::files::FilePathWatcher;
@@ -79,10 +79,10 @@ UserStyleSheetLoader::UserStyleSheetLoader()
void UserStyleSheetLoader::NotifyLoaded() {
if (has_loaded_) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_USER_STYLE_SHEET_UPDATED,
content::Source<UserStyleSheetLoader>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
}
@@ -137,7 +137,7 @@ UserStyleSheetWatcher::UserStyleSheetWatcher(Profile* profile,
// too fast, the first tab won't hear the notification and won't get
// the user style sheet.
registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
UserStyleSheetWatcher::~UserStyleSheetWatcher() {
diff --git a/chrome/browser/visitedlink/visitedlink_event_listener.cc b/chrome/browser/visitedlink/visitedlink_event_listener.cc
index 86c1ddb..a15dbe4 100644
--- a/chrome/browser/visitedlink/visitedlink_event_listener.cc
+++ b/chrome/browser/visitedlink/visitedlink_event_listener.cc
@@ -9,7 +9,7 @@
#include "chrome/common/render_messages.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_widget_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
using base::Time;
@@ -107,11 +107,11 @@ class VisitedLinkUpdater {
VisitedLinkEventListener::VisitedLinkEventListener(Profile* profile)
: profile_(profile) {
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
VisitedLinkEventListener::~VisitedLinkEventListener() {
diff --git a/chrome/browser/visitedlink/visitedlink_unittest.cc b/chrome/browser/visitedlink/visitedlink_unittest.cc
index 15c48a3..f885f93 100644
--- a/chrome/browser/visitedlink/visitedlink_unittest.cc
+++ b/chrome/browser/visitedlink/visitedlink_unittest.cc
@@ -20,7 +20,7 @@
#include "chrome/test/base/testing_profile.h"
#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/browser_render_process_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -499,16 +499,16 @@ class VisitRelayingRenderProcessHost : public BrowserRenderProcessHost {
explicit VisitRelayingRenderProcessHost(
content::BrowserContext* browser_context)
: BrowserRenderProcessHost(browser_context) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_RENDERER_PROCESS_CREATED,
content::Source<RenderProcessHost>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
virtual ~VisitRelayingRenderProcessHost() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
content::Source<RenderProcessHost>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
virtual bool Init(bool is_accessibility_enabled) {
diff --git a/chrome/browser/web_resource/promo_resource_service.cc b/chrome/browser/web_resource/promo_resource_service.cc
index 5976798..16e92fe 100644
--- a/chrome/browser/web_resource/promo_resource_service.cc
+++ b/chrome/browser/web_resource/promo_resource_service.cc
@@ -21,7 +21,7 @@
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
namespace {
@@ -368,10 +368,11 @@ void PromoResourceService::UnpackLogoSignal(
!(old_logo_end == logo_end)) {
prefs_->SetDouble(prefs::kNTPCustomLogoStart, logo_start);
prefs_->SetDouble(prefs::kNTPCustomLogoEnd, logo_end);
- NotificationService* service = NotificationService::current();
+ content::NotificationService* service =
+ content::NotificationService::current();
service->Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED,
content::Source<WebResourceService>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
}
@@ -419,10 +420,10 @@ void PromoResourceService::UnpackSyncPromoSignal(
prefs_->ClearPref(prefs::kNTPSyncPromoGroup);
prefs_->ClearPref(prefs::kNTPSyncPromoGroupMax);
// Notify the NTP resource cache if the promo has been disabled.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED,
content::Source<WebResourceService>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
return;
}
diff --git a/chrome/browser/web_resource/promo_resource_service_unittest.cc b/chrome/browser/web_resource/promo_resource_service_unittest.cc
index 4468c1d..1a6fb42 100644
--- a/chrome/browser/web_resource/promo_resource_service_unittest.cc
+++ b/chrome/browser/web_resource/promo_resource_service_unittest.cc
@@ -43,7 +43,7 @@ class SyncPromoTest : public PromoResourceServiceTest,
web_resource_service_->set_channel(chrome::VersionInfo::CHANNEL_DEV);
registrar_.Add(this,
chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
virtual void Observe(int type,
diff --git a/chrome/browser/web_resource/web_resource_service.cc b/chrome/browser/web_resource/web_resource_service.cc
index d0381ac..d9ac0d6 100644
--- a/chrome/browser/web_resource/web_resource_service.cc
+++ b/chrome/browser/web_resource/web_resource_service.cc
@@ -22,7 +22,7 @@
#include "chrome/common/web_resource/web_resource_unpacker.h"
#include "content/browser/browser_thread.h"
#include "content/common/net/url_fetcher.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
#include "net/base/load_flags.h"
#include "net/url_request/url_request_status.h"
@@ -265,10 +265,11 @@ void WebResourceService::WebResourceStateChange() {
web_resource_update_scheduled_ = false;
if (notification_type_ == chrome::NOTIFICATION_CHROME_END)
return;
- NotificationService* service = NotificationService::current();
+ content::NotificationService* service =
+ content::NotificationService::current();
service->Notify(notification_type_,
content::Source<WebResourceService>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void WebResourceService::StartAfterDelay() {
diff --git a/chrome/browser/webdata/autofill_profile_syncable_service.cc b/chrome/browser/webdata/autofill_profile_syncable_service.cc
index fe1d922..50eaba3 100644
--- a/chrome/browser/webdata/autofill_profile_syncable_service.cc
+++ b/chrome/browser/webdata/autofill_profile_syncable_service.cc
@@ -17,7 +17,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/guid.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
namespace {
diff --git a/chrome/browser/webdata/web_data_service.cc b/chrome/browser/webdata/web_data_service.cc
index 893c8d2..5d4a09c 100644
--- a/chrome/browser/webdata/web_data_service.cc
+++ b/chrome/browser/webdata/web_data_service.cc
@@ -25,7 +25,7 @@
#include "chrome/browser/webdata/web_database.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "grit/chromium_strings.h"
@@ -53,10 +53,10 @@ void NotifyOfMultipleAutofillChangesTask(
const scoped_refptr<WebDataService>& web_data_service) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_MULTIPLE_CHANGED,
content::Source<WebDataService>(web_data_service.get()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
} // namespace
@@ -641,10 +641,10 @@ void WebDataService::InitializeSyncableServices() {
void WebDataService::NotifyDatabaseLoadedOnUIThread() {
// Notify that the database has been initialized.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_WEB_DATABASE_LOADED,
content::Source<WebDataService>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void WebDataService::ShutdownDatabase() {
@@ -1031,7 +1031,7 @@ void WebDataService::AddFormElementsImpl(
// Post the notifications including the list of affected keys.
// This is sent here so that work resulting from this notification will be
// done on the DB thread, and not the UI thread.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED,
content::Source<WebDataService>(this),
content::Details<AutofillChangeList>(&changes));
@@ -1067,7 +1067,7 @@ void WebDataService::RemoveFormElementsAddedBetweenImpl(
// Post the notifications including the list of affected keys.
// This is sent here so that work resulting from this notification
// will be done on the DB thread, and not the UI thread.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED,
content::Source<WebDataService>(this),
content::Details<AutofillChangeList>(&changes));
@@ -1094,7 +1094,7 @@ void WebDataService::RemoveFormValueForElementNameImpl(
ScheduleCommit();
// Post the notifications including the list of affected keys.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED,
content::Source<WebDataService>(this),
content::Details<AutofillChangeList>(&changes));
@@ -1117,7 +1117,7 @@ void WebDataService::AddAutofillProfileImpl(
// Send GUID-based notification.
AutofillProfileChange change(AutofillProfileChange::ADD,
profile.guid(), &profile);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
content::Source<WebDataService>(this),
content::Details<AutofillProfileChange>(&change));
@@ -1151,7 +1151,7 @@ void WebDataService::UpdateAutofillProfileImpl(
// Send GUID-based notification.
AutofillProfileChange change(AutofillProfileChange::UPDATE,
profile.guid(), &profile);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
content::Source<WebDataService>(this),
content::Details<AutofillProfileChange>(&change));
@@ -1180,7 +1180,7 @@ void WebDataService::RemoveAutofillProfileImpl(
// Send GUID-based notification.
AutofillProfileChange change(AutofillProfileChange::REMOVE, guid, NULL);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
content::Source<WebDataService>(this),
content::Details<AutofillProfileChange>(&change));
@@ -1217,7 +1217,7 @@ void WebDataService::EmptyMigrationTrashImpl(
// Send GUID-based notification.
AutofillProfileChange change(AutofillProfileChange::REMOVE,
*iter, NULL);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
content::Source<WebDataService>(this),
content::Details<AutofillProfileChange>(&change));
@@ -1233,7 +1233,7 @@ void WebDataService::EmptyMigrationTrashImpl(
iter != profiles.end(); ++iter) {
AutofillProfileChange change(AutofillProfileChange::UPDATE,
(*iter)->guid(), *iter);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
content::Source<WebDataService>(this),
content::Details<AutofillProfileChange>(&change));
@@ -1265,7 +1265,7 @@ void WebDataService::AddCreditCardImpl(
// Send GUID-based notification.
AutofillCreditCardChange change(AutofillCreditCardChange::ADD,
credit_card.guid(), &credit_card);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED,
content::Source<WebDataService>(this),
content::Details<AutofillCreditCardChange>(&change));
@@ -1298,7 +1298,7 @@ void WebDataService::UpdateCreditCardImpl(
// Send GUID-based notification.
AutofillCreditCardChange change(AutofillCreditCardChange::UPDATE,
credit_card.guid(), &credit_card);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED,
content::Source<WebDataService>(this),
content::Details<AutofillCreditCardChange>(&change));
@@ -1320,7 +1320,7 @@ void WebDataService::RemoveCreditCardImpl(
// Send GUID-based notification.
AutofillCreditCardChange change(AutofillCreditCardChange::REMOVE, guid,
NULL);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED,
content::Source<WebDataService>(this),
content::Details<AutofillCreditCardChange>(&change));
@@ -1356,7 +1356,7 @@ void WebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetweenImpl(
iter != profile_guids.end(); ++iter) {
AutofillProfileChange change(AutofillProfileChange::REMOVE, *iter,
NULL);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
content::Source<WebDataService>(this),
content::Details<AutofillProfileChange>(&change));
@@ -1366,7 +1366,7 @@ void WebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetweenImpl(
iter != credit_card_guids.end(); ++iter) {
AutofillCreditCardChange change(AutofillCreditCardChange::REMOVE,
*iter, NULL);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED,
content::Source<WebDataService>(this),
content::Details<AutofillCreditCardChange>(&change));
diff --git a/chrome/browser/webdata/web_data_service_unittest.cc b/chrome/browser/webdata/web_data_service_unittest.cc
index 581b39f..4f3ecac 100644
--- a/chrome/browser/webdata/web_data_service_unittest.cc
+++ b/chrome/browser/webdata/web_data_service_unittest.cc
@@ -29,7 +29,7 @@
#include "chrome/common/guid.h"
#include "chrome/test/base/thread_observer_helper.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -57,13 +57,13 @@ class AutofillDBThreadObserverHelper : public DBThreadObserverHelper {
virtual void RegisterObservers() {
registrar_.Add(&observer_,
chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(&observer_,
chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(&observer_,
chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
};
diff --git a/chrome/browser/webdata/web_database.cc b/chrome/browser/webdata/web_database.cc
index 04df4c1..bc21cf1 100644
--- a/chrome/browser/webdata/web_database.cc
+++ b/chrome/browser/webdata/web_database.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/webdata/token_service_table.h"
#include "chrome/browser/webdata/web_apps_table.h"
#include "chrome/browser/webdata/web_intents_table.h"
-#include "content/common/notification_service.h"
+#include "content/browser/notification_service_impl.h"
#include "sql/statement.h"
#include "sql/transaction.h"
@@ -91,8 +91,8 @@ sql::Connection* WebDatabase::GetSQLConnection() {
sql::InitStatus WebDatabase::Init(const FilePath& db_name) {
// When running in unit tests, there is already a NotificationService object.
// Since only one can exist at a time per thread, check first.
- if (!NotificationService::current())
- notification_service_.reset(new NotificationService);
+ if (!content::NotificationService::current())
+ notification_service_.reset(new NotificationServiceImpl);
// Set the exceptional sqlite error handler.
db_.set_error_delegate(GetErrorHandlerForWebDb());
diff --git a/chrome/browser/webdata/web_database.h b/chrome/browser/webdata/web_database.h
index 5a4f4672..428ad63 100644
--- a/chrome/browser/webdata/web_database.h
+++ b/chrome/browser/webdata/web_database.h
@@ -11,16 +11,18 @@
#include "sql/init_status.h"
#include "sql/meta_table.h"
-class FilePath;
-class NotificationService;
-
class AutofillTable;
+class FilePath;
class KeywordTable;
class LoginsTable;
class TokenServiceTable;
class WebAppsTable;
class WebIntentsTable;
+namespace content {
+class NotificationService;
+}
+
// This class manages a SQLite database that stores various web page meta data.
class WebDatabase {
public:
@@ -60,7 +62,7 @@ class WebDatabase {
scoped_ptr<WebAppsTable> web_apps_table_;
scoped_ptr<WebIntentsTable> web_intents_table_;
- scoped_ptr<NotificationService> notification_service_;
+ scoped_ptr<content::NotificationService> notification_service_;
DISALLOW_COPY_AND_ASSIGN(WebDatabase);
};
diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc
index 377dc7a..d7df59e 100644
--- a/chrome/test/base/in_process_browser_test.cc
+++ b/chrome/test/base/in_process_browser_test.cc
@@ -32,6 +32,7 @@
#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/renderer/mock_content_renderer_client.h"
#include "net/base/mock_host_resolver.h"
@@ -231,7 +232,7 @@ Browser* InProcessBrowserTest::CreateBrowserForPopup(Profile* profile) {
void InProcessBrowserTest::AddBlankTabAndShow(Browser* browser) {
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser->AddSelectedTabWithURL(
GURL(chrome::kAboutBlankURL), content::PAGE_TRANSITION_START_PAGE);
observer.Wait();
diff --git a/chrome/test/base/test_html_dialog_observer.cc b/chrome/test/base/test_html_dialog_observer.cc
index 3b8fd8c..6f51eb7 100644
--- a/chrome/test/base/test_html_dialog_observer.cc
+++ b/chrome/test/base/test_html_dialog_observer.cc
@@ -5,7 +5,7 @@
#include "chrome/test/base/test_html_dialog_observer.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/webui/web_ui.h"
@@ -17,7 +17,7 @@
TestHtmlDialogObserver::TestHtmlDialogObserver()
: web_ui_(NULL), done_(false), running_(false) {
registrar_.Add(this, chrome::NOTIFICATION_HTML_DIALOG_SHOWN,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
TestHtmlDialogObserver::~TestHtmlDialogObserver() {
@@ -31,7 +31,7 @@ void TestHtmlDialogObserver::Observe(
case chrome::NOTIFICATION_HTML_DIALOG_SHOWN:
web_ui_ = content::Source<WebUI>(source).ptr();
registrar_.Remove(this, chrome::NOTIFICATION_HTML_DIALOG_SHOWN,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Wait for navigation on the new WebUI instance to complete. This depends
// on receiving the notification of the HtmlDialog being shown before the
// NavigationController finishes loading. The HtmlDialog notification is
diff --git a/chrome/test/base/testing_browser_process.h b/chrome/test/base/testing_browser_process.h
index 9f8b4b9..2a561f9 100644
--- a/chrome/test/base/testing_browser_process.h
+++ b/chrome/test/base/testing_browser_process.h
@@ -16,7 +16,7 @@
#include "base/memory/scoped_ptr.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
-#include "content/common/notification_service.h"
+#include "content/browser/notification_service_impl.h"
class BackgroundModeManager;
class CRLSetFetcher;
@@ -134,7 +134,7 @@ class TestingBrowserProcess : public BrowserProcess {
void SetDevToolsManager(DevToolsManager*);
private:
- NotificationService notification_service_;
+ NotificationServiceImpl notification_service_;
unsigned int module_ref_count_;
scoped_ptr<ui::Clipboard> clipboard_;
std::string app_locale_;
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index fc17948..0fe3bf2 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -51,7 +51,7 @@
#include "content/browser/browser_thread.h"
#include "content/browser/in_process_webkit/webkit_context.h"
#include "content/browser/mock_resource_context.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/base/cookie_monster.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
@@ -174,17 +174,17 @@ void TestingProfile::Init() {
DesktopNotificationServiceFactory::GetInstance()->SetTestingFactory(
this, CreateTestDesktopNotificationService);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_CREATED,
content::Source<Profile>(static_cast<Profile*>(this)),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
TestingProfile::~TestingProfile() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_DESTROYED,
content::Source<Profile>(static_cast<Profile*>(this)),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
profile_dependency_manager_->DestroyProfileServices(this);
@@ -318,7 +318,7 @@ void TestingProfile::BlockUntilBookmarkModelLoaded() {
void TestingProfile::BlockUntilTopSitesLoaded() {
ui_test_utils::WindowedNotificationObserver top_sites_loaded_observer(
chrome::NOTIFICATION_TOP_SITES_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
if (!GetHistoryService(Profile::EXPLICIT_ACCESS))
GetTopSites()->HistoryLoaded();
top_sites_loaded_observer.Wait();
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc
index f471f61..80e2316 100644
--- a/chrome/test/base/ui_test_utils.cc
+++ b/chrome/test/base/ui_test_utils.cc
@@ -46,6 +46,7 @@
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -291,7 +292,7 @@ void WaitForLoadStop(TabContents* tab) {
Browser* WaitForNewBrowser() {
TestNotificationObserver observer;
RegisterAndWait(&observer, chrome::NOTIFICATION_BROWSER_WINDOW_READY,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
return content::Source<Browser>(observer.source()).ptr();
}
@@ -314,7 +315,8 @@ void OpenURLOffTheRecord(Profile* profile, const GURL& url) {
}
void NavigateToURL(browser::NavigateParams* params) {
- TestNavigationObserver observer(NotificationService::AllSources(), NULL, 1);
+ TestNavigationObserver observer(
+ content::NotificationService::AllSources(), NULL, 1);
browser::Navigate(params);
observer.WaitForObservation();
}
@@ -349,7 +351,7 @@ static void NavigateToURLWithDispositionBlockUntilNavigationsComplete(
WindowedNotificationObserver tab_added_observer(
content::NOTIFICATION_TAB_ADDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser->OpenURL(url, GURL(), disposition, content::PAGE_TRANSITION_TYPED);
if (browser_test_flags & BROWSER_TEST_WAIT_FOR_BROWSER)
@@ -490,7 +492,7 @@ GURL GetFileUrlWithQuery(const FilePath& path,
AppModalDialog* WaitForAppModalDialog() {
TestNotificationObserver observer;
RegisterAndWait(&observer, chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
return content::Source<AppModalDialog>(observer.source()).ptr();
}
@@ -555,7 +557,7 @@ void WaitForHistoryToLoad(Browser* browser) {
browser->profile()->GetHistoryService(Profile::EXPLICIT_ACCESS);
WindowedNotificationObserver history_loaded_observer(
chrome::NOTIFICATION_HISTORY_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
if (!history_service->BackendLoaded())
history_loaded_observer.Wait();
}
@@ -769,7 +771,7 @@ TestWebSocketServer::~TestWebSocketServer() {
}
TestNotificationObserver::TestNotificationObserver()
- : source_(NotificationService::AllSources()) {
+ : source_(content::NotificationService::AllSources()) {
}
TestNotificationObserver::~TestNotificationObserver() {}
@@ -795,7 +797,7 @@ WindowedNotificationObserver::WindowedNotificationObserver(
WindowedNotificationObserver::~WindowedNotificationObserver() {}
void WindowedNotificationObserver::Wait() {
- if (seen_ || (waiting_for_ == NotificationService::AllSources() &&
+ if (seen_ || (waiting_for_ == content::NotificationService::AllSources() &&
!sources_seen_.empty())) {
return;
}
@@ -809,7 +811,7 @@ void WindowedNotificationObserver::Observe(
const content::NotificationSource& source,
const content::NotificationDetails& details) {
if (waiting_for_ == source ||
- (running_ && waiting_for_ == NotificationService::AllSources())) {
+ (running_ && waiting_for_ == content::NotificationService::AllSources())) {
seen_ = true;
if (running_)
MessageLoopForUI::current()->Quit();
@@ -883,7 +885,7 @@ void TitleWatcher::Observe(int type,
DOMMessageQueue::DOMMessageQueue() {
registrar_.Add(this, chrome::NOTIFICATION_DOM_OPERATION_RESPONSE,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
DOMMessageQueue::~DOMMessageQueue() {}
diff --git a/chrome/test/base/ui_test_utils.h b/chrome/test/base/ui_test_utils.h
index 1072383..2f29d6e5 100644
--- a/chrome/test/base/ui_test_utils.h
+++ b/chrome/test/base/ui_test_utils.h
@@ -20,7 +20,7 @@
#include "chrome/test/automation/dom_element_proxy.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/keycodes/keyboard_codes.h"
diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc
index 408abaa..0d3bcfe 100644
--- a/chrome/test/reliability/page_load_test.cc
+++ b/chrome/test/reliability/page_load_test.cc
@@ -64,7 +64,6 @@
#include "chrome/test/automation/tab_proxy.h"
#include "chrome/test/automation/window_proxy.h"
#include "chrome/test/ui/ui_test.h"
-#include "content/common/notification_service.h"
#include "net/base/net_util.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "v8/include/v8-testing.h"
diff --git a/chrome/test/test_navigation_observer.cc b/chrome/test/test_navigation_observer.cc
index c817efb..7e0c2f0 100644
--- a/chrome/test/test_navigation_observer.cc
+++ b/chrome/test/test_navigation_observer.cc
@@ -6,6 +6,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/renderer_host/render_view_host_observer.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -52,7 +53,7 @@ TestNavigationObserver::TestNavigationObserver(
// When we need to do javascript injection, register for RVH creation.
if (js_injection_ready_observer_) {
registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
RegisterAsObserver(source);
}
@@ -81,7 +82,7 @@ TestNavigationObserver::TestNavigationObserver(
// When we need to do javascript injection, register for RVH creation.
if (js_injection_ready_observer_) {
registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
}
diff --git a/chrome/tools/profiles/generate_profile.cc b/chrome/tools/profiles/generate_profile.cc
index 47a4a16e..83a73b2 100644
--- a/chrome/tools/profiles/generate_profile.cc
+++ b/chrome/tools/profiles/generate_profile.cc
@@ -24,7 +24,7 @@
#include "chrome/common/thumbnail_score.h"
#include "chrome/test/base/testing_profile.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_service.h"
+#include "content/browser/notification_service_impl.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
@@ -233,7 +233,7 @@ int main(int argc, const char* argv[]) {
chrome::RegisterPathProvider();
ui::RegisterPathProvider();
ResourceBundle::InitSharedInstance("en-US");
- NotificationService notification_service;
+ NotificationServiceImpl notification_service;
MessageLoopForUI message_loop;
BrowserThread ui_thread(BrowserThread::UI, &message_loop);
BrowserThread db_thread(BrowserThread::DB, &message_loop);