summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 02:52:53 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 02:52:53 +0000
commit6c2381d5ec28a86536c07dfa4a398a2b6bc1a58c (patch)
treea75584b11b8ef188b4eb3376b9146e063823a916 /chrome
parentbf3ee201c1ca5112f7fd173fc4785aa52920c5c0 (diff)
downloadchromium_src-6c2381d5ec28a86536c07dfa4a398a2b6bc1a58c.zip
chromium_src-6c2381d5ec28a86536c07dfa4a398a2b6bc1a58c.tar.gz
chromium_src-6c2381d5ec28a86536c07dfa4a398a2b6bc1a58c.tar.bz2
Move NotificationObserver, NotificationSource, and NotificationDetails to content/public/browser.
This patch got way bigger than I wanted, but once I moved NotificationDetails, I figured I might as well mvoe the others since they're in the same files. In hindsight, I should have converted a subset of files at a time by leaving a using statement in the header. BUG=98716 TBR=joi git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106196 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/accessibility_events.cc4
-rw-r--r--chrome/browser/alternate_nav_url_fetcher.cc17
-rw-r--r--chrome/browser/alternate_nav_url_fetcher.h14
-rw-r--r--chrome/browser/autocomplete/autocomplete.cc2
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.cc5
-rw-r--r--chrome/browser/autocomplete/autocomplete_unittest.cc23
-rw-r--r--chrome/browser/autocomplete/extension_app_provider.cc8
-rw-r--r--chrome/browser/autocomplete/extension_app_provider.h14
-rw-r--r--chrome/browser/autocomplete/keyword_provider.h14
-rw-r--r--chrome/browser/autofill/autofill_browsertest.cc18
-rw-r--r--chrome/browser/autofill/personal_data_manager.h14
-rw-r--r--chrome/browser/autofill/personal_data_manager_unittest.cc12
-rw-r--r--chrome/browser/automation/automation_extension_tracker.cc12
-rw-r--r--chrome/browser/automation/automation_extension_tracker.h4
-rw-r--r--chrome/browser/automation/automation_provider.h6
-rw-r--r--chrome/browser/automation/automation_provider_observers.cc260
-rw-r--r--chrome/browser/automation/automation_provider_observers.h358
-rw-r--r--chrome/browser/automation/automation_provider_observers_chromeos.cc14
-rw-r--r--chrome/browser/automation/automation_tab_helper_browsertest.cc18
-rw-r--r--chrome/browser/automation/automation_tab_tracker.h4
-rw-r--r--chrome/browser/automation/automation_window_tracker.cc4
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc15
-rw-r--r--chrome/browser/automation/testing_automation_provider.h12
-rw-r--r--chrome/browser/background/background_application_list_model.h14
-rw-r--r--chrome/browser/background/background_application_list_model_unittest.cc2
-rw-r--r--chrome/browser/background/background_contents_service.cc74
-rw-r--r--chrome/browser/background/background_contents_service.h14
-rw-r--r--chrome/browser/background/background_contents_service_unittest.cc12
-rw-r--r--chrome/browser/background/background_mode_manager.cc23
-rw-r--r--chrome/browser/background/background_mode_manager.h14
-rw-r--r--chrome/browser/bookmarks/bookmark_html_writer.h12
-rw-r--r--chrome/browser/bookmarks/bookmark_model.cc18
-rw-r--r--chrome/browser/bookmarks/bookmark_model.h13
-rw-r--r--chrome/browser/bookmarks/bookmark_model_unittest.cc23
-rw-r--r--chrome/browser/bookmarks/bookmark_storage.h14
-rw-r--r--chrome/browser/browser_focus_uitest.cc34
-rw-r--r--chrome/browser/browser_keyevents_browsertest.cc16
-rw-r--r--chrome/browser/browser_process_impl.cc6
-rw-r--r--chrome/browser/browser_process_impl.h14
-rw-r--r--chrome/browser/browsing_data_remover.cc10
-rw-r--r--chrome/browser/browsing_data_remover.h19
-rw-r--r--chrome/browser/chrome_plugin_service_filter.cc12
-rw-r--r--chrome/browser/chrome_plugin_service_filter.h14
-rw-r--r--chrome/browser/chromeos/boot_times_loader.cc16
-rw-r--r--chrome/browser/chromeos/boot_times_loader.h14
-rw-r--r--chrome/browser/chromeos/cros_settings.h10
-rw-r--r--chrome/browser/chromeos/enterprise_extension_observer.cc13
-rw-r--r--chrome/browser/chromeos/frame/layout_mode_button.h17
-rw-r--r--chrome/browser/chromeos/frame/panel_controller.cc4
-rw-r--r--chrome/browser/chromeos/input_method/input_method_manager.cc14
-rw-r--r--chrome/browser/chromeos/locale_change_guard.h16
-rw-r--r--chrome/browser/chromeos/login/base_login_display_host.cc7
-rw-r--r--chrome/browser/chromeos/login/base_login_display_host.h14
-rw-r--r--chrome/browser/chromeos/login/existing_user_controller.cc11
-rw-r--r--chrome/browser/chromeos/login/existing_user_controller.h14
-rw-r--r--chrome/browser/chromeos/login/google_authenticator.cc4
-rw-r--r--chrome/browser/chromeos/login/login_html_dialog.cc7
-rw-r--r--chrome/browser/chromeos/login/login_html_dialog.h14
-rw-r--r--chrome/browser/chromeos/login/login_performer.cc6
-rw-r--r--chrome/browser/chromeos/login/login_performer.h14
-rw-r--r--chrome/browser/chromeos/login/owner_manager.cc5
-rw-r--r--chrome/browser/chromeos/login/owner_manager.h5
-rw-r--r--chrome/browser/chromeos/login/owner_manager_unittest.cc4
-rw-r--r--chrome/browser/chromeos/login/owner_manager_unittest.h14
-rw-r--r--chrome/browser/chromeos/login/ownership_service.cc4
-rw-r--r--chrome/browser/chromeos/login/ownership_service.h14
-rw-r--r--chrome/browser/chromeos/login/parallel_authenticator.cc2
-rw-r--r--chrome/browser/chromeos/login/profile_image_downloader.h14
-rw-r--r--chrome/browser/chromeos/login/screen_lock_view.cc6
-rw-r--r--chrome/browser/chromeos/login/screen_lock_view.h14
-rw-r--r--chrome/browser/chromeos/login/screen_locker.cc14
-rw-r--r--chrome/browser/chromeos/login/screen_locker_browsertest.cc8
-rw-r--r--chrome/browser/chromeos/login/user_image_screen.cc4
-rw-r--r--chrome/browser/chromeos/login/user_image_screen.h14
-rw-r--r--chrome/browser/chromeos/login/user_manager.cc12
-rw-r--r--chrome/browser/chromeos/login/user_manager.h14
-rw-r--r--chrome/browser/chromeos/login/wizard_accessibility_helper.cc2
-rw-r--r--chrome/browser/chromeos/login/wizard_accessibility_helper.h4
-rw-r--r--chrome/browser/chromeos/media/media_player.cc12
-rw-r--r--chrome/browser/chromeos/notifications/balloon_collection_impl.cc7
-rw-r--r--chrome/browser/chromeos/notifications/balloon_collection_impl.h10
-rw-r--r--chrome/browser/chromeos/notifications/balloon_view.h16
-rw-r--r--chrome/browser/chromeos/notifications/notification_browsertest.cc10
-rw-r--r--chrome/browser/chromeos/notifications/notification_panel.h10
-rw-r--r--chrome/browser/chromeos/options/take_photo_dialog.cc4
-rw-r--r--chrome/browser/chromeos/options/take_photo_dialog.h14
-rw-r--r--chrome/browser/chromeos/preferences.h10
-rw-r--r--chrome/browser/chromeos/status/accessibility_menu_button.cc9
-rw-r--r--chrome/browser/chromeos/status/accessibility_menu_button.h10
-rw-r--r--chrome/browser/chromeos/status/caps_lock_menu_button.cc6
-rw-r--r--chrome/browser/chromeos/status/caps_lock_menu_button.h10
-rw-r--r--chrome/browser/chromeos/status/clock_menu_button.h10
-rw-r--r--chrome/browser/chromeos/status/input_method_menu.cc4
-rw-r--r--chrome/browser/chromeos/status/input_method_menu.h14
-rw-r--r--chrome/browser/chromeos/status/memory_menu_button.cc9
-rw-r--r--chrome/browser/chromeos/status/memory_menu_button.h14
-rw-r--r--chrome/browser/chromeos/tab_closeable_state_watcher.cc7
-rw-r--r--chrome/browser/chromeos/tab_closeable_state_watcher.h10
-rw-r--r--chrome/browser/chromeos/tab_first_render_watcher.h14
-rw-r--r--chrome/browser/chromeos/user_cros_settings_provider.cc8
-rw-r--r--chrome/browser/chromeos/web_socket_proxy.cc4
-rw-r--r--chrome/browser/chromeos/web_socket_proxy_controller.cc6
-rw-r--r--chrome/browser/chromeos/wm_ipc.cc4
-rw-r--r--chrome/browser/component_updater/component_updater_service.cc8
-rw-r--r--chrome/browser/component_updater/component_updater_service_unittest.cc2
-rw-r--r--chrome/browser/content_settings/content_settings_default_provider.h12
-rw-r--r--chrome/browser/content_settings/content_settings_policy_provider.h10
-rw-r--r--chrome/browser/content_settings/content_settings_pref_provider.h12
-rw-r--r--chrome/browser/content_settings/content_settings_pref_provider_unittest.cc8
-rw-r--r--chrome/browser/content_settings/host_content_settings_map.h12
-rw-r--r--chrome/browser/content_settings/mock_settings_observer.cc13
-rw-r--r--chrome/browser/content_settings/mock_settings_observer.h12
-rw-r--r--chrome/browser/content_settings/tab_specific_content_settings.cc23
-rw-r--r--chrome/browser/content_settings/tab_specific_content_settings.h14
-rw-r--r--chrome/browser/cookies_tree_model_unittest.cc2
-rw-r--r--chrome/browser/crash_recovery_browsertest.cc4
-rw-r--r--chrome/browser/custom_handlers/protocol_handler_registry.cc2
-rw-r--r--chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc25
-rw-r--r--chrome/browser/debugger/devtools_sanity_unittest.cc27
-rw-r--r--chrome/browser/debugger/devtools_window.cc23
-rw-r--r--chrome/browser/debugger/devtools_window.h14
-rw-r--r--chrome/browser/download/chrome_download_manager_delegate.h14
-rw-r--r--chrome/browser/download/download_browsertest.cc6
-rw-r--r--chrome/browser/download/download_crx_util.cc4
-rw-r--r--chrome/browser/download/download_request_limiter.h14
-rw-r--r--chrome/browser/download/save_page_browsertest.cc3
-rw-r--r--chrome/browser/enumerate_modules_model_win.cc6
-rw-r--r--chrome/browser/errorpage_browsertest.cc2
-rw-r--r--chrome/browser/extensions/app_notification_manager.cc15
-rw-r--r--chrome/browser/extensions/app_notification_manager.h14
-rw-r--r--chrome/browser/extensions/app_notification_manager_unittest.cc8
-rw-r--r--chrome/browser/extensions/app_process_apitest.cc10
-rw-r--r--chrome/browser/extensions/apps_promo.cc2
-rw-r--r--chrome/browser/extensions/content_script_apitest.cc2
-rw-r--r--chrome/browser/extensions/convert_web_app_browsertest.cc19
-rw-r--r--chrome/browser/extensions/crx_installer.cc8
-rw-r--r--chrome/browser/extensions/extension_accessibility_api.cc28
-rw-r--r--chrome/browser/extensions/extension_accessibility_api.h14
-rw-r--r--chrome/browser/extensions/extension_apitest.cc10
-rw-r--r--chrome/browser/extensions/extension_apitest.h10
-rw-r--r--chrome/browser/extensions/extension_app_api.cc8
-rw-r--r--chrome/browser/extensions/extension_bookmarks_module.cc10
-rw-r--r--chrome/browser/extensions/extension_bookmarks_module.h14
-rw-r--r--chrome/browser/extensions/extension_browser_actions_api.cc2
-rw-r--r--chrome/browser/extensions/extension_browser_event_router.cc29
-rw-r--r--chrome/browser/extensions/extension_browser_event_router.h12
-rw-r--r--chrome/browser/extensions/extension_browsertest.cc22
-rw-r--r--chrome/browser/extensions/extension_browsertest.h12
-rw-r--r--chrome/browser/extensions/extension_browsertests_misc.cc4
-rw-r--r--chrome/browser/extensions/extension_cookies_api.cc11
-rw-r--r--chrome/browser/extensions/extension_cookies_api.h14
-rw-r--r--chrome/browser/extensions/extension_debugger_api.cc16
-rw-r--r--chrome/browser/extensions/extension_event_router.cc14
-rw-r--r--chrome/browser/extensions/extension_event_router.h12
-rw-r--r--chrome/browser/extensions/extension_function.h12
-rw-r--r--chrome/browser/extensions/extension_history_api.cc17
-rw-r--r--chrome/browser/extensions/extension_history_api.h12
-rw-r--r--chrome/browser/extensions/extension_host.cc42
-rw-r--r--chrome/browser/extensions/extension_host.h14
-rw-r--r--chrome/browser/extensions/extension_infobar_delegate.h14
-rw-r--r--chrome/browser/extensions/extension_input_api.cc6
-rw-r--r--chrome/browser/extensions/extension_input_method_apitest.cc16
-rw-r--r--chrome/browser/extensions/extension_install_ui.cc6
-rw-r--r--chrome/browser/extensions/extension_management_api.cc16
-rw-r--r--chrome/browser/extensions/extension_management_api.h14
-rw-r--r--chrome/browser/extensions/extension_management_apitest.cc2
-rw-r--r--chrome/browser/extensions/extension_management_browsertest.cc13
-rw-r--r--chrome/browser/extensions/extension_menu_manager.cc11
-rw-r--r--chrome/browser/extensions/extension_menu_manager.h14
-rw-r--r--chrome/browser/extensions/extension_menu_manager_unittest.cc4
-rw-r--r--chrome/browser/extensions/extension_message_service.cc12
-rw-r--r--chrome/browser/extensions/extension_message_service.h14
-rw-r--r--chrome/browser/extensions/extension_messages_apitest.cc20
-rw-r--r--chrome/browser/extensions/extension_metrics_apitest.cc16
-rw-r--r--chrome/browser/extensions/extension_navigation_observer.cc10
-rw-r--r--chrome/browser/extensions/extension_navigation_observer.h12
-rw-r--r--chrome/browser/extensions/extension_omnibox_api.cc8
-rw-r--r--chrome/browser/extensions/extension_omnibox_apitest.cc2
-rw-r--r--chrome/browser/extensions/extension_permissions_api.cc4
-rw-r--r--chrome/browser/extensions/extension_preference_api.cc8
-rw-r--r--chrome/browser/extensions/extension_preference_api.h10
-rw-r--r--chrome/browser/extensions/extension_prefs.cc6
-rw-r--r--chrome/browser/extensions/extension_prefs_unittest.cc10
-rw-r--r--chrome/browser/extensions/extension_process_manager.cc49
-rw-r--r--chrome/browser/extensions/extension_process_manager.h14
-rw-r--r--chrome/browser/extensions/extension_processes_api.h4
-rw-r--r--chrome/browser/extensions/extension_save_page_api.cc15
-rw-r--r--chrome/browser/extensions/extension_save_page_api.h12
-rw-r--r--chrome/browser/extensions/extension_service.cc62
-rw-r--r--chrome/browser/extensions/extension_service.h14
-rw-r--r--chrome/browser/extensions/extension_service_unittest.cc25
-rw-r--r--chrome/browser/extensions/extension_settings_frontend_unittest.cc4
-rw-r--r--chrome/browser/extensions/extension_startup_browsertest.cc2
-rw-r--r--chrome/browser/extensions/extension_tab_helper.cc4
-rw-r--r--chrome/browser/extensions/extension_tab_id_map.cc27
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc33
-rw-r--r--chrome/browser/extensions/extension_tabs_module.h20
-rw-r--r--chrome/browser/extensions/extension_test_api.cc10
-rw-r--r--chrome/browser/extensions/extension_test_message_listener.cc8
-rw-r--r--chrome/browser/extensions/extension_test_message_listener.h14
-rw-r--r--chrome/browser/extensions/extension_toolbar_model.cc19
-rw-r--r--chrome/browser/extensions/extension_toolbar_model.h14
-rw-r--r--chrome/browser/extensions/extension_updater.h10
-rw-r--r--chrome/browser/extensions/extension_warning_set.cc2
-rw-r--r--chrome/browser/extensions/extension_web_socket_proxy_private_api.cc12
-rw-r--r--chrome/browser/extensions/extension_web_socket_proxy_private_api.h20
-rw-r--r--chrome/browser/extensions/extension_webnavigation_api.cc13
-rw-r--r--chrome/browser/extensions/extension_webnavigation_api.h14
-rw-r--r--chrome/browser/extensions/extension_webrequest_apitest.cc12
-rw-r--r--chrome/browser/extensions/extension_webstore_private_api.h4
-rw-r--r--chrome/browser/extensions/extension_webstore_private_apitest.cc4
-rw-r--r--chrome/browser/extensions/external_policy_extension_loader.cc12
-rw-r--r--chrome/browser/extensions/external_policy_extension_loader.h14
-rw-r--r--chrome/browser/extensions/image_loading_tracker.cc6
-rw-r--r--chrome/browser/extensions/image_loading_tracker.h16
-rw-r--r--chrome/browser/extensions/image_loading_tracker_unittest.cc2
-rw-r--r--chrome/browser/extensions/isolated_app_browsertest.cc2
-rw-r--r--chrome/browser/extensions/network_delay_listener.cc20
-rw-r--r--chrome/browser/extensions/network_delay_listener.h14
-rw-r--r--chrome/browser/extensions/network_delay_listener_unittest.cc8
-rw-r--r--chrome/browser/extensions/speech_input/extension_speech_input_api.cc18
-rw-r--r--chrome/browser/extensions/speech_input/extension_speech_input_api.h10
-rw-r--r--chrome/browser/extensions/speech_input/extension_speech_input_manager.cc27
-rw-r--r--chrome/browser/extensions/speech_input/extension_speech_input_manager.h16
-rw-r--r--chrome/browser/extensions/theme_installed_infobar_delegate.cc6
-rw-r--r--chrome/browser/extensions/theme_installed_infobar_delegate.h14
-rw-r--r--chrome/browser/extensions/user_script_listener.cc17
-rw-r--r--chrome/browser/extensions/user_script_listener.h14
-rw-r--r--chrome/browser/extensions/user_script_listener_unittest.cc12
-rw-r--r--chrome/browser/extensions/user_script_master.cc22
-rw-r--r--chrome/browser/extensions/user_script_master.h14
-rw-r--r--chrome/browser/extensions/user_script_master_unittest.cc12
-rw-r--r--chrome/browser/extensions/webstore_inline_install_browsertest.cc2
-rw-r--r--chrome/browser/extensions/webstore_installer.h14
-rw-r--r--chrome/browser/external_tab_container_win.cc26
-rw-r--r--chrome/browser/external_tab_container_win.h18
-rw-r--r--chrome/browser/favicon/favicon_tab_helper.cc2
-rw-r--r--chrome/browser/file_select_helper.cc17
-rw-r--r--chrome/browser/file_select_helper.h14
-rw-r--r--chrome/browser/first_run/first_run_win.cc14
-rw-r--r--chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc21
-rw-r--r--chrome/browser/geolocation/geolocation_browsertest.cc37
-rw-r--r--chrome/browser/google/google_url_tracker.cc19
-rw-r--r--chrome/browser/google/google_url_tracker.h16
-rw-r--r--chrome/browser/google/google_url_tracker_unittest.cc15
-rw-r--r--chrome/browser/history/history.cc28
-rw-r--r--chrome/browser/history/history.h14
-rw-r--r--chrome/browser/history/history_backend_unittest.cc8
-rw-r--r--chrome/browser/history/history_tab_helper.cc9
-rw-r--r--chrome/browser/history/history_tab_helper.h14
-rw-r--r--chrome/browser/history/history_unittest.cc8
-rw-r--r--chrome/browser/history/in_memory_history_backend.h12
-rw-r--r--chrome/browser/history/shortcuts_backend.h14
-rw-r--r--chrome/browser/history/top_sites.cc22
-rw-r--r--chrome/browser/history/top_sites.h10
-rw-r--r--chrome/browser/history/top_sites_unittest.cc2
-rw-r--r--chrome/browser/importer/importer_host.h14
-rw-r--r--chrome/browser/infobars/infobar_container.h14
-rw-r--r--chrome/browser/infobars/infobar_tab_helper.cc27
-rw-r--r--chrome/browser/infobars/infobar_tab_helper.h12
-rw-r--r--chrome/browser/instant/instant_controller.cc4
-rw-r--r--chrome/browser/instant/instant_loader.cc80
-rw-r--r--chrome/browser/instant/instant_loader.h14
-rw-r--r--chrome/browser/intranet_redirect_detector.h4
-rw-r--r--chrome/browser/jumplist_win.cc18
-rw-r--r--chrome/browser/jumplist_win.h8
-rw-r--r--chrome/browser/memory_purger.cc2
-rw-r--r--chrome/browser/metrics/metrics_service.cc112
-rw-r--r--chrome/browser/metrics/metrics_service.h34
-rw-r--r--chrome/browser/metrics/thread_watcher.cc7
-rw-r--r--chrome/browser/metrics/thread_watcher.h18
-rw-r--r--chrome/browser/net/chrome_url_request_context.cc10
-rw-r--r--chrome/browser/net/chrome_url_request_context.h12
-rw-r--r--chrome/browser/net/gaia/gaia_oauth_fetcher.cc20
-rw-r--r--chrome/browser/net/gaia/gaia_oauth_fetcher.h14
-rw-r--r--chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc4
-rw-r--r--chrome/browser/net/gaia/token_service.cc20
-rw-r--r--chrome/browser/net/gaia/token_service.h14
-rw-r--r--chrome/browser/net/gaia/token_service_unittest.cc20
-rw-r--r--chrome/browser/net/gaia/token_service_unittest.h12
-rw-r--r--chrome/browser/net/http_server_properties_manager.cc15
-rw-r--r--chrome/browser/net/http_server_properties_manager.h10
-rw-r--r--chrome/browser/net/net_pref_observer.cc8
-rw-r--r--chrome/browser/net/net_pref_observer.h10
-rw-r--r--chrome/browser/net/pref_proxy_config_service.cc13
-rw-r--r--chrome/browser/net/pref_proxy_config_service.h10
-rw-r--r--chrome/browser/net/ssl_config_service_manager_pref.cc21
-rw-r--r--chrome/browser/notifications/balloon_host.cc6
-rw-r--r--chrome/browser/notifications/balloon_host.h3
-rw-r--r--chrome/browser/notifications/desktop_notification_service.cc15
-rw-r--r--chrome/browser/notifications/desktop_notification_service.h14
-rw-r--r--chrome/browser/notifications/notification_ui_manager.cc9
-rw-r--r--chrome/browser/notifications/notification_ui_manager.h14
-rw-r--r--chrome/browser/omnibox_search_hint.cc19
-rw-r--r--chrome/browser/omnibox_search_hint.h14
-rw-r--r--chrome/browser/oom_priority_manager.cc11
-rw-r--r--chrome/browser/oom_priority_manager.h12
-rw-r--r--chrome/browser/password_manager/password_store_default.cc16
-rw-r--r--chrome/browser/password_manager/password_store_default_unittest.cc46
-rw-r--r--chrome/browser/password_manager/password_store_mac.cc10
-rw-r--r--chrome/browser/password_manager/password_store_x.cc16
-rw-r--r--chrome/browser/password_manager/password_store_x_unittest.cc22
-rw-r--r--chrome/browser/pdf_browsertest.cc25
-rw-r--r--chrome/browser/plugin_data_remover_helper.cc11
-rw-r--r--chrome/browser/plugin_data_remover_helper.h16
-rw-r--r--chrome/browser/plugin_prefs.cc10
-rw-r--r--chrome/browser/plugin_prefs.h12
-rw-r--r--chrome/browser/policy/browser_policy_connector.cc18
-rw-r--r--chrome/browser/policy/browser_policy_connector.h14
-rw-r--r--chrome/browser/policy/cloud_policy_subsystem.cc15
-rw-r--r--chrome/browser/policy/cloud_policy_subsystem.h10
-rw-r--r--chrome/browser/policy/url_blacklist_manager.cc12
-rw-r--r--chrome/browser/policy/url_blacklist_manager.h10
-rw-r--r--chrome/browser/prefs/pref_change_registrar.cc6
-rw-r--r--chrome/browser/prefs/pref_change_registrar.h10
-rw-r--r--chrome/browser/prefs/pref_change_registrar_unittest.cc18
-rw-r--r--chrome/browser/prefs/pref_member.cc6
-rw-r--r--chrome/browser/prefs/pref_member.h16
-rw-r--r--chrome/browser/prefs/pref_member_unittest.cc14
-rw-r--r--chrome/browser/prefs/pref_notifier_impl.cc18
-rw-r--r--chrome/browser/prefs/pref_notifier_impl.h9
-rw-r--r--chrome/browser/prefs/pref_notifier_impl_unittest.cc18
-rw-r--r--chrome/browser/prefs/pref_observer_mock.cc4
-rw-r--r--chrome/browser/prefs/pref_observer_mock.h12
-rw-r--r--chrome/browser/prefs/pref_service.cc4
-rw-r--r--chrome/browser/prefs/pref_service.h11
-rw-r--r--chrome/browser/prefs/pref_set_observer.cc10
-rw-r--r--chrome/browser/prefs/pref_set_observer.h18
-rw-r--r--chrome/browser/prefs/pref_set_observer_unittest.cc18
-rw-r--r--chrome/browser/prerender/prerender_browsertest.cc16
-rw-r--r--chrome/browser/prerender/prerender_contents.cc22
-rw-r--r--chrome/browser/prerender/prerender_contents.h14
-rw-r--r--chrome/browser/prerender/prerender_manager.cc15
-rw-r--r--chrome/browser/printing/background_printing_manager.cc54
-rw-r--r--chrome/browser/printing/background_printing_manager.h14
-rw-r--r--chrome/browser/printing/print_dialog_cloud.cc13
-rw-r--r--chrome/browser/printing/print_dialog_cloud_internal.h14
-rw-r--r--chrome/browser/printing/print_dialog_cloud_unittest.cc8
-rw-r--r--chrome/browser/printing/print_job.cc22
-rw-r--r--chrome/browser/printing/print_job.h14
-rw-r--r--chrome/browser/printing/print_job_manager.cc8
-rw-r--r--chrome/browser/printing/print_job_manager.h14
-rw-r--r--chrome/browser/printing/print_job_unittest.cc12
-rw-r--r--chrome/browser/printing/print_job_worker.cc4
-rw-r--r--chrome/browser/printing/print_preview_tab_controller.cc41
-rw-r--r--chrome/browser/printing/print_preview_tab_controller.h14
-rw-r--r--chrome/browser/printing/print_preview_tab_controller_unittest.cc4
-rw-r--r--chrome/browser/printing/print_view_manager.cc20
-rw-r--r--chrome/browser/printing/print_view_manager.h14
-rw-r--r--chrome/browser/profiles/avatar_menu_model.cc4
-rw-r--r--chrome/browser/profiles/avatar_menu_model.h14
-rw-r--r--chrome/browser/profiles/off_the_record_profile_impl.cc11
-rw-r--r--chrome/browser/profiles/off_the_record_profile_impl.h12
-rw-r--r--chrome/browser/profiles/off_the_record_profile_impl_unittest.cc13
-rw-r--r--chrome/browser/profiles/profile_impl.cc31
-rw-r--r--chrome/browser/profiles/profile_impl.h14
-rw-r--r--chrome/browser/profiles/profile_io_data.cc4
-rw-r--r--chrome/browser/profiles/profile_manager.cc6
-rw-r--r--chrome/browser/profiles/profile_manager.h14
-rw-r--r--chrome/browser/remoting/firewall_traversal_observer.cc8
-rw-r--r--chrome/browser/remoting/firewall_traversal_observer.h10
-rw-r--r--chrome/browser/renderer_host/chrome_render_view_host_observer.cc6
-rw-r--r--chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc3
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_views.cc7
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_views.h14
-rw-r--r--chrome/browser/renderer_host/web_cache_manager.cc10
-rw-r--r--chrome/browser/renderer_host/web_cache_manager.h14
-rw-r--r--chrome/browser/repost_form_warning_controller.cc14
-rw-r--r--chrome/browser/repost_form_warning_controller.h14
-rw-r--r--chrome/browser/rlz/rlz.cc7
-rw-r--r--chrome/browser/rlz/rlz.h14
-rw-r--r--chrome/browser/rlz/rlz_unittest.cc12
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host.cc11
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host.h12
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_service.cc9
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_service.h14
-rw-r--r--chrome/browser/safe_browsing/malware_details_history.cc10
-rw-r--r--chrome/browser/safe_browsing/malware_details_history.h12
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc10
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.cc10
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.h16
-rw-r--r--chrome/browser/search_engines/search_provider_install_data.cc26
-rw-r--r--chrome/browser/search_engines/search_provider_install_data.h7
-rw-r--r--chrome/browser/search_engines/search_provider_install_data_unittest.cc10
-rw-r--r--chrome/browser/search_engines/search_provider_install_state_message_filter.cc4
-rw-r--r--chrome/browser/search_engines/template_url_fetcher.cc25
-rw-r--r--chrome/browser/search_engines/template_url_scraper_unittest.cc16
-rw-r--r--chrome/browser/search_engines/template_url_service.cc16
-rw-r--r--chrome/browser/search_engines/template_url_service.h14
-rw-r--r--chrome/browser/search_engines/template_url_service_unittest.cc8
-rw-r--r--chrome/browser/service/service_process_control.cc9
-rw-r--r--chrome/browser/service/service_process_control.h14
-rw-r--r--chrome/browser/sessions/restore_tab_helper.cc2
-rw-r--r--chrome/browser/sessions/session_restore.cc46
-rw-r--r--chrome/browser/sessions/session_service.cc33
-rw-r--r--chrome/browser/sessions/session_service.h12
-rw-r--r--chrome/browser/sessions/session_service_unittest.cc12
-rw-r--r--chrome/browser/sidebar/sidebar_browsertest.cc2
-rw-r--r--chrome/browser/sidebar/sidebar_manager.cc14
-rw-r--r--chrome/browser/sidebar/sidebar_manager.h14
-rw-r--r--chrome/browser/speech/speech_input_bubble_controller.cc19
-rw-r--r--chrome/browser/speech/speech_input_bubble_controller.h15
-rw-r--r--chrome/browser/spellchecker/spellcheck_host_impl.cc6
-rw-r--r--chrome/browser/spellchecker/spellcheck_host_impl.h12
-rw-r--r--chrome/browser/ssl/ssl_blocking_page.cc2
-rw-r--r--chrome/browser/ssl/ssl_browser_tests.cc22
-rw-r--r--chrome/browser/sync/backend_migrator.cc13
-rw-r--r--chrome/browser/sync/backend_migrator.h14
-rw-r--r--chrome/browser/sync/backend_migrator_unittest.cc8
-rw-r--r--chrome/browser/sync/glue/autofill_change_processor.cc12
-rw-r--r--chrome/browser/sync/glue/autofill_change_processor.h14
-rw-r--r--chrome/browser/sync/glue/autofill_data_type_controller.cc13
-rw-r--r--chrome/browser/sync/glue/autofill_data_type_controller.h16
-rw-r--r--chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc2
-rw-r--r--chrome/browser/sync/glue/autofill_profile_data_type_controller.cc6
-rw-r--r--chrome/browser/sync/glue/autofill_profile_data_type_controller.h16
-rw-r--r--chrome/browser/sync/glue/bookmark_data_type_controller.cc13
-rw-r--r--chrome/browser/sync/glue/bookmark_data_type_controller.h17
-rw-r--r--chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc4
-rw-r--r--chrome/browser/sync/glue/data_type_manager_impl.cc12
-rw-r--r--chrome/browser/sync/glue/data_type_manager_impl_unittest.cc14
-rw-r--r--chrome/browser/sync/glue/data_type_manager_mock.h8
-rw-r--r--chrome/browser/sync/glue/password_change_processor.cc22
-rw-r--r--chrome/browser/sync/glue/password_change_processor.h14
-rw-r--r--chrome/browser/sync/glue/search_engine_data_type_controller.cc8
-rw-r--r--chrome/browser/sync/glue/search_engine_data_type_controller.h14
-rw-r--r--chrome/browser/sync/glue/search_engine_data_type_controller_unittest.cc2
-rw-r--r--chrome/browser/sync/glue/session_change_processor.cc26
-rw-r--r--chrome/browser/sync/glue/session_change_processor.h17
-rw-r--r--chrome/browser/sync/glue/session_model_associator.cc4
-rw-r--r--chrome/browser/sync/glue/sync_backend_host.cc4
-rw-r--r--chrome/browser/sync/glue/theme_change_processor.cc13
-rw-r--r--chrome/browser/sync/glue/theme_change_processor.h16
-rw-r--r--chrome/browser/sync/glue/typed_url_change_processor.cc28
-rw-r--r--chrome/browser/sync/glue/typed_url_change_processor.h14
-rw-r--r--chrome/browser/sync/glue/typed_url_data_type_controller.cc9
-rw-r--r--chrome/browser/sync/glue/typed_url_data_type_controller.h16
-rw-r--r--chrome/browser/sync/profile_sync_service.cc38
-rw-r--r--chrome/browser/sync/profile_sync_service.h16
-rw-r--r--chrome/browser/sync/profile_sync_service_autofill_unittest.cc30
-rw-r--r--chrome/browser/sync/profile_sync_service_password_unittest.cc8
-rw-r--r--chrome/browser/sync/profile_sync_service_session_unittest.cc12
-rw-r--r--chrome/browser/sync/profile_sync_service_typed_url_unittest.cc36
-rw-r--r--chrome/browser/sync/profile_sync_test_util.cc10
-rw-r--r--chrome/browser/sync/profile_sync_test_util.h12
-rw-r--r--chrome/browser/sync/signin_manager.cc22
-rw-r--r--chrome/browser/sync/signin_manager.h14
-rw-r--r--chrome/browser/sync/signin_manager_unittest.cc4
-rw-r--r--chrome/browser/sync/sync_prefs.cc12
-rw-r--r--chrome/browser/sync/sync_prefs.h10
-rw-r--r--chrome/browser/sync/test_profile_sync_service.cc7
-rw-r--r--chrome/browser/sync/test_profile_sync_service.h4
-rw-r--r--chrome/browser/sync/util/extensions_activity_monitor.cc16
-rw-r--r--chrome/browser/sync/util/extensions_activity_monitor.h14
-rw-r--r--chrome/browser/sync/util/extensions_activity_monitor_unittest.cc4
-rw-r--r--chrome/browser/tab_contents/background_contents.cc22
-rw-r--r--chrome/browser/tab_contents/background_contents.h14
-rw-r--r--chrome/browser/tab_contents/chrome_interstitial_page.cc13
-rw-r--r--chrome/browser/tab_contents/chrome_interstitial_page.h8
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc4
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc15
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.h14
-rw-r--r--chrome/browser/tab_contents/tab_contents_ssl_helper.cc25
-rw-r--r--chrome/browser/tab_contents/tab_contents_view_gtk.cc8
-rw-r--r--chrome/browser/tab_contents/tab_contents_view_gtk.h14
-rw-r--r--chrome/browser/tab_contents/tab_contents_view_mac.h14
-rw-r--r--chrome/browser/tab_contents/tab_contents_view_mac.mm10
-rw-r--r--chrome/browser/tab_contents/thumbnail_generator.cc25
-rw-r--r--chrome/browser/tab_contents/thumbnail_generator.h14
-rw-r--r--chrome/browser/tab_contents/thumbnail_generator_unittest.cc4
-rw-r--r--chrome/browser/tab_contents/web_contents_unittest.cc6
-rw-r--r--chrome/browser/tab_contents/web_drag_source_win.cc9
-rw-r--r--chrome/browser/tab_contents/web_drag_source_win.h14
-rw-r--r--chrome/browser/tabs/pinned_tab_service.cc10
-rw-r--r--chrome/browser/tabs/pinned_tab_service.h14
-rw-r--r--chrome/browser/tabs/tab_finder.cc8
-rw-r--r--chrome/browser/tabs/tab_finder.h14
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc12
-rw-r--r--chrome/browser/tabs/tab_strip_model.h14
-rw-r--r--chrome/browser/tabs/tab_strip_model_unittest.cc19
-rw-r--r--chrome/browser/task_manager/task_manager_browsertest.cc2
-rw-r--r--chrome/browser/task_manager/task_manager_browsertest_util.cc4
-rw-r--r--chrome/browser/task_manager/task_manager_notification_resource_provider.cc8
-rw-r--r--chrome/browser/task_manager/task_manager_resource_providers.cc38
-rw-r--r--chrome/browser/task_manager/task_manager_resource_providers.h54
-rw-r--r--chrome/browser/themes/theme_service.cc10
-rw-r--r--chrome/browser/themes/theme_service.h14
-rw-r--r--chrome/browser/translate/translate_manager.cc30
-rw-r--r--chrome/browser/translate/translate_manager.h14
-rw-r--r--chrome/browser/translate/translate_manager_browsertest.cc40
-rw-r--r--chrome/browser/translate/translate_tab_helper.cc8
-rw-r--r--chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc2
-rw-r--r--chrome/browser/ui/auto_login_prompter.cc38
-rw-r--r--chrome/browser/ui/auto_login_prompter.h14
-rw-r--r--chrome/browser/ui/blocked_content/blocked_content_tab_helper.h2
-rw-r--r--chrome/browser/ui/bookmarks/bookmark_tab_helper.cc6
-rw-r--r--chrome/browser/ui/bookmarks/bookmark_tab_helper.h14
-rw-r--r--chrome/browser/ui/browser.cc67
-rw-r--r--chrome/browser/ui/browser.h12
-rw-r--r--chrome/browser/ui/browser_browsertest.cc8
-rw-r--r--chrome/browser/ui/browser_list.cc21
-rw-r--r--chrome/browser/ui/browser_navigator.cc4
-rw-r--r--chrome/browser/ui/browser_navigator_browsertest.cc9
-rw-r--r--chrome/browser/ui/browser_navigator_browsertest.h10
-rw-r--r--chrome/browser/ui/cocoa/base_bubble_controller.mm14
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm16
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/browser/avatar_button_controller.mm8
-rw-r--r--chrome/browser/ui/cocoa/browser_window_cocoa.h10
-rw-r--r--chrome/browser/ui/cocoa/browser_window_cocoa.mm13
-rw-r--r--chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h10
-rw-r--r--chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm10
-rw-r--r--chrome/browser/ui/cocoa/download/download_started_animation_mac.mm18
-rw-r--r--chrome/browser/ui/cocoa/extensions/browser_action_button.mm21
-rw-r--r--chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm22
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm24
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm25
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm18
-rw-r--r--chrome/browser/ui/cocoa/history_menu_bridge.h12
-rw-r--r--chrome/browser/ui/cocoa/history_menu_bridge.mm25
-rw-r--r--chrome/browser/ui/cocoa/info_bubble_window.mm14
-rw-r--r--chrome/browser/ui/cocoa/infobars/infobar_container_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm19
-rw-r--r--chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h8
-rw-r--r--chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm8
-rw-r--r--chrome/browser/ui/cocoa/location_bar/page_action_decoration.h8
-rw-r--r--chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm10
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm31
-rw-r--r--chrome/browser/ui/cocoa/theme_install_bubble_view.h14
-rw-r--r--chrome/browser/ui/cocoa/theme_install_bubble_view.mm7
-rw-r--r--chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm16
-rw-r--r--chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm14
-rw-r--r--chrome/browser/ui/content_settings/content_setting_bubble_model.cc19
-rw-r--r--chrome/browser/ui/content_settings/content_setting_bubble_model.h14
-rw-r--r--chrome/browser/ui/find_bar/find_bar_controller.cc24
-rw-r--r--chrome/browser/ui/find_bar/find_bar_controller.h14
-rw-r--r--chrome/browser/ui/find_bar/find_bar_host_browsertest.cc4
-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.cc6
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc9
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc8
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc26
-rw-r--r--chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/browser_titlebar.cc6
-rw-r--r--chrome/browser/ui/gtk/browser_titlebar.h14
-rw-r--r--chrome/browser/ui/gtk/browser_toolbar_gtk.cc16
-rw-r--r--chrome/browser/ui/gtk/browser_toolbar_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.cc8
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.h6
-rw-r--r--chrome/browser/ui/gtk/bubble/bubble_gtk.cc6
-rw-r--r--chrome/browser/ui/gtk/bubble/bubble_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/collected_cookies_gtk.cc8
-rw-r--r--chrome/browser/ui/gtk/collected_cookies_gtk.h12
-rw-r--r--chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/content_setting_bubble_gtk.cc13
-rw-r--r--chrome/browser/ui/gtk/content_setting_bubble_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/custom_button.cc12
-rw-r--r--chrome/browser/ui/gtk/custom_button.h24
-rw-r--r--chrome/browser/ui/gtk/download/download_item_gtk.cc6
-rw-r--r--chrome/browser/ui/gtk/download/download_item_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/download/download_shelf_gtk.cc6
-rw-r--r--chrome/browser/ui/gtk/download/download_shelf_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/download/download_started_animation_gtk.cc27
-rw-r--r--chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc20
-rw-r--r--chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc14
-rw-r--r--chrome/browser/ui/gtk/extensions/extension_popup_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/find_bar_gtk.cc6
-rw-r--r--chrome/browser/ui/gtk/find_bar_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/global_history_menu.cc6
-rw-r--r--chrome/browser/ui/gtk/global_history_menu.h14
-rw-r--r--chrome/browser/ui/gtk/global_menu_bar.cc8
-rw-r--r--chrome/browser/ui/gtk/global_menu_bar.h10
-rw-r--r--chrome/browser/ui/gtk/gtk_theme_service.cc10
-rw-r--r--chrome/browser/ui/gtk/gtk_theme_service.h10
-rw-r--r--chrome/browser/ui/gtk/infobars/infobar_gtk.cc6
-rw-r--r--chrome/browser/ui/gtk/infobars/infobar_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/location_bar_view_gtk.cc17
-rw-r--r--chrome/browser/ui/gtk/location_bar_view_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc14
-rw-r--r--chrome/browser/ui/gtk/notifications/balloon_view_gtk.h16
-rw-r--r--chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc6
-rw-r--r--chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc6
-rw-r--r--chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/overflow_button.cc6
-rw-r--r--chrome/browser/ui/gtk/overflow_button.h14
-rw-r--r--chrome/browser/ui/gtk/reload_button_gtk.cc12
-rw-r--r--chrome/browser/ui/gtk/reload_button_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/status_bubble_gtk.cc6
-rw-r--r--chrome/browser/ui/gtk/status_bubble_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/tab_contents_container_gtk.cc19
-rw-r--r--chrome/browser/ui/gtk/tab_contents_container_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc18
-rw-r--r--chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h14
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc10
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h20
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc8
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_strip_gtk.h12
-rw-r--r--chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc7
-rw-r--r--chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h14
-rw-r--r--chrome/browser/ui/intents/web_intent_picker_controller.cc13
-rw-r--r--chrome/browser/ui/intents/web_intent_picker_controller.h14
-rw-r--r--chrome/browser/ui/login/login_prompt.cc23
-rw-r--r--chrome/browser/ui/login/login_prompt.h18
-rw-r--r--chrome/browser/ui/login/login_prompt_browsertest.cc36
-rw-r--r--chrome/browser/ui/omnibox/omnibox_view_browsertest.cc34
-rw-r--r--chrome/browser/ui/panels/base_panel_browser_test.cc6
-rw-r--r--chrome/browser/ui/panels/panel.cc13
-rw-r--r--chrome/browser/ui/panels/panel.h14
-rw-r--r--chrome/browser/ui/panels/panel_app_browsertest.cc2
-rw-r--r--chrome/browser/ui/panels/panel_browser_view.cc4
-rw-r--r--chrome/browser/ui/panels/panel_browser_window_cocoa_unittest.mm6
-rw-r--r--chrome/browser/ui/panels/panel_browser_window_gtk.cc6
-rw-r--r--chrome/browser/ui/panels/panel_browsertest.cc12
-rw-r--r--chrome/browser/ui/panels/panel_window_controller_cocoa.mm6
-rw-r--r--chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc8
-rw-r--r--chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.cc10
-rw-r--r--chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h14
-rw-r--r--chrome/browser/ui/tab_contents/tab_contents_wrapper.cc15
-rw-r--r--chrome/browser/ui/tab_contents/tab_contents_wrapper.h12
-rw-r--r--chrome/browser/ui/toolbar/wrench_menu_model.cc11
-rw-r--r--chrome/browser/ui/toolbar/wrench_menu_model.h14
-rw-r--r--chrome/browser/ui/views/accessibility_event_router_views_unittest.cc12
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc8
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_view.h10
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc8
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc6
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc2
-rw-r--r--chrome/browser/ui/views/browser_actions_container.cc8
-rw-r--r--chrome/browser/ui/views/browser_actions_container.h14
-rw-r--r--chrome/browser/ui/views/collected_cookies_win.cc12
-rw-r--r--chrome/browser/ui/views/collected_cookies_win.h14
-rw-r--r--chrome/browser/ui/views/content_setting_bubble_contents.cc13
-rw-r--r--chrome/browser/ui/views/content_setting_bubble_contents.h14
-rw-r--r--chrome/browser/ui/views/download/download_started_animation_win.cc31
-rw-r--r--chrome/browser/ui/views/extensions/extension_dialog.cc14
-rw-r--r--chrome/browser/ui/views/extensions/extension_dialog.h14
-rw-r--r--chrome/browser/ui/views/extensions/extension_installed_bubble.cc20
-rw-r--r--chrome/browser/ui/views/extensions/extension_installed_bubble.h14
-rw-r--r--chrome/browser/ui/views/extensions/extension_popup.cc24
-rw-r--r--chrome/browser/ui/views/extensions/extension_popup.h12
-rw-r--r--chrome/browser/ui/views/find_bar_host_interactive_uitest.cc3
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc17
-rw-r--r--chrome/browser/ui/views/frame/browser_view.h12
-rw-r--r--chrome/browser/ui/views/frame/glass_browser_frame_view.cc7
-rw-r--r--chrome/browser/ui/views/frame/glass_browser_frame_view.h14
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.cc7
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.h14
-rw-r--r--chrome/browser/ui/views/html_dialog_view.cc16
-rw-r--r--chrome/browser/ui/views/html_dialog_view.h14
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.cc14
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.h8
-rw-r--r--chrome/browser/ui/views/notifications/balloon_view.cc12
-rw-r--r--chrome/browser/ui/views/notifications/balloon_view.h14
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_view_views.cc6
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_view_views.h10
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_container.cc33
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_container.h14
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_container_native.cc4
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_container_native.h14
-rw-r--r--chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc5
-rw-r--r--chrome/browser/ui/views/tabs/browser_tab_strip_controller.h14
-rw-r--r--chrome/browser/ui/views/tabs/dragged_tab_controller.cc22
-rw-r--r--chrome/browser/ui/views/tabs/dragged_tab_controller.h14
-rw-r--r--chrome/browser/ui/views/theme_install_bubble_view.cc7
-rw-r--r--chrome/browser/ui/views/theme_install_bubble_view.h14
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc10
-rw-r--r--chrome/browser/ui/views/toolbar_view.h10
-rw-r--r--chrome/browser/ui/views/wrench_menu.cc25
-rw-r--r--chrome/browser/ui/views/wrench_menu.h14
-rw-r--r--chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc24
-rw-r--r--chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc4
-rw-r--r--chrome/browser/ui/web_applications/web_app_ui.cc33
-rw-r--r--chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc14
-rw-r--r--chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc21
-rw-r--r--chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc4
-rw-r--r--chrome/browser/ui/webui/cloud_print_signin_dialog.cc23
-rw-r--r--chrome/browser/ui/webui/collected_cookies_ui_delegate.cc9
-rw-r--r--chrome/browser/ui/webui/collected_cookies_ui_delegate.h12
-rw-r--r--chrome/browser/ui/webui/conflicts_ui.cc16
-rw-r--r--chrome/browser/ui/webui/history2_ui.cc15
-rw-r--r--chrome/browser/ui/webui/history2_ui.h12
-rw-r--r--chrome/browser/ui/webui/history_ui.cc11
-rw-r--r--chrome/browser/ui/webui/history_ui.h12
-rw-r--r--chrome/browser/ui/webui/html_dialog_ui.cc2
-rw-r--r--chrome/browser/ui/webui/media/media_internals_proxy.cc7
-rw-r--r--chrome/browser/ui/webui/media/media_internals_proxy.h14
-rw-r--r--chrome/browser/ui/webui/metrics_handler.cc4
-rw-r--r--chrome/browser/ui/webui/net_internals_ui.cc19
-rw-r--r--chrome/browser/ui/webui/ntp/app_launcher_handler.cc34
-rw-r--r--chrome/browser/ui/webui/ntp/app_launcher_handler.h14
-rw-r--r--chrome/browser/ui/webui/ntp/foreign_session_handler.cc15
-rw-r--r--chrome/browser/ui/webui/ntp/foreign_session_handler.h12
-rw-r--r--chrome/browser/ui/webui/ntp/most_visited_handler.cc8
-rw-r--r--chrome/browser/ui/webui/ntp/most_visited_handler.h14
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_page_handler.cc2
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_ui.cc15
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_ui.h12
-rw-r--r--chrome/browser/ui/webui/ntp/ntp_login_handler.cc8
-rw-r--r--chrome/browser/ui/webui/ntp/ntp_login_handler.h10
-rw-r--r--chrome/browser/ui/webui/ntp/ntp_resource_cache.cc5
-rw-r--r--chrome/browser/ui/webui/ntp/ntp_resource_cache.h14
-rw-r--r--chrome/browser/ui/webui/ntp/shown_sections_handler.cc11
-rw-r--r--chrome/browser/ui/webui/ntp/shown_sections_handler.h10
-rw-r--r--chrome/browser/ui/webui/options/advanced_options_handler.cc11
-rw-r--r--chrome/browser/ui/webui/options/advanced_options_handler.h6
-rw-r--r--chrome/browser/ui/webui/options/browser_options_handler.cc13
-rw-r--r--chrome/browser/ui/webui/options/browser_options_handler.h6
-rw-r--r--chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc7
-rw-r--r--chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.h10
-rw-r--r--chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc11
-rw-r--r--chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.h6
-rw-r--r--chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc7
-rw-r--r--chrome/browser/ui/webui/options/chromeos/internet_options_handler.h10
-rw-r--r--chrome/browser/ui/webui/options/chromeos/virtual_keyboard_manager_handler.cc4
-rw-r--r--chrome/browser/ui/webui/options/clear_browser_data_handler.cc2
-rw-r--r--chrome/browser/ui/webui/options/content_settings_handler.cc22
-rw-r--r--chrome/browser/ui/webui/options/content_settings_handler.h12
-rw-r--r--chrome/browser/ui/webui/options/core_options_handler.cc8
-rw-r--r--chrome/browser/ui/webui/options/core_options_handler.h6
-rw-r--r--chrome/browser/ui/webui/options/extension_settings_handler.cc31
-rw-r--r--chrome/browser/ui/webui/options/extension_settings_handler.h10
-rw-r--r--chrome/browser/ui/webui/options/font_settings_handler.cc8
-rw-r--r--chrome/browser/ui/webui/options/font_settings_handler.h6
-rw-r--r--chrome/browser/ui/webui/options/handler_options_handler.cc9
-rw-r--r--chrome/browser/ui/webui/options/handler_options_handler.h10
-rw-r--r--chrome/browser/ui/webui/options/manage_profile_handler.cc7
-rw-r--r--chrome/browser/ui/webui/options/manage_profile_handler.h6
-rw-r--r--chrome/browser/ui/webui/options/options_ui.h14
-rw-r--r--chrome/browser/ui/webui/options/password_manager_handler.cc13
-rw-r--r--chrome/browser/ui/webui/options/password_manager_handler.h6
-rw-r--r--chrome/browser/ui/webui/options/personal_options_handler.cc11
-rw-r--r--chrome/browser/ui/webui/options/personal_options_handler.h10
-rw-r--r--chrome/browser/ui/webui/plugins_ui.cc16
-rw-r--r--chrome/browser/ui/webui/sync_promo_handler.cc11
-rw-r--r--chrome/browser/ui/webui/sync_promo_handler.h11
-rw-r--r--chrome/browser/ui/webui/task_manager_handler.cc4
-rw-r--r--chrome/browser/ui/webui/web_ui_browsertest.cc2
-rw-r--r--chrome/browser/ui/webui/web_ui_test_handler.cc14
-rw-r--r--chrome/browser/ui/webui/web_ui_test_handler.h10
-rw-r--r--chrome/browser/upgrade_detector.cc4
-rw-r--r--chrome/browser/user_style_sheet_watcher.cc7
-rw-r--r--chrome/browser/user_style_sheet_watcher.h14
-rw-r--r--chrome/browser/visitedlink/visitedlink_event_listener.cc16
-rw-r--r--chrome/browser/visitedlink/visitedlink_event_listener.h14
-rw-r--r--chrome/browser/visitedlink/visitedlink_unittest.cc6
-rw-r--r--chrome/browser/web_resource/promo_resource_service.cc4
-rw-r--r--chrome/browser/web_resource/promo_resource_service_unittest.cc10
-rw-r--r--chrome/browser/web_resource/web_resource_service.cc2
-rw-r--r--chrome/browser/webdata/autofill_profile_syncable_service.cc16
-rw-r--r--chrome/browser/webdata/autofill_profile_syncable_service.h14
-rw-r--r--chrome/browser/webdata/web_data_service.cc61
-rw-r--r--chrome/browser/webdata/web_data_service_unittest.cc46
-rw-r--r--chrome/chrome_tests.gypi4
-rw-r--r--chrome/common/native_window_notification_source.h14
-rw-r--r--chrome/test/base/test_html_dialog_observer.cc17
-rw-r--r--chrome/test/base/test_html_dialog_observer.h14
-rw-r--r--chrome/test/base/test_tab_strip_model_observer.cc5
-rw-r--r--chrome/test/base/testing_profile.cc4
-rw-r--r--chrome/test/base/thread_observer_helper.h10
-rw-r--r--chrome/test/base/ui_test_utils.cc89
-rw-r--r--chrome/test/base/ui_test_utils.h82
-rw-r--r--chrome/test/test_navigation_observer.cc13
-rw-r--r--chrome/test/test_navigation_observer.h18
770 files changed, 5605 insertions, 5294 deletions
diff --git a/chrome/browser/accessibility_events.cc b/chrome/browser/accessibility_events.cc
index a61cd37..8f71036 100644
--- a/chrome/browser/accessibility_events.cc
+++ b/chrome/browser/accessibility_events.cc
@@ -21,8 +21,8 @@ void SendAccessibilityNotification(
if (profile->ShouldSendAccessibilityEvents()) {
NotificationService::current()->Notify(
type,
- Source<Profile>(profile),
- Details<AccessibilityEventInfo>(info));
+ 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 b3c7849..dacc3ee 100644
--- a/chrome/browser/alternate_nav_url_fetcher.cc
+++ b/chrome/browser/alternate_nav_url_fetcher.cc
@@ -104,23 +104,24 @@ AlternateNavURLFetcher::AlternateNavURLFetcher(
AlternateNavURLFetcher::~AlternateNavURLFetcher() {
}
-void AlternateNavURLFetcher::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void AlternateNavURLFetcher::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_NAV_ENTRY_PENDING: {
// If we've already received a notification for the same controller, we
// should delete ourselves as that indicates that the page is being
// re-loaded so this instance is now stale.
NavigationController* controller =
- Source<NavigationController>(source).ptr();
+ content::Source<NavigationController>(source).ptr();
if (controller_ == controller) {
delete this;
} else if (!controller_) {
// Start listening for the commit notification.
DCHECK(controller->pending_entry());
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(controller));
+ content::Source<NavigationController>(controller));
StartFetch(controller);
}
break;
@@ -129,7 +130,7 @@ void AlternateNavURLFetcher::Observe(int type,
case chrome::NOTIFICATION_INSTANT_COMMITTED: {
// See above.
NavigationController* controller =
- &Source<TabContentsWrapper>(source)->controller();
+ &content::Source<TabContentsWrapper>(source)->controller();
if (controller_ == controller) {
delete this;
} else if (!controller_) {
@@ -142,7 +143,7 @@ void AlternateNavURLFetcher::Observe(int type,
case content::NOTIFICATION_NAV_ENTRY_COMMITTED:
// The page was navigated, we can show the infobar now if necessary.
registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(controller_));
+ content::Source<NavigationController>(controller_));
navigated_to_entry_ = true;
ShowInfobarIfPossible();
// WARNING: |this| may be deleted!
@@ -176,7 +177,7 @@ void AlternateNavURLFetcher::OnURLFetchComplete(
void AlternateNavURLFetcher::StartFetch(NavigationController* controller) {
controller_ = controller;
registrar_.Add(this, content::NOTIFICATION_TAB_CLOSED,
- Source<NavigationController>(controller_));
+ content::Source<NavigationController>(controller_));
DCHECK_EQ(NOT_STARTED, state_);
state_ = IN_PROGRESS;
diff --git a/chrome/browser/alternate_nav_url_fetcher.h b/chrome/browser/alternate_nav_url_fetcher.h
index dc6e7aa..1f71dd7 100644
--- a/chrome/browser/alternate_nav_url_fetcher.h
+++ b/chrome/browser/alternate_nav_url_fetcher.h
@@ -9,9 +9,9 @@
#include <string>
#include "base/memory/scoped_ptr.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
#include "content/common/net/url_fetcher.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
class NavigationController;
@@ -32,7 +32,7 @@ class NavigationController;
// * The tab is closed before we show an infobar
// * The intranet fetch fails
// * None of the above apply, so we successfully show an infobar
-class AlternateNavURLFetcher : public NotificationObserver,
+class AlternateNavURLFetcher : public content::NotificationObserver,
public URLFetcher::Delegate {
public:
enum State {
@@ -48,10 +48,10 @@ class AlternateNavURLFetcher : public NotificationObserver,
State state() const { return state_; }
private:
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// URLFetcher::Delegate
virtual void OnURLFetchComplete(const URLFetcher* source,
@@ -83,7 +83,7 @@ class AlternateNavURLFetcher : public NotificationObserver,
State state_;
bool navigated_to_entry_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(AlternateNavURLFetcher);
};
diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc
index 6dbb9a1..b44c7d0 100644
--- a/chrome/browser/autocomplete/autocomplete.cc
+++ b/chrome/browser/autocomplete/autocomplete.cc
@@ -1026,7 +1026,7 @@ void AutocompleteController::NotifyChanged(bool notify_default_match) {
if (done_) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY,
- Source<AutocompleteController>(this),
+ content::Source<AutocompleteController>(this),
NotificationService::NoDetails());
}
}
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
index 989045c..3b4058c 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc
@@ -501,8 +501,9 @@ void AutocompleteEditModel::OpenMatch(const AutocompleteMatch& match,
else if (!has_temporary_text_)
log.inline_autocompleted_length = inline_autocomplete_text_.length();
NotificationService::current()->Notify(
- chrome::NOTIFICATION_OMNIBOX_OPENED_URL, Source<Profile>(profile_),
- Details<AutocompleteLog>(&log));
+ chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
+ content::Source<Profile>(profile_),
+ content::Details<AutocompleteLog>(&log));
}
TemplateURLService* template_url_service =
diff --git a/chrome/browser/autocomplete/autocomplete_unittest.cc b/chrome/browser/autocomplete/autocomplete_unittest.cc
index e5e95fe..260c863 100644
--- a/chrome/browser/autocomplete/autocomplete_unittest.cc
+++ b/chrome/browser/autocomplete/autocomplete_unittest.cc
@@ -18,8 +18,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -105,7 +105,7 @@ void TestProvider::AddResults(int start_at, int num) {
}
class AutocompleteProviderTest : public testing::Test,
- public NotificationObserver {
+ public content::NotificationObserver {
protected:
void ResetControllerWithTestProviders(bool same_destinations);
@@ -122,14 +122,14 @@ class AutocompleteProviderTest : public testing::Test,
AutocompleteResult result_;
private:
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
MessageLoopForUI message_loop_;
scoped_ptr<AutocompleteController> controller_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
TestingProfile profile_;
};
@@ -161,7 +161,7 @@ void AutocompleteProviderTest::ResetControllerWithTestProviders(
// notifications.
registrar_.Add(this,
chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY,
- Source<AutocompleteController>(controller));
+ content::Source<AutocompleteController>(controller));
}
void AutocompleteProviderTest::
@@ -232,9 +232,10 @@ void AutocompleteProviderTest::RunExactKeymatchTest(
controller_->result().default_match()->provider);
}
-void AutocompleteProviderTest::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void AutocompleteProviderTest::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (controller_->done()) {
result_.CopyFrom(controller_->result());
MessageLoop::current()->Quit();
diff --git a/chrome/browser/autocomplete/extension_app_provider.cc b/chrome/browser/autocomplete/extension_app_provider.cc
index 48ce96c..8cc92e9 100644
--- a/chrome/browser/autocomplete/extension_app_provider.cc
+++ b/chrome/browser/autocomplete/extension_app_provider.cc
@@ -105,14 +105,14 @@ void ExtensionAppProvider::RefreshAppList() {
void ExtensionAppProvider::RegisterForNotifications() {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
void ExtensionAppProvider::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
RefreshAppList();
}
diff --git a/chrome/browser/autocomplete/extension_app_provider.h b/chrome/browser/autocomplete/extension_app_provider.h
index f7fce2e..60da1cb 100644
--- a/chrome/browser/autocomplete/extension_app_provider.h
+++ b/chrome/browser/autocomplete/extension_app_provider.h
@@ -22,11 +22,11 @@
#include "base/compiler_specific.h"
#include "chrome/browser/autocomplete/autocomplete.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class ExtensionAppProvider : public AutocompleteProvider,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
ExtensionAppProvider(ACProviderListener* listener, Profile* profile);
@@ -57,12 +57,12 @@ class ExtensionAppProvider : public AutocompleteProvider,
int target_length,
const GURL& url);
- // NotificationObserver implementation:
+ // content::NotificationObserver implementation:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Our cache of ExtensionApp objects (name + url) representing the extension
// apps we know about.
diff --git a/chrome/browser/autocomplete/keyword_provider.h b/chrome/browser/autocomplete/keyword_provider.h
index fdc6ae2..8f422ad 100644
--- a/chrome/browser/autocomplete/keyword_provider.h
+++ b/chrome/browser/autocomplete/keyword_provider.h
@@ -19,8 +19,8 @@
#include <string>
#include "chrome/browser/autocomplete/autocomplete.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class Profile;
class TemplateURL;
@@ -49,7 +49,7 @@ class TemplateURLService;
// but no search terms, the suggested result is shown greyed out, with
// "<enter term(s)>" as the substituted input, and does nothing when selected.
class KeywordProvider : public AutocompleteProvider,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
KeywordProvider(ACProviderListener* listener, Profile* profile);
// For testing.
@@ -133,10 +133,10 @@ class KeywordProvider : public AutocompleteProvider,
void EnterExtensionKeywordMode(const std::string& extension_id);
void MaybeEndExtensionKeywordMode();
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Model for the keywords. This is only non-null when testing, otherwise the
// TemplateURLService from the Profile is used.
@@ -159,7 +159,7 @@ class KeywordProvider : public AutocompleteProvider,
// the URL bar while the autocomplete popup is open.
std::string current_keyword_extension_id_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(KeywordProvider);
};
diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc
index adf5eb7..e1796ac 100644
--- a/chrome/browser/autofill/autofill_browsertest.cc
+++ b/chrome/browser/autofill/autofill_browsertest.cc
@@ -181,7 +181,7 @@ class AutofillTest : public InProcessBrowserTest {
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
browser(), ui::VKEY_M, false, true, false, false,
chrome::NOTIFICATION_AUTOFILL_DID_SHOW_SUGGESTIONS,
- Source<RenderViewHost>(render_view_host())));
+ content::Source<RenderViewHost>(render_view_host())));
// Press the down arrow to select the suggestion and preview the autofilled
// form.
@@ -189,7 +189,7 @@ class AutofillTest : public InProcessBrowserTest {
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
browser(), ui::VKEY_DOWN, false, false, false, false,
chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA,
- Source<RenderViewHost>(render_view_host())));
+ content::Source<RenderViewHost>(render_view_host())));
// The previewed values should not be accessible to JavaScript.
ExpectFieldValue(L"firstname", "M");
@@ -209,7 +209,7 @@ class AutofillTest : public InProcessBrowserTest {
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
browser(), ui::VKEY_RETURN, false, false, false, false,
chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA,
- Source<RenderViewHost>(render_view_host())));
+ content::Source<RenderViewHost>(render_view_host())));
// The form should be filled.
ExpectFilledTestForm();
@@ -249,20 +249,20 @@ IN_PROC_BROWSER_TEST_F(AutofillTest, AutofillViaDownArrow) {
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
browser(), ui::VKEY_DOWN, false, false, false, false,
chrome::NOTIFICATION_AUTOFILL_DID_SHOW_SUGGESTIONS,
- Source<RenderViewHost>(render_view_host())));
+ content::Source<RenderViewHost>(render_view_host())));
// Press the down arrow to select the suggestion and preview the autofilled
// form.
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
browser(), ui::VKEY_DOWN, false, false, false, false,
chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA,
- Source<RenderViewHost>(render_view_host())));
+ content::Source<RenderViewHost>(render_view_host())));
// Press Enter to accept the autofill suggestions.
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
browser(), ui::VKEY_RETURN, false, false, false, false,
chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA,
- Source<RenderViewHost>(render_view_host())));
+ content::Source<RenderViewHost>(render_view_host())));
// The form should be filled.
ExpectFilledTestForm();
@@ -306,20 +306,20 @@ IN_PROC_BROWSER_TEST_F(AutofillTest, OnChangeAfterAutofill) {
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
browser(), ui::VKEY_M, false, true, false, false,
chrome::NOTIFICATION_AUTOFILL_DID_SHOW_SUGGESTIONS,
- Source<RenderViewHost>(render_view_host())));
+ content::Source<RenderViewHost>(render_view_host())));
// Press the down arrow to select the suggestion and preview the autofilled
// form.
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
browser(), ui::VKEY_DOWN, false, false, false, false,
chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA,
- Source<RenderViewHost>(render_view_host())));
+ content::Source<RenderViewHost>(render_view_host())));
// Press Enter to accept the autofill suggestions.
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
browser(), ui::VKEY_RETURN, false, false, false, false,
chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA,
- Source<RenderViewHost>(render_view_host())));
+ content::Source<RenderViewHost>(render_view_host())));
// The form should be filled.
ExpectFilledTestForm();
diff --git a/chrome/browser/autofill/personal_data_manager.h b/chrome/browser/autofill/personal_data_manager.h
index d812d87..c04dc14 100644
--- a/chrome/browser/autofill/personal_data_manager.h
+++ b/chrome/browser/autofill/personal_data_manager.h
@@ -20,8 +20,8 @@
#include "chrome/browser/profiles/profile_keyed_service.h"
#include "chrome/browser/sync/profile_sync_service_observer.h"
#include "chrome/browser/webdata/web_data_service.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class AutofillManager;
class AutofillMetrics;
@@ -40,7 +40,7 @@ class PersonalDataManager
: public WebDataServiceConsumer,
public ProfileSyncServiceObserver,
public ProfileKeyedService,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// WebDataServiceConsumer:
virtual void OnWebDataServiceRequestDone(
@@ -61,12 +61,12 @@ class PersonalDataManager
// notifications.
virtual void Shutdown() OVERRIDE;
- // NotificationObserver:
+ // content::NotificationObserver:
// Observes "batch" changes made by Sync and refreshes data from the
// WebDataService in response.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Scans the given |form| for importable Autofill data. If the form includes
// sufficient address data, it is immediately imported. If the form includes
@@ -256,7 +256,7 @@ class PersonalDataManager
mutable bool has_logged_profile_count_;
// Manages registration lifetime for NotificationObserver implementation.
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
DISALLOW_COPY_AND_ASSIGN(PersonalDataManager);
};
diff --git a/chrome/browser/autofill/personal_data_manager_unittest.cc b/chrome/browser/autofill/personal_data_manager_unittest.cc
index efe94eb..ad69c16 100644
--- a/chrome/browser/autofill/personal_data_manager_unittest.cc
+++ b/chrome/browser/autofill/personal_data_manager_unittest.cc
@@ -18,11 +18,11 @@
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_observer_mock.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
+#include "content/test/notification_observer_mock.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/glue/form_data.h"
@@ -85,8 +85,8 @@ class PersonalDataManagerTest : public testing::Test {
BrowserThread db_thread_;
scoped_ptr<TestingProfile> profile_;
scoped_ptr<PersonalDataManager> personal_data_;
- NotificationRegistrar registrar_;
- NotificationObserverMock observer_;
+ content::NotificationRegistrar registrar_;
+ content::NotificationObserverMock observer_;
PersonalDataLoadedObserverMock personal_data_observer_;
};
diff --git a/chrome/browser/automation/automation_extension_tracker.cc b/chrome/browser/automation/automation_extension_tracker.cc
index 6ba03ab..93e24c5 100644
--- a/chrome/browser/automation/automation_extension_tracker.cc
+++ b/chrome/browser/automation/automation_extension_tracker.cc
@@ -24,16 +24,18 @@ void AutomationExtensionTracker::AddObserver(const Extension* resource) {}
void AutomationExtensionTracker::RemoveObserver(const Extension* resource) {}
-void AutomationExtensionTracker::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void AutomationExtensionTracker::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type != chrome::NOTIFICATION_EXTENSION_UNLOADED) {
NOTREACHED();
return;
}
- UnloadedExtensionInfo* info = Details<UnloadedExtensionInfo>(details).ptr();
+ UnloadedExtensionInfo* info =
+ content::Details<UnloadedExtensionInfo>(details).ptr();
const Extension* extension = info->extension;
- Profile* profile = Source<Profile>(source).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
if (profile) {
ExtensionService* service = profile->GetExtensionService();
if (service && info->reason == extension_misc::UNLOAD_REASON_UNINSTALL) {
diff --git a/chrome/browser/automation/automation_extension_tracker.h b/chrome/browser/automation/automation_extension_tracker.h
index 92b02ec..c8bf295 100644
--- a/chrome/browser/automation/automation_extension_tracker.h
+++ b/chrome/browser/automation/automation_extension_tracker.h
@@ -33,8 +33,8 @@ class AutomationExtensionTracker
// This is not true for the relevant extension notifications, so we have to
// the observation ourselves.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
};
#endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_EXTENSION_TRACKER_H_
diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h
index c367584..7728b8e 100644
--- a/chrome/browser/automation/automation_provider.h
+++ b/chrome/browser/automation/automation_provider.h
@@ -28,7 +28,7 @@
#include "content/browser/browser_thread.h"
#include "content/browser/cancelable_request.h"
#include "content/browser/tab_contents/navigation_entry.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "ipc/ipc_channel.h"
#if defined(OS_WIN) && !defined(USE_AURA)
@@ -374,8 +374,8 @@ class AutomationProvider
#endif // defined(OS_WIN) && !defined(USE_AURA)
scoped_ptr<IPC::ChannelProxy> channel_;
- scoped_ptr<NotificationObserver> new_tab_ui_load_observer_;
- scoped_ptr<NotificationObserver> find_in_page_observer_;
+ scoped_ptr<content::NotificationObserver> new_tab_ui_load_observer_;
+ scoped_ptr<content::NotificationObserver> find_in_page_observer_;
scoped_ptr<ExtensionTestResultNotificationObserver>
extension_test_result_observer_;
scoped_ptr<AutomationExtensionTracker> extension_tracker_;
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index c0232ab..2e6a373 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -122,8 +122,8 @@ InitialLoadObserver::~InitialLoadObserver() {
}
void InitialLoadObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_LOAD_START) {
if (outstanding_tab_count_ > loading_tabs_.size())
loading_tabs_.insert(TabTimeMap::value_type(
@@ -139,7 +139,8 @@ void InitialLoadObserver::Observe(int type,
}
} else if (type == content::NOTIFICATION_RENDERER_PROCESS_CLOSED) {
base::TerminationStatus status =
- Details<RenderProcessHost::RendererClosedDetails>(details)->status;
+ content::Details<RenderProcessHost::RendererClosedDetails>(details)->
+ status;
switch (status) {
case base::TERMINATION_STATUS_NORMAL_TERMINATION:
break;
@@ -201,17 +202,17 @@ NewTabUILoadObserver::NewTabUILoadObserver(AutomationProvider* automation,
Profile* profile)
: automation_(automation->AsWeakPtr()) {
registrar_.Add(this, chrome::NOTIFICATION_INITIAL_NEW_TAB_UI_LOAD,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
}
NewTabUILoadObserver::~NewTabUILoadObserver() {
}
void NewTabUILoadObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_INITIAL_NEW_TAB_UI_LOAD) {
- Details<int> load_time(details);
+ content::Details<int> load_time(details);
if (automation_) {
automation_->Send(
new AutomationMsg_InitialNewTabUILoadComplete(*load_time.ptr()));
@@ -240,8 +241,8 @@ NavigationControllerRestoredObserver::~NavigationControllerRestoredObserver() {
}
void NavigationControllerRestoredObserver::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (FinishedRestoring()) {
SendDone();
registrar_.RemoveAll();
@@ -276,7 +277,7 @@ NavigationNotificationObserver::NavigationNotificationObserver(
navigation_started_(false),
use_json_interface_(use_json_interface) {
DCHECK_LT(0, navigations_remaining_);
- Source<NavigationController> source(controller_);
+ content::Source<NavigationController> source(controller_);
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, source);
registrar_.Add(this, content::NOTIFICATION_LOAD_START, source);
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP, source);
@@ -294,8 +295,8 @@ NavigationNotificationObserver::~NavigationNotificationObserver() {
}
void NavigationNotificationObserver::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (!automation_) {
delete this;
return;
@@ -330,7 +331,7 @@ void NavigationNotificationObserver::Observe(
// We do this in all cases (not just when navigation_started_ == true) so
// tests can still wait for auth dialogs outside of navigation.
LoginHandler* handler =
- Details<LoginNotificationDetails>(details)->handler();
+ content::Details<LoginNotificationDetails>(details)->handler();
automation_->AddLoginHandler(controller_, handler);
// Respond that authentication is needed.
@@ -371,14 +372,17 @@ TabStripNotificationObserver::TabStripNotificationObserver(
TabStripNotificationObserver::~TabStripNotificationObserver() {
}
-void TabStripNotificationObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void TabStripNotificationObserver::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == notification_) {
- if (type == content::NOTIFICATION_TAB_PARENTED)
- ObserveTab(&(Source<TabContentsWrapper>(source).ptr()->controller()));
- else
- ObserveTab(Source<NavigationController>(source).ptr());
+ if (type == content::NOTIFICATION_TAB_PARENTED) {
+ ObserveTab(
+ &(content::Source<TabContentsWrapper>(source).ptr()->controller()));
+ } else {
+ ObserveTab(content::Source<NavigationController>(source).ptr());
+ }
delete this;
} else {
NOTREACHED();
@@ -520,8 +524,8 @@ ExtensionUninstallObserver::~ExtensionUninstallObserver() {
void ExtensionUninstallObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (!automation_) {
delete this;
return;
@@ -529,7 +533,7 @@ void ExtensionUninstallObserver::Observe(
switch (type) {
case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: {
- if (id_ == *Details<const std::string>(details).ptr()) {
+ if (id_ == *content::Details<const std::string>(details).ptr()) {
scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
return_value->SetBoolean("success", true);
AutomationJSONReply(automation_, reply_message_.release())
@@ -541,7 +545,7 @@ void ExtensionUninstallObserver::Observe(
}
case chrome::NOTIFICATION_EXTENSION_UNINSTALL_NOT_ALLOWED: {
- const Extension* extension = Details<Extension>(details).ptr();
+ const Extension* extension = content::Details<Extension>(details).ptr();
if (id_ == extension->id()) {
scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
return_value->SetBoolean("success", false);
@@ -583,8 +587,8 @@ ExtensionReadyNotificationObserver::~ExtensionReadyNotificationObserver() {
}
void ExtensionReadyNotificationObserver::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (!automation_) {
delete this;
return;
@@ -598,7 +602,7 @@ void ExtensionReadyNotificationObserver::Observe(
return;
break;
case chrome::NOTIFICATION_EXTENSION_LOADED:
- extension_ = Details<const Extension>(details).ptr();
+ extension_ = content::Details<const Extension>(details).ptr();
if (!DidExtensionHostsStopLoading(manager_))
return;
// For some reason, the background ExtensionHost is not yet
@@ -645,8 +649,8 @@ ExtensionUnloadNotificationObserver::~ExtensionUnloadNotificationObserver() {
}
void ExtensionUnloadNotificationObserver::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) {
did_receive_unload_notification_ = true;
} else {
@@ -679,8 +683,8 @@ ExtensionsUpdatedObserver::~ExtensionsUpdatedObserver() {
}
void ExtensionsUpdatedObserver::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (!automation_) {
delete this;
return;
@@ -698,7 +702,8 @@ void ExtensionsUpdatedObserver::Observe(
switch (type) {
case chrome::NOTIFICATION_EXTENSION_UPDATE_FOUND:
// Extension updater has identified an extension that needs to be updated.
- in_progress_updates_.insert(*(Details<const std::string>(details).ptr()));
+ in_progress_updates_.insert(
+ *(content::Details<const std::string>(details).ptr()));
break;
case chrome::NOTIFICATION_EXTENSION_UPDATING_FINISHED:
@@ -713,14 +718,14 @@ void ExtensionsUpdatedObserver::Observe(
// An extension has either completed update installation and is now
// loaded, or else the install has been skipped because it is
// either not allowed or else has been disabled.
- const Extension* extension = Details<Extension>(details).ptr();
+ const Extension* extension = content::Details<Extension>(details).ptr();
in_progress_updates_.erase(extension->id());
break;
}
case chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR: {
// An extension had an error on update installation.
- CrxInstaller* installer = Source<CrxInstaller>(source).ptr();
+ CrxInstaller* installer = content::Source<CrxInstaller>(source).ptr();
in_progress_updates_.erase(installer->expected_id());
break;
}
@@ -761,8 +766,8 @@ ExtensionTestResultNotificationObserver::
}
void ExtensionTestResultNotificationObserver::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_TEST_PASSED:
results_.push_back(true);
@@ -771,7 +776,7 @@ void ExtensionTestResultNotificationObserver::Observe(
case chrome::NOTIFICATION_EXTENSION_TEST_FAILED:
results_.push_back(false);
- messages_.push_back(*Details<std::string>(details).ptr());
+ messages_.push_back(*content::Details<std::string>(details).ptr());
break;
default:
@@ -818,8 +823,8 @@ BrowserOpenedNotificationObserver::~BrowserOpenedNotificationObserver() {
}
void BrowserOpenedNotificationObserver::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (!automation_) {
delete this;
return;
@@ -829,11 +834,11 @@ void BrowserOpenedNotificationObserver::Observe(
// Store the new browser ID and continue waiting for a new tab within it
// to stop loading.
new_window_id_ = ExtensionTabUtil::GetWindowId(
- Source<Browser>(source).ptr());
+ content::Source<Browser>(source).ptr());
} else if (type == content::NOTIFICATION_LOAD_STOP) {
// Only send the result if the loaded tab is in the new window.
NavigationController* controller =
- Source<NavigationController>(source).ptr();
+ content::Source<NavigationController>(source).ptr();
TabContentsWrapper* tab = TabContentsWrapper::GetCurrentWrapperForContents(
controller->tab_contents());
int window_id = tab ? tab->restore_tab_helper()->window_id().id() : -1;
@@ -864,14 +869,14 @@ BrowserClosedNotificationObserver::BrowserClosedNotificationObserver(
reply_message_(reply_message),
for_browser_command_(false) {
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(browser));
+ content::Source<Browser>(browser));
}
BrowserClosedNotificationObserver::~BrowserClosedNotificationObserver() {}
void BrowserClosedNotificationObserver::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_BROWSER_CLOSED);
if (!automation_) {
@@ -879,7 +884,7 @@ void BrowserClosedNotificationObserver::Observe(
return;
}
- Details<bool> close_app(details);
+ content::Details<bool> close_app(details);
if (for_browser_command_) {
AutomationMsg_WindowExecuteCommand::WriteReplyParams(reply_message_.get(),
@@ -915,8 +920,8 @@ BrowserCountChangeNotificationObserver::
void BrowserCountChangeNotificationObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_BROWSER_OPENED ||
type == chrome::NOTIFICATION_BROWSER_CLOSED);
int current_count = static_cast<int>(BrowserList::size());
@@ -952,8 +957,8 @@ AppModalDialogShownObserver::~AppModalDialogShownObserver() {
}
void AppModalDialogShownObserver::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN);
if (automation_) {
@@ -1045,8 +1050,8 @@ bool ExecuteBrowserCommandObserver::CreateAndRegisterObserver(
}
void ExecuteBrowserCommandObserver::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == notification_type_) {
if (automation_) {
AutomationMsg_WindowExecuteCommand::WriteReplyParams(reply_message_.get(),
@@ -1096,16 +1101,16 @@ FindInPageNotificationObserver::FindInPageNotificationObserver(
reply_with_json_(reply_with_json),
reply_message_(reply_message) {
registrar_.Add(this, chrome::NOTIFICATION_FIND_RESULT_AVAILABLE,
- Source<TabContents>(parent_tab));
+ content::Source<TabContents>(parent_tab));
}
FindInPageNotificationObserver::~FindInPageNotificationObserver() {
}
void FindInPageNotificationObserver::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
- Details<FindNotificationDetails> find_details(details);
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ content::Details<FindNotificationDetails> find_details(details);
if (!(find_details->final_update() && reply_message_ != NULL)) {
DVLOG(1) << "Ignoring, since we only care about the final message";
return;
@@ -1160,10 +1165,10 @@ DomOperationObserver::DomOperationObserver() {
DomOperationObserver::~DomOperationObserver() {}
void DomOperationObserver::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_DOM_OPERATION_RESPONSE) {
- Details<DomOperationNotificationDetails> dom_op_details(details);
+ content::Details<DomOperationNotificationDetails> dom_op_details(details);
OnDomOperationCompleted(dom_op_details->json());
} else if (type == chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN) {
OnModalDialogShown();
@@ -1224,10 +1229,10 @@ DocumentPrintedNotificationObserver::~DocumentPrintedNotificationObserver() {
void DocumentPrintedNotificationObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_PRINT_JOB_EVENT);
- switch (Details<printing::JobEventDetails>(details)->type()) {
+ switch (content::Details<printing::JobEventDetails>(details)->type()) {
case printing::JobEventDetails::JOB_DONE: {
// Succeeded.
success_ = true;
@@ -1272,14 +1277,16 @@ int MetricEventDurationObserver::GetEventDurationMs(
return it->second;
}
-void MetricEventDurationObserver::Observe(int type,
- const NotificationSource& source, const NotificationDetails& details) {
+void MetricEventDurationObserver::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type != chrome::NOTIFICATION_METRIC_EVENT_DURATION) {
NOTREACHED();
return;
}
MetricEventDurationDetails* metric_event_duration =
- Details<MetricEventDurationDetails>(details).ptr();
+ content::Details<MetricEventDurationDetails>(details).ptr();
durations_[metric_event_duration->event_name] =
metric_event_duration->duration_ms;
}
@@ -1290,14 +1297,15 @@ PageTranslatedObserver::PageTranslatedObserver(AutomationProvider* automation,
: automation_(automation->AsWeakPtr()),
reply_message_(reply_message) {
registrar_.Add(this, chrome::NOTIFICATION_PAGE_TRANSLATED,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
}
PageTranslatedObserver::~PageTranslatedObserver() {}
-void PageTranslatedObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void PageTranslatedObserver::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (!automation_) {
delete this;
return;
@@ -1307,7 +1315,7 @@ void PageTranslatedObserver::Observe(int type,
AutomationJSONReply reply(automation_, reply_message_.release());
PageTranslatedDetails* translated_details =
- Details<PageTranslatedDetails>(details).ptr();
+ content::Details<PageTranslatedDetails>(details).ptr();
scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
return_value->SetBoolean(
"translation_success",
@@ -1324,14 +1332,14 @@ TabLanguageDeterminedObserver::TabLanguageDeterminedObserver(
tab_contents_(tab_contents),
translate_bar_(translate_bar) {
registrar_.Add(this, chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
}
TabLanguageDeterminedObserver::~TabLanguageDeterminedObserver() {}
void TabLanguageDeterminedObserver::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED);
if (!automation_) {
@@ -1389,7 +1397,7 @@ InfoBarCountObserver::InfoBarCountObserver(AutomationProvider* automation,
reply_message_(reply_message),
tab_contents_(tab_contents),
target_count_(target_count) {
- Source<InfoBarTabHelper> source(tab_contents->infobar_tab_helper());
+ content::Source<InfoBarTabHelper> source(tab_contents->infobar_tab_helper());
registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED,
source);
registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
@@ -1399,9 +1407,10 @@ InfoBarCountObserver::InfoBarCountObserver(AutomationProvider* automation,
InfoBarCountObserver::~InfoBarCountObserver() {}
-void InfoBarCountObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void InfoBarCountObserver::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED ||
type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED);
CheckCount();
@@ -1752,12 +1761,12 @@ void PasswordStoreLoginsChangedObserver::RegisterObserversTask() {
void PasswordStoreLoginsChangedObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
DCHECK(type == chrome::NOTIFICATION_LOGINS_CHANGED);
PasswordStoreChangeList* change_details =
- Details<PasswordStoreChangeList>(details).ptr();
+ content::Details<PasswordStoreChangeList>(details).ptr();
if (change_details->size() != 1 ||
change_details->front().type() != expected_type_) {
// Notify the UI thread that there's an error.
@@ -1826,7 +1835,7 @@ OmniboxAcceptNotificationObserver::OmniboxAcceptNotificationObserver(
: automation_(automation->AsWeakPtr()),
reply_message_(reply_message),
controller_(controller) {
- Source<NavigationController> source(controller_);
+ content::Source<NavigationController> source(controller_);
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP, source);
// Pages requiring auth don't send LOAD_STOP.
registrar_.Add(this, chrome::NOTIFICATION_AUTH_NEEDED, source);
@@ -1837,8 +1846,8 @@ OmniboxAcceptNotificationObserver::~OmniboxAcceptNotificationObserver() {
void OmniboxAcceptNotificationObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_LOAD_STOP ||
type == chrome::NOTIFICATION_AUTH_NEEDED) {
if (automation_) {
@@ -1857,7 +1866,7 @@ SavePackageNotificationObserver::SavePackageNotificationObserver(
IPC::Message* reply_message)
: automation_(automation->AsWeakPtr()),
reply_message_(reply_message) {
- Source<DownloadManager> source(download_manager);
+ content::Source<DownloadManager> source(download_manager);
registrar_.Add(this, content::NOTIFICATION_SAVE_PACKAGE_SUCCESSFULLY_FINISHED,
source);
}
@@ -1866,8 +1875,8 @@ SavePackageNotificationObserver::~SavePackageNotificationObserver() {}
void SavePackageNotificationObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_SAVE_PACKAGE_SUCCESSFULLY_FINISHED) {
if (automation_) {
AutomationJSONReply(automation_,
@@ -2105,24 +2114,25 @@ NTPInfoObserver::NTPInfoObserver(
ntp_info_->Set("default_sites", default_sites_list);
registrar_.Add(this, chrome::NOTIFICATION_TOP_SITES_UPDATED,
- Source<history::TopSites>(top_sites_));
+ content::Source<history::TopSites>(top_sites_));
if (top_sites_->loaded()) {
OnTopSitesLoaded();
} else {
registrar_.Add(this, chrome::NOTIFICATION_TOP_SITES_LOADED,
- Source<Profile>(automation_->profile()));
+ content::Source<Profile>(automation_->profile()));
}
}
NTPInfoObserver::~NTPInfoObserver() {}
void NTPInfoObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_TOP_SITES_LOADED) {
OnTopSitesLoaded();
} else if (type == chrome::NOTIFICATION_TOP_SITES_UPDATED) {
- Details<CancelableRequestProvider::Handle> request_details(details);
+ content::Details<CancelableRequestProvider::Handle> request_details(
+ details);
if (request_ == *request_details.ptr()) {
top_sites_->GetMostVisitedURLs(
consumer_,
@@ -2172,7 +2182,7 @@ AppLaunchObserver::AppLaunchObserver(
new_window_id_(extension_misc::kUnknownWindowId) {
if (launch_container_ == extension_misc::LAUNCH_TAB) {
// Need to wait for the currently-active tab to reload.
- Source<NavigationController> source(controller_);
+ content::Source<NavigationController> source(controller_);
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP, source);
} else {
// Need to wait for a new tab in a new window to load.
@@ -2186,8 +2196,8 @@ AppLaunchObserver::AppLaunchObserver(
AppLaunchObserver::~AppLaunchObserver() {}
void AppLaunchObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_LOAD_STOP) {
if (launch_container_ == extension_misc::LAUNCH_TAB) {
// The app has been launched in the new tab.
@@ -2200,7 +2210,7 @@ void AppLaunchObserver::Observe(int type,
} else {
// The app has launched only if the loaded tab is in the new window.
NavigationController* controller =
- Source<NavigationController>(source).ptr();
+ content::Source<NavigationController>(source).ptr();
TabContentsWrapper* tab =
TabContentsWrapper::GetCurrentWrapperForContents(
controller->tab_contents());
@@ -2216,7 +2226,7 @@ void AppLaunchObserver::Observe(int type,
}
} else if (type == chrome::NOTIFICATION_BROWSER_WINDOW_READY) {
new_window_id_ = ExtensionTabUtil::GetWindowId(
- Source<Browser>(source).ptr());
+ content::Source<Browser>(source).ptr());
} else {
NOTREACHED();
}
@@ -2231,7 +2241,7 @@ AutofillDisplayedObserver::AutofillDisplayedObserver(
render_view_host_(render_view_host),
automation_(automation->AsWeakPtr()),
reply_message_(reply_message) {
- Source<RenderViewHost> source(render_view_host_);
+ content::Source<RenderViewHost> source(render_view_host_);
registrar_.Add(this, notification_, source);
}
@@ -2239,10 +2249,10 @@ AutofillDisplayedObserver::~AutofillDisplayedObserver() {}
void AutofillDisplayedObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(type, notification_);
- DCHECK_EQ(Source<RenderViewHost>(source).ptr(), render_view_host_);
+ DCHECK_EQ(content::Source<RenderViewHost>(source).ptr(), render_view_host_);
if (automation_) {
AutomationJSONReply(automation_,
reply_message_.release()).SendSuccess(NULL);
@@ -2288,8 +2298,8 @@ void AutofillChangedObserver::RegisterObserversTask() {
void AutofillChangedObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
if (type == chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED) {
@@ -2364,12 +2374,12 @@ void AutofillFormSubmittedObserver::OnInsufficientFormData() {
void AutofillFormSubmittedObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED);
// Accept in the infobar.
- infobar_helper_ = Source<InfoBarTabHelper>(source).ptr();
+ infobar_helper_ = content::Source<InfoBarTabHelper>(source).ptr();
InfoBarDelegate* infobar = NULL;
infobar = infobar_helper_->GetInfoBarDelegateAt(0);
@@ -2429,8 +2439,8 @@ GetAllNotificationsObserver::~GetAllNotificationsObserver() {}
void GetAllNotificationsObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (!automation_) {
delete this;
return;
@@ -2523,8 +2533,8 @@ OnNotificationBalloonCountObserver::~OnNotificationBalloonCountObserver() {
void OnNotificationBalloonCountObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
CheckBalloonCount();
}
@@ -2556,8 +2566,8 @@ RendererProcessClosedObserver::~RendererProcessClosedObserver() {}
void RendererProcessClosedObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (automation_) {
AutomationJSONReply(automation_,
reply_message_.release()).SendSuccess(NULL);
@@ -2589,8 +2599,8 @@ InputEventAckNotificationObserver::~InputEventAckNotificationObserver() {}
void InputEventAckNotificationObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN) {
AutomationJSONReply(automation_,
reply_message_.release()).SendSuccess(NULL);
@@ -2598,7 +2608,7 @@ void InputEventAckNotificationObserver::Observe(
return;
}
- Details<int> request_details(details);
+ content::Details<int> request_details(details);
// If the event type matches for |count_| times, replies with a JSON message.
if (event_type_ == *request_details.ptr()) {
if (--count_ == 0 && automation_) {
@@ -2663,8 +2673,8 @@ void AllTabsStoppedLoadingObserver::OnNoMorePendingLoads(
void AllTabsStoppedLoadingObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (!automation_) {
AutomationJSONReply(automation_,
reply_message_.release()).SendSuccess(NULL);
@@ -2696,11 +2706,11 @@ NewTabObserver::NewTabObserver(AutomationProvider* automation,
}
void NewTabObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(content::NOTIFICATION_TAB_PARENTED, type);
NavigationController* controller =
- &(Source<TabContentsWrapper>(source).ptr()->controller());
+ &(content::Source<TabContentsWrapper>(source).ptr()->controller());
if (automation_) {
// TODO(phajdan.jr): Clean up this hack. We write the correct return type
// here, but don't send the message. NavigationNotificationObserver
@@ -2784,8 +2794,8 @@ DragTargetDropAckNotificationObserver::
void DragTargetDropAckNotificationObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (automation_) {
AutomationJSONReply(automation_,
reply_message_.release()).SendSuccess(NULL);
@@ -2895,8 +2905,8 @@ BrowserOpenedWithNewProfileNotificationObserver::
void BrowserOpenedWithNewProfileNotificationObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (!automation_) {
delete this;
return;
@@ -2905,7 +2915,7 @@ void BrowserOpenedWithNewProfileNotificationObserver::Observe(
if (type == chrome::NOTIFICATION_PROFILE_CREATED) {
// As part of multi-profile creation, a new browser window will
// automatically be opened.
- Profile* profile = Source<Profile>(source).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
if (!profile) {
AutomationJSONReply(automation_,
reply_message_.release()).SendError("Profile could not be created.");
@@ -2915,11 +2925,11 @@ void BrowserOpenedWithNewProfileNotificationObserver::Observe(
// Store the new browser ID and continue waiting for a new tab within it
// to stop loading.
new_window_id_ = ExtensionTabUtil::GetWindowId(
- Source<Browser>(source).ptr());
+ content::Source<Browser>(source).ptr());
} else if (type == content::NOTIFICATION_LOAD_STOP) {
// Only send the result if the loaded tab is in the new window.
NavigationController* controller =
- Source<NavigationController>(source).ptr();
+ content::Source<NavigationController>(source).ptr();
TabContentsWrapper* tab = TabContentsWrapper::GetCurrentWrapperForContents(
controller->tab_contents());
int window_id = tab ? tab->restore_tab_helper()->window_id().id() : -1;
diff --git a/chrome/browser/automation/automation_provider_observers.h b/chrome/browser/automation/automation_provider_observers.h
index 5eed00a..66ba758 100644
--- a/chrome/browser/automation/automation_provider_observers.h
+++ b/chrome/browser/automation/automation_provider_observers.h
@@ -49,8 +49,8 @@
#include "content/browser/cancelable_request.h"
#include "content/browser/download/download_item.h"
#include "content/browser/download/download_manager.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
#include "ui/gfx/size.h"
@@ -84,14 +84,14 @@ namespace IPC {
class Message;
}
-class InitialLoadObserver : public NotificationObserver {
+class InitialLoadObserver : public content::NotificationObserver {
public:
InitialLoadObserver(size_t tab_count, AutomationProvider* automation);
virtual ~InitialLoadObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Caller owns the return value and is responsible for deleting it.
// Example return value:
@@ -109,7 +109,7 @@ class InitialLoadObserver : public NotificationObserver {
void ConditionMet();
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
size_t crashed_tab_count_;
@@ -139,16 +139,16 @@ class NetworkManagerInitObserver
};
// Observes when webui login becomes ready on chromeos.
-class LoginWebuiReadyObserver : public NotificationObserver {
+class LoginWebuiReadyObserver : public content::NotificationObserver {
public:
explicit LoginWebuiReadyObserver(AutomationProvider* automation);
virtual ~LoginWebuiReadyObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
DISALLOW_COPY_AND_ASSIGN(LoginWebuiReadyObserver);
@@ -156,24 +156,25 @@ class LoginWebuiReadyObserver : public NotificationObserver {
#endif // defined(OS_CHROMEOS)
// Watches for NewTabUI page loads for performance timing purposes.
-class NewTabUILoadObserver : public NotificationObserver {
+class NewTabUILoadObserver : public content::NotificationObserver {
public:
explicit NewTabUILoadObserver(AutomationProvider* automation,
Profile* profile);
virtual ~NewTabUILoadObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
DISALLOW_COPY_AND_ASSIGN(NewTabUILoadObserver);
};
-class NavigationControllerRestoredObserver : public NotificationObserver {
+class NavigationControllerRestoredObserver
+ : public content::NotificationObserver {
public:
NavigationControllerRestoredObserver(AutomationProvider* automation,
NavigationController* controller,
@@ -181,14 +182,14 @@ class NavigationControllerRestoredObserver : public NotificationObserver {
virtual ~NavigationControllerRestoredObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
bool FinishedRestoring();
void SendDone();
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
NavigationController* controller_;
scoped_ptr<IPC::Message> reply_message_;
@@ -196,7 +197,7 @@ class NavigationControllerRestoredObserver : public NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(NavigationControllerRestoredObserver);
};
-class NavigationNotificationObserver : public NotificationObserver {
+class NavigationNotificationObserver : public content::NotificationObserver {
public:
NavigationNotificationObserver(NavigationController* controller,
AutomationProvider* automation,
@@ -207,13 +208,13 @@ class NavigationNotificationObserver : public NotificationObserver {
virtual ~NavigationNotificationObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
void ConditionMet(AutomationMsg_NavigationResponseValues navigation_result);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
NavigationController* controller_;
@@ -224,20 +225,20 @@ class NavigationNotificationObserver : public NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(NavigationNotificationObserver);
};
-class TabStripNotificationObserver : public NotificationObserver {
+class TabStripNotificationObserver : public content::NotificationObserver {
public:
TabStripNotificationObserver(int notification,
AutomationProvider* automation);
virtual ~TabStripNotificationObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
virtual void ObserveTab(NavigationController* controller) = 0;
protected:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
int notification_;
};
@@ -310,20 +311,20 @@ class TabCountChangeObserver : public TabStripModelObserver {
};
// Observes when an extension has been uninstalled.
-class ExtensionUninstallObserver : public NotificationObserver {
+class ExtensionUninstallObserver : public content::NotificationObserver {
public:
ExtensionUninstallObserver(AutomationProvider* automation,
IPC::Message* reply_message,
const std::string& id);
virtual ~ExtensionUninstallObserver();
- // Implementation of NotificationObserver.
+ // Implementation of content::NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
std::string id_;
@@ -333,7 +334,8 @@ class ExtensionUninstallObserver : public NotificationObserver {
// Observes when an extension has finished loading and is ready for use. Also
// checks for possible install errors.
-class ExtensionReadyNotificationObserver : public NotificationObserver {
+class ExtensionReadyNotificationObserver
+ : public content::NotificationObserver {
public:
ExtensionReadyNotificationObserver(ExtensionProcessManager* manager,
ExtensionService* service,
@@ -344,11 +346,11 @@ class ExtensionReadyNotificationObserver : public NotificationObserver {
// Implementation of NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
ExtensionProcessManager* manager_;
ExtensionService* service_;
base::WeakPtr<AutomationProvider> automation_;
@@ -359,22 +361,23 @@ class ExtensionReadyNotificationObserver : public NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(ExtensionReadyNotificationObserver);
};
-class ExtensionUnloadNotificationObserver : public NotificationObserver {
+class ExtensionUnloadNotificationObserver
+ : public content::NotificationObserver {
public:
ExtensionUnloadNotificationObserver();
virtual ~ExtensionUnloadNotificationObserver();
// Implementation of NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
bool did_receive_unload_notification() {
return did_receive_unload_notification_;
}
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
bool did_receive_unload_notification_;
DISALLOW_COPY_AND_ASSIGN(ExtensionUnloadNotificationObserver);
@@ -384,7 +387,7 @@ class ExtensionUnloadNotificationObserver : public NotificationObserver {
// service provides notifications for each extension that gets updated, but
// it does not wait for the updated extensions to be installed or loaded. This
// observer waits until all updated extensions have actually been loaded.
-class ExtensionsUpdatedObserver : public NotificationObserver {
+class ExtensionsUpdatedObserver : public content::NotificationObserver {
public:
ExtensionsUpdatedObserver(ExtensionProcessManager* manager,
AutomationProvider* automation,
@@ -393,11 +396,11 @@ class ExtensionsUpdatedObserver : public NotificationObserver {
// Implementation of NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
ExtensionProcessManager* manager_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
@@ -407,7 +410,8 @@ class ExtensionsUpdatedObserver : public NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(ExtensionsUpdatedObserver);
};
-class ExtensionTestResultNotificationObserver : public NotificationObserver {
+class ExtensionTestResultNotificationObserver
+ : public content::NotificationObserver {
public:
explicit ExtensionTestResultNotificationObserver(
AutomationProvider* automation);
@@ -415,15 +419,15 @@ class ExtensionTestResultNotificationObserver : public NotificationObserver {
// Implementation of NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Sends a test result back to the provider's client, if there is a pending
// provider message and there is a result in the queue.
void MaybeSendResult();
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
// Two queues containing the test results. Although typically only
// one result will be in each queue, there are cases where a queue is
@@ -440,20 +444,20 @@ class ExtensionTestResultNotificationObserver : public NotificationObserver {
// Observes when a new browser has been opened and a tab within it has stopped
// loading.
-class BrowserOpenedNotificationObserver : public NotificationObserver {
+class BrowserOpenedNotificationObserver : public content::NotificationObserver {
public:
BrowserOpenedNotificationObserver(AutomationProvider* automation,
IPC::Message* reply_message);
virtual ~BrowserOpenedNotificationObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
void set_for_browser_command(bool for_browser_command);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
int new_window_id_;
@@ -462,7 +466,7 @@ class BrowserOpenedNotificationObserver : public NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(BrowserOpenedNotificationObserver);
};
-class BrowserClosedNotificationObserver : public NotificationObserver {
+class BrowserClosedNotificationObserver : public content::NotificationObserver {
public:
BrowserClosedNotificationObserver(Browser* browser,
AutomationProvider* automation,
@@ -470,13 +474,13 @@ class BrowserClosedNotificationObserver : public NotificationObserver {
virtual ~BrowserClosedNotificationObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
void set_for_browser_command(bool for_browser_command);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
bool for_browser_command_;
@@ -484,7 +488,8 @@ class BrowserClosedNotificationObserver : public NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(BrowserClosedNotificationObserver);
};
-class BrowserCountChangeNotificationObserver : public NotificationObserver {
+class BrowserCountChangeNotificationObserver
+ : public content::NotificationObserver {
public:
BrowserCountChangeNotificationObserver(int target_count,
AutomationProvider* automation,
@@ -492,37 +497,37 @@ class BrowserCountChangeNotificationObserver : public NotificationObserver {
virtual ~BrowserCountChangeNotificationObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
int target_count_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
DISALLOW_COPY_AND_ASSIGN(BrowserCountChangeNotificationObserver);
};
-class AppModalDialogShownObserver : public NotificationObserver {
+class AppModalDialogShownObserver : public content::NotificationObserver {
public:
AppModalDialogShownObserver(AutomationProvider* automation,
IPC::Message* reply_message);
virtual ~AppModalDialogShownObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
DISALLOW_COPY_AND_ASSIGN(AppModalDialogShownObserver);
};
-class ExecuteBrowserCommandObserver : public NotificationObserver {
+class ExecuteBrowserCommandObserver : public content::NotificationObserver {
public:
virtual ~ExecuteBrowserCommandObserver();
@@ -532,8 +537,8 @@ class ExecuteBrowserCommandObserver : public NotificationObserver {
IPC::Message* reply_message);
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
ExecuteBrowserCommandObserver(AutomationProvider* automation,
@@ -543,7 +548,7 @@ class ExecuteBrowserCommandObserver : public NotificationObserver {
bool Getint(int command, int* type);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
int notification_type_;
scoped_ptr<IPC::Message> reply_message_;
@@ -551,7 +556,7 @@ class ExecuteBrowserCommandObserver : public NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(ExecuteBrowserCommandObserver);
};
-class FindInPageNotificationObserver : public NotificationObserver {
+class FindInPageNotificationObserver : public content::NotificationObserver {
public:
FindInPageNotificationObserver(AutomationProvider* automation,
TabContents* parent_tab,
@@ -560,8 +565,8 @@ class FindInPageNotificationObserver : public NotificationObserver {
virtual ~FindInPageNotificationObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// The Find mechanism is over asynchronous IPC, so a search is kicked off and
// we wait for notification to find out what the results are. As the user is
@@ -573,7 +578,7 @@ class FindInPageNotificationObserver : public NotificationObserver {
static const int kFindInPageRequestId;
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
// We will at some point (before final update) be notified of the ordinal and
// we need to preserve it so we can send it later.
@@ -585,20 +590,20 @@ class FindInPageNotificationObserver : public NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(FindInPageNotificationObserver);
};
-class DomOperationObserver : public NotificationObserver {
+class DomOperationObserver : public content::NotificationObserver {
public:
DomOperationObserver();
virtual ~DomOperationObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
virtual void OnDomOperationCompleted(const std::string& json) = 0;
virtual void OnModalDialogShown() = 0;
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(DomOperationObserver);
};
@@ -623,17 +628,18 @@ class DomOperationMessageSender : public DomOperationObserver {
DISALLOW_COPY_AND_ASSIGN(DomOperationMessageSender);
};
-class DocumentPrintedNotificationObserver : public NotificationObserver {
+class DocumentPrintedNotificationObserver
+ : public content::NotificationObserver {
public:
DocumentPrintedNotificationObserver(AutomationProvider* automation,
IPC::Message* reply_message);
virtual ~DocumentPrintedNotificationObserver();
- virtual void Observe(int type, const NotificationSource& source,
- const NotificationDetails& details);
+ virtual void Observe(int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
bool success_;
scoped_ptr<IPC::Message> reply_message_;
@@ -642,7 +648,7 @@ class DocumentPrintedNotificationObserver : public NotificationObserver {
};
// Collects METRIC_EVENT_DURATION notifications and keep track of the times.
-class MetricEventDurationObserver : public NotificationObserver {
+class MetricEventDurationObserver : public content::NotificationObserver {
public:
MetricEventDurationObserver();
virtual ~MetricEventDurationObserver();
@@ -651,11 +657,11 @@ class MetricEventDurationObserver : public NotificationObserver {
int GetEventDurationMs(const std::string& event_name);
// NotificationObserver interface.
- virtual void Observe(int type, const NotificationSource& source,
- const NotificationDetails& details);
+ virtual void Observe(int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
typedef std::map<std::string, int> EventDurationMap;
EventDurationMap durations_;
@@ -663,27 +669,27 @@ class MetricEventDurationObserver : public NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(MetricEventDurationObserver);
};
-class PageTranslatedObserver : public NotificationObserver {
+class PageTranslatedObserver : public content::NotificationObserver {
public:
PageTranslatedObserver(AutomationProvider* automation,
IPC::Message* reply_message,
TabContents* tab_contents);
virtual ~PageTranslatedObserver();
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
DISALLOW_COPY_AND_ASSIGN(PageTranslatedObserver);
};
-class TabLanguageDeterminedObserver : public NotificationObserver {
+class TabLanguageDeterminedObserver : public content::NotificationObserver {
public:
TabLanguageDeterminedObserver(AutomationProvider* automation,
IPC::Message* reply_message,
@@ -691,13 +697,13 @@ class TabLanguageDeterminedObserver : public NotificationObserver {
TranslateInfoBarDelegate* translate_bar);
virtual ~TabLanguageDeterminedObserver();
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
TabContents* tab_contents_;
@@ -706,7 +712,7 @@ class TabLanguageDeterminedObserver : public NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(TabLanguageDeterminedObserver);
};
-class InfoBarCountObserver : public NotificationObserver {
+class InfoBarCountObserver : public content::NotificationObserver {
public:
InfoBarCountObserver(AutomationProvider* automation,
IPC::Message* reply_message,
@@ -714,17 +720,17 @@ class InfoBarCountObserver : public NotificationObserver {
size_t target_count);
virtual ~InfoBarCountObserver();
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// Checks whether the infobar count matches our target, and if so
// sends the reply message and deletes itself.
void CheckCount();
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
TabContentsWrapper* tab_contents_;
@@ -762,7 +768,7 @@ class LoginObserver : public chromeos::LoginStatusConsumer {
// Collects SCREEN_LOCK_STATE_CHANGED notifications and returns
// whether authentication succeeded to the automation provider.
-class ScreenLockUnlockObserver : public NotificationObserver {
+class ScreenLockUnlockObserver : public content::NotificationObserver {
public:
// Set lock_screen to true to observe lock screen events,
// false for unlock screen events.
@@ -771,16 +777,16 @@ class ScreenLockUnlockObserver : public NotificationObserver {
bool lock_screen);
virtual ~ScreenLockUnlockObserver();
- // NotificationObserver interface.
- virtual void Observe(int type, const NotificationSource& source,
- const NotificationDetails& details);
+ // content::NotificationObserver interface.
+ virtual void Observe(int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details);
protected:
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
bool lock_screen_;
DISALLOW_COPY_AND_ASSIGN(ScreenLockUnlockObserver);
@@ -1236,7 +1242,7 @@ class PasswordStoreLoginsChangedObserver
: public base::RefCountedThreadSafe<
PasswordStoreLoginsChangedObserver,
BrowserThread::DeleteOnUIThread>,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
PasswordStoreLoginsChangedObserver(AutomationProvider* automation,
IPC::Message* reply_message,
@@ -1247,10 +1253,10 @@ class PasswordStoreLoginsChangedObserver
// Schedules a task on the DB thread to register the appropriate observers.
virtual void Init();
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>;
@@ -1268,7 +1274,7 @@ class PasswordStoreLoginsChangedObserver
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
PasswordStoreChange::Type expected_type_;
std::string result_key_;
@@ -1297,7 +1303,7 @@ class AutomationProviderBrowsingDataObserver
// Allows automation provider to wait until page load after selecting an item
// in the omnibox popup.
-class OmniboxAcceptNotificationObserver : public NotificationObserver {
+class OmniboxAcceptNotificationObserver : public content::NotificationObserver {
public:
OmniboxAcceptNotificationObserver(NavigationController* controller,
AutomationProvider* automation,
@@ -1305,11 +1311,11 @@ class OmniboxAcceptNotificationObserver : public NotificationObserver {
virtual ~OmniboxAcceptNotificationObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
NavigationController* controller_;
@@ -1318,7 +1324,7 @@ class OmniboxAcceptNotificationObserver : public NotificationObserver {
};
// Allows the automation provider to wait for a save package notification.
-class SavePackageNotificationObserver : public NotificationObserver {
+class SavePackageNotificationObserver : public content::NotificationObserver {
public:
SavePackageNotificationObserver(DownloadManager* download_manager,
AutomationProvider* automation,
@@ -1326,11 +1332,11 @@ class SavePackageNotificationObserver : public NotificationObserver {
virtual ~SavePackageNotificationObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
@@ -1375,7 +1381,7 @@ class PageSnapshotTaker : public DomOperationObserver {
DISALLOW_COPY_AND_ASSIGN(PageSnapshotTaker);
};
-class NTPInfoObserver : public NotificationObserver {
+class NTPInfoObserver : public content::NotificationObserver {
public:
NTPInfoObserver(AutomationProvider* automation,
IPC::Message* reply_message,
@@ -1383,8 +1389,8 @@ class NTPInfoObserver : public NotificationObserver {
virtual ~NTPInfoObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
void OnTopSitesLoaded();
@@ -1396,14 +1402,14 @@ class NTPInfoObserver : public NotificationObserver {
CancelableRequestProvider::Handle request_;
scoped_ptr<base::DictionaryValue> ntp_info_;
history::TopSites* top_sites_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(NTPInfoObserver);
};
// Observes when an app has been launched, as indicated by a notification that
// a content load in some tab has stopped.
-class AppLaunchObserver : public NotificationObserver {
+class AppLaunchObserver : public content::NotificationObserver {
public:
AppLaunchObserver(NavigationController* controller,
AutomationProvider* automation,
@@ -1412,14 +1418,14 @@ class AppLaunchObserver : public NotificationObserver {
virtual ~AppLaunchObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
NavigationController* controller_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
extension_misc::LaunchContainer launch_container_;
int new_window_id_;
@@ -1431,7 +1437,7 @@ class AppLaunchObserver : public NotificationObserver {
// has been shown in the renderer; (2) a webpage form is filled or previewed
// with Autofill suggestions. A constructor argument specifies the appropriate
// notification to wait for.
-class AutofillDisplayedObserver : public NotificationObserver {
+class AutofillDisplayedObserver : public content::NotificationObserver {
public:
AutofillDisplayedObserver(int notification,
RenderViewHost* render_view_host,
@@ -1439,17 +1445,17 @@ class AutofillDisplayedObserver : public NotificationObserver {
IPC::Message* reply_message);
virtual ~AutofillDisplayedObserver();
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
int notification_;
RenderViewHost* render_view_host_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(AutofillDisplayedObserver);
};
@@ -1461,7 +1467,7 @@ class AutofillChangedObserver
: public base::RefCountedThreadSafe<
AutofillChangedObserver,
BrowserThread::DeleteOnUIThread>,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
AutofillChangedObserver(AutomationProvider* automation,
IPC::Message* reply_message,
@@ -1472,10 +1478,10 @@ class AutofillChangedObserver
// Schedules a task on the DB thread to register the appropriate observers.
virtual void Init();
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>;
@@ -1490,7 +1496,7 @@ class AutofillChangedObserver
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
int num_profiles_;
int num_credit_cards_;
@@ -1507,7 +1513,7 @@ class AutofillChangedObserver
// causes a confirm infobar to appear).
class AutofillFormSubmittedObserver
: public PersonalDataManagerObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
AutofillFormSubmittedObserver(AutomationProvider* automation,
IPC::Message* reply_message,
@@ -1518,13 +1524,13 @@ class AutofillFormSubmittedObserver
virtual void OnPersonalDataChanged() OVERRIDE;
virtual void OnInsufficientFormData() OVERRIDE;
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
PersonalDataManager* pdm_;
@@ -1533,15 +1539,15 @@ class AutofillFormSubmittedObserver
// Allows the automation provider to wait until all the notification
// processes are ready.
-class GetAllNotificationsObserver : public NotificationObserver {
+class GetAllNotificationsObserver : public content::NotificationObserver {
public:
GetAllNotificationsObserver(AutomationProvider* automation,
IPC::Message* reply_message);
virtual ~GetAllNotificationsObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// Sends a message via the |AutomationProvider|. |automation_| must be valid.
@@ -1559,17 +1565,17 @@ class GetAllNotificationsObserver : public NotificationObserver {
// Allows the automation provider to wait for a new notification balloon
// to appear and be ready.
-class NewNotificationBalloonObserver : public NotificationObserver {
+class NewNotificationBalloonObserver : public content::NotificationObserver {
public:
NewNotificationBalloonObserver(AutomationProvider* provider,
IPC::Message* reply_message);
virtual ~NewNotificationBalloonObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
@@ -1578,7 +1584,8 @@ class NewNotificationBalloonObserver : public NotificationObserver {
// Allows the automation provider to wait for a given number of
// notification balloons.
-class OnNotificationBalloonCountObserver : public NotificationObserver {
+class OnNotificationBalloonCountObserver
+ : public content::NotificationObserver {
public:
OnNotificationBalloonCountObserver(AutomationProvider* provider,
IPC::Message* reply_message,
@@ -1591,11 +1598,11 @@ class OnNotificationBalloonCountObserver : public NotificationObserver {
void CheckBalloonCount();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
@@ -1607,18 +1614,18 @@ class OnNotificationBalloonCountObserver : public NotificationObserver {
// Allows the automation provider to wait for a RENDERER_PROCESS_CLOSED
// notification.
-class RendererProcessClosedObserver : public NotificationObserver {
+class RendererProcessClosedObserver : public content::NotificationObserver {
public:
RendererProcessClosedObserver(AutomationProvider* automation,
IPC::Message* reply_message);
virtual ~RendererProcessClosedObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
@@ -1627,7 +1634,7 @@ class RendererProcessClosedObserver : public NotificationObserver {
// Allows the automation provider to wait for acknowledgement that a certain
// type and number of input events has been processed by the renderer.
-class InputEventAckNotificationObserver : public NotificationObserver {
+class InputEventAckNotificationObserver : public content::NotificationObserver {
public:
InputEventAckNotificationObserver(AutomationProvider* automation,
IPC::Message* reply_message,
@@ -1635,11 +1642,11 @@ class InputEventAckNotificationObserver : public NotificationObserver {
virtual ~InputEventAckNotificationObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
int event_type_;
@@ -1653,7 +1660,7 @@ class InputEventAckNotificationObserver : public NotificationObserver {
// creation. Will send a message on construction if no tabs are loading
// currently.
class AllTabsStoppedLoadingObserver : public TabEventObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
AllTabsStoppedLoadingObserver(AutomationProvider* automation,
IPC::Message* reply_message);
@@ -1663,10 +1670,10 @@ class AllTabsStoppedLoadingObserver : public TabEventObserver,
virtual void OnFirstPendingLoad(TabContents* tab_contents) OVERRIDE;
virtual void OnNoMorePendingLoads(TabContents* tab_contents) OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
typedef std::set<TabContents*> TabSet;
@@ -1676,7 +1683,7 @@ class AllTabsStoppedLoadingObserver : public TabEventObserver,
void CheckIfNoMorePendingLoads();
TabSet pending_tabs_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
@@ -1684,18 +1691,18 @@ class AllTabsStoppedLoadingObserver : public TabEventObserver,
};
// Observer used to listen for new tab creation to complete.
-class NewTabObserver : public NotificationObserver {
+class NewTabObserver : public content::NotificationObserver {
public:
NewTabObserver(AutomationProvider* automation, IPC::Message* reply_message);
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
virtual ~NewTabObserver();
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
@@ -1739,18 +1746,19 @@ class WaitForProcessLauncherThreadToGoIdleObserver
// Allows the automation provider to wait for acknowledgement that a drop
// operation has been processed by the renderer.
-class DragTargetDropAckNotificationObserver : public NotificationObserver {
+class DragTargetDropAckNotificationObserver
+ : public content::NotificationObserver {
public:
DragTargetDropAckNotificationObserver(AutomationProvider* automation,
IPC::Message* reply_message);
virtual ~DragTargetDropAckNotificationObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
@@ -1782,7 +1790,7 @@ class ProcessInfoObserver : public MemoryDetails {
// window creation, it creates a new tab and then finally observes it finish
// loading.
class BrowserOpenedWithNewProfileNotificationObserver
- : public NotificationObserver {
+ : public content::NotificationObserver {
public:
BrowserOpenedWithNewProfileNotificationObserver(
AutomationProvider* automation,
@@ -1790,11 +1798,11 @@ class BrowserOpenedWithNewProfileNotificationObserver
virtual ~BrowserOpenedWithNewProfileNotificationObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtr<AutomationProvider> automation_;
scoped_ptr<IPC::Message> reply_message_;
int new_window_id_;
diff --git a/chrome/browser/automation/automation_provider_observers_chromeos.cc b/chrome/browser/automation/automation_provider_observers_chromeos.cc
index 7c7549b7..9f9636f 100644
--- a/chrome/browser/automation/automation_provider_observers_chromeos.cc
+++ b/chrome/browser/automation/automation_provider_observers_chromeos.cc
@@ -56,9 +56,10 @@ LoginWebuiReadyObserver::LoginWebuiReadyObserver(
LoginWebuiReadyObserver::~LoginWebuiReadyObserver() {
}
-void LoginWebuiReadyObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void LoginWebuiReadyObserver::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_LOGIN_WEBUI_READY);
automation_->OnLoginWebuiReady();
delete this;
@@ -109,9 +110,10 @@ ScreenLockUnlockObserver::ScreenLockUnlockObserver(
ScreenLockUnlockObserver::~ScreenLockUnlockObserver() {}
-void ScreenLockUnlockObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ScreenLockUnlockObserver::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED);
if (automation_) {
AutomationJSONReply reply(automation_, reply_message_.release());
diff --git a/chrome/browser/automation/automation_tab_helper_browsertest.cc b/chrome/browser/automation/automation_tab_helper_browsertest.cc
index cb32281..1baff3c 100644
--- a/chrome/browser/automation/automation_tab_helper_browsertest.cc
+++ b/chrome/browser/automation/automation_tab_helper_browsertest.cc
@@ -19,32 +19,32 @@
#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/common/notification_details.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.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/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "net/base/net_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
using testing::_;
-class MockNotificationObserver : public NotificationObserver {
+class MockNotificationObserver : public content::NotificationObserver {
public:
MockNotificationObserver() { }
virtual ~MockNotificationObserver() { }
MOCK_METHOD3(Observe, void(int type,
- const NotificationSource& source,
- const NotificationDetails& details));
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details));
- void Register(int type, const NotificationSource& source) {
+ void Register(int type, const content::NotificationSource& source) {
registrar_.Add(this, type, source);
}
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(MockNotificationObserver);
};
diff --git a/chrome/browser/automation/automation_tab_tracker.h b/chrome/browser/automation/automation_tab_tracker.h
index bce1d6c..5cab11b 100644
--- a/chrome/browser/automation/automation_tab_tracker.h
+++ b/chrome/browser/automation/automation_tab_tracker.h
@@ -23,8 +23,8 @@ class AutomationTabTracker
virtual void RemoveObserver(NavigationController* resource);
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
base::Time GetLastNavigationTime(int handle);
diff --git a/chrome/browser/automation/automation_window_tracker.cc b/chrome/browser/automation/automation_window_tracker.cc
index b2b2097..4724c833 100644
--- a/chrome/browser/automation/automation_window_tracker.cc
+++ b/chrome/browser/automation/automation_window_tracker.cc
@@ -17,10 +17,10 @@ AutomationWindowTracker::~AutomationWindowTracker() {
void AutomationWindowTracker::AddObserver(gfx::NativeWindow resource) {
registrar_.Add(this, chrome::NOTIFICATION_WINDOW_CLOSED,
- Source<gfx::NativeWindow>(resource));
+ content::Source<gfx::NativeWindow>(resource));
}
void AutomationWindowTracker::RemoveObserver(gfx::NativeWindow resource) {
registrar_.Remove(this, chrome::NOTIFICATION_WINDOW_CLOSED,
- Source<gfx::NativeWindow>(resource));
+ content::Source<gfx::NativeWindow>(resource));
}
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 5c6d88f..14f7d69 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -256,9 +256,10 @@ void TestingAutomationProvider::OnSourceProfilesLoaded() {
import_settings_data_.first_run);
}
-void TestingAutomationProvider::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void TestingAutomationProvider::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_SESSION_END);
// OnBrowserRemoved does a ReleaseLater. When session end is received we exit
// before the task runs resulting in this object not being deleted. This
@@ -499,7 +500,7 @@ void TestingAutomationProvider::AppendTab(int handle,
const GURL& url,
IPC::Message* reply_message) {
int append_tab_response = -1; // -1 is the error code
- NotificationObserver* observer = NULL;
+ content::NotificationObserver* observer = NULL;
if (browser_tracker_->ContainsHandle(handle)) {
Browser* browser = browser_tracker_->GetResource(handle);
@@ -1644,7 +1645,7 @@ void TestingAutomationProvider::PrintNow(int tab_handle,
if (tab_contents) {
FindAndActivateTab(tab);
- NotificationObserver* observer =
+ content::NotificationObserver* observer =
new DocumentPrintedNotificationObserver(this, reply_message);
TabContentsWrapper* wrapper =
@@ -4102,8 +4103,8 @@ void TestingAutomationProvider::GetTranslateInfo(
std::string language = helper->language_state().original_language();
if (!language.empty()) {
observer->Observe(chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED,
- Source<TabContents>(tab_contents),
- Details<std::string>(&language));
+ content::Source<TabContents>(tab_contents),
+ content::Details<std::string>(&language));
}
}
diff --git a/chrome/browser/automation/testing_automation_provider.h b/chrome/browser/automation/testing_automation_provider.h
index 7cd9b59..9c8877b 100644
--- a/chrome/browser/automation/testing_automation_provider.h
+++ b/chrome/browser/automation/testing_automation_provider.h
@@ -17,7 +17,7 @@
#include "chrome/browser/importer/importer_list_observer.h"
#include "chrome/browser/sync/profile_sync_service_harness.h"
#include "chrome/browser/ui/browser_list.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/common/page_type.h"
#include "net/base/cert_status_flags.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
@@ -37,7 +37,7 @@ struct WebPluginInfo;
class TestingAutomationProvider : public AutomationProvider,
public BrowserList::Observer,
public importer::ImporterListObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit TestingAutomationProvider(Profile* profile);
@@ -68,10 +68,10 @@ class TestingAutomationProvider : public AutomationProvider,
// importer::ImporterListObserver:
virtual void OnSourceProfilesLoaded() OVERRIDE;
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// IPC Message callbacks.
void CloseBrowser(int handle, IPC::Message* reply_message);
@@ -1402,7 +1402,7 @@ class TestingAutomationProvider : public AutomationProvider,
// query in progress.
HistoryService::Handle redirect_query_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Used to enumerate browser profiles.
scoped_refptr<ImporterList> importer_list_;
diff --git a/chrome/browser/background/background_application_list_model.h b/chrome/browser/background/background_application_list_model.h
index 3a5742a..6adf8e2 100644
--- a/chrome/browser/background/background_application_list_model.h
+++ b/chrome/browser/background/background_application_list_model.h
@@ -12,8 +12,8 @@
#include "base/basictypes.h"
#include "base/observer_list.h"
#include "chrome/common/extensions/extension.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class ExtensionService;
class PrefService;
@@ -21,7 +21,7 @@ class Profile;
// Model for list of Background Applications, that is, Extensions with
// kBackgroundPermission set, associated with a Profile.
-class BackgroundApplicationListModel : public NotificationObserver {
+class BackgroundApplicationListModel : public content::NotificationObserver {
public:
// Observer is informed of changes to the model. Users of the
// BackgroundApplicationListModel should anticipate that associated data,
@@ -104,10 +104,10 @@ class BackgroundApplicationListModel : public NotificationObserver {
// Returns the Application associated with |extension| or NULL.
Application* FindApplication(const Extension* extension);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Notifies observers that some of the data associated with this background
// application, e. g. the Icon, has changed.
@@ -136,7 +136,7 @@ class BackgroundApplicationListModel : public NotificationObserver {
ExtensionList extensions_;
ObserverList<Observer> observers_;
Profile* profile_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(BackgroundApplicationListModel);
};
diff --git a/chrome/browser/background/background_application_list_model_unittest.cc b/chrome/browser/background/background_application_list_model_unittest.cc
index 3cf6c74..a4a80f5 100644
--- a/chrome/browser/background/background_application_list_model_unittest.cc
+++ b/chrome/browser/background/background_application_list_model_unittest.cc
@@ -20,7 +20,7 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/test/base/testing_profile.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_registrar.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 e9e310d..1dbc47a 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -161,73 +161,77 @@ BackgroundContentsService::GetBackgroundContents() const
void BackgroundContentsService::StartObserving(Profile* profile) {
// On startup, load our background pages after extension-apps have loaded.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSIONS_READY,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
// Track the lifecycle of all BackgroundContents in the system to allow us
// to store an up-to-date list of the urls. Start tracking contents when they
// have been opened via CreateBackgroundContents(), and stop tracking them
// when they are closed by script.
registrar_.Add(this, chrome::NOTIFICATION_BACKGROUND_CONTENTS_CLOSED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
// Stop tracking BackgroundContents when they have been deleted (happens
// during shutdown or if the render process dies).
registrar_.Add(this, chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
// Track when the BackgroundContents navigates to a new URL so we can update
// our persisted information as appropriate.
registrar_.Add(this, chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
// Listen for new extension installs so that we can load any associated
// background page.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
// Track when the extensions crash so that the user can be notified
// about it, and the crashed contents can be restarted.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_BACKGROUND_CONTENTS_TERMINATED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
// Listen for extensions to be unloaded so we can shutdown associated
// BackgroundContents.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
// Make sure the extension-crash balloons are removed when the extension is
// uninstalled/reloaded. We cannot do this from UNLOADED since a crashed
// extension is unloaded immediately after the crash, not when user reloads or
// uninstalls the extension.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
}
-void BackgroundContentsService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void BackgroundContentsService::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSIONS_READY:
- LoadBackgroundContentsFromManifests(Source<Profile>(source).ptr());
- LoadBackgroundContentsFromPrefs(Source<Profile>(source).ptr());
+ LoadBackgroundContentsFromManifests(
+ content::Source<Profile>(source).ptr());
+ LoadBackgroundContentsFromPrefs(content::Source<Profile>(source).ptr());
break;
case chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED:
- BackgroundContentsShutdown(Details<BackgroundContents>(details).ptr());
+ BackgroundContentsShutdown(
+ content::Details<BackgroundContents>(details).ptr());
break;
case chrome::NOTIFICATION_BACKGROUND_CONTENTS_CLOSED:
- DCHECK(IsTracked(Details<BackgroundContents>(details).ptr()));
- UnregisterBackgroundContents(Details<BackgroundContents>(details).ptr());
+ DCHECK(IsTracked(content::Details<BackgroundContents>(details).ptr()));
+ UnregisterBackgroundContents(
+ content::Details<BackgroundContents>(details).ptr());
break;
case chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED: {
- DCHECK(IsTracked(Details<BackgroundContents>(details).ptr()));
+ DCHECK(IsTracked(content::Details<BackgroundContents>(details).ptr()));
// Do not register in the pref if the extension has a manifest-specified
// background page.
BackgroundContents* bgcontents =
- Details<BackgroundContents>(details).ptr();
- Profile* profile = Source<Profile>(source).ptr();
+ content::Details<BackgroundContents>(details).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
const string16& appid = GetParentApplicationId(bgcontents);
ExtensionService* extension_service = profile->GetExtensionService();
// extension_service can be NULL when running tests.
@@ -241,8 +245,9 @@ void BackgroundContentsService::Observe(int type,
break;
}
case chrome::NOTIFICATION_EXTENSION_LOADED: {
- const Extension* extension = Details<const Extension>(details).ptr();
- Profile* profile = Source<Profile>(source).ptr();
+ const Extension* extension =
+ content::Details<const Extension>(details).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
if (extension->is_hosted_app() &&
extension->background_url().is_valid()) {
// If there is a background page specified in the manifest for a hosted
@@ -265,18 +270,19 @@ void BackgroundContentsService::Observe(int type,
}
case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED:
case chrome::NOTIFICATION_BACKGROUND_CONTENTS_TERMINATED: {
- Profile* profile = Source<Profile>(source).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
const Extension* extension = NULL;
if (type == chrome::NOTIFICATION_BACKGROUND_CONTENTS_TERMINATED) {
BackgroundContents* bg =
- Details<BackgroundContents>(details).ptr();
+ content::Details<BackgroundContents>(details).ptr();
std::string extension_id = UTF16ToASCII(
BackgroundContentsServiceFactory::GetForProfile(profile)->
GetParentApplicationId(bg));
extension =
profile->GetExtensionService()->GetExtensionById(extension_id, false);
} else {
- ExtensionHost* extension_host = Details<ExtensionHost>(details).ptr();
+ ExtensionHost* extension_host =
+ content::Details<ExtensionHost>(details).ptr();
extension = extension_host->extension();
}
if (!extension)
@@ -292,13 +298,13 @@ void BackgroundContentsService::Observe(int type,
break;
}
case chrome::NOTIFICATION_EXTENSION_UNLOADED:
- switch (Details<UnloadedExtensionInfo>(details)->reason) {
+ switch (content::Details<UnloadedExtensionInfo>(details)->reason) {
// Intentionally fall through.
case extension_misc::UNLOAD_REASON_DISABLE:
case extension_misc::UNLOAD_REASON_UNINSTALL:
ShutdownAssociatedBackgroundContents(
- ASCIIToUTF16(
- Details<UnloadedExtensionInfo>(details)->extension->id()));
+ ASCIIToUTF16(content::Details<UnloadedExtensionInfo>(details)->
+ extension->id()));
break;
case extension_misc::UNLOAD_REASON_UPDATE: {
// If there is a manifest specified background page, then shut it down
@@ -306,7 +312,7 @@ void BackgroundContentsService::Observe(int type,
// then it will be loaded from LOADED callback. Otherwise, leave
// BackgroundContents in place.
const Extension* extension =
- Details<UnloadedExtensionInfo>(details)->extension;
+ content::Details<UnloadedExtensionInfo>(details)->extension;
if (extension->background_url().is_valid())
ShutdownAssociatedBackgroundContents(ASCIIToUTF16(extension->id()));
break;
@@ -314,15 +320,15 @@ void BackgroundContentsService::Observe(int type,
default:
NOTREACHED();
ShutdownAssociatedBackgroundContents(
- ASCIIToUTF16(
- Details<UnloadedExtensionInfo>(details)->extension->id()));
+ ASCIIToUTF16(content::Details<UnloadedExtensionInfo>(details)->
+ extension->id()));
break;
}
break;
case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: {
// Remove any "This extension has crashed" balloons.
- ScheduleCloseBalloon(*Details<const std::string>(details).ptr());
+ ScheduleCloseBalloon(*content::Details<const std::string>(details).ptr());
break;
}
@@ -471,8 +477,8 @@ BackgroundContents* BackgroundContentsService::CreateBackgroundContents(
BackgroundContentsOpened(&details);
NotificationService::current()->Notify(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_OPENED,
- Source<Profile>(profile),
- Details<BackgroundContentsOpenedDetails>(&details));
+ content::Source<Profile>(profile),
+ content::Details<BackgroundContentsOpenedDetails>(&details));
return contents;
}
diff --git a/chrome/browser/background/background_contents_service.h b/chrome/browser/background/background_contents_service.h
index 66ce301..3864da3 100644
--- a/chrome/browser/background/background_contents_service.h
+++ b/chrome/browser/background/background_contents_service.h
@@ -14,9 +14,9 @@
#include "base/task.h"
#include "chrome/browser/profiles/profile_keyed_service.h"
#include "chrome/browser/tab_contents/background_contents.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
#include "content/common/window_container_type.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/window_open_disposition.h"
@@ -44,7 +44,7 @@ struct BackgroundContentsOpenedDetails;
// It is also responsible for tracking the association between
// BackgroundContents and their parent app, and shutting them down when the
// parent app is unloaded.
-class BackgroundContentsService : private NotificationObserver,
+class BackgroundContentsService : private content::NotificationObserver,
public BackgroundContents::Delegate,
public ProfileKeyedService {
public:
@@ -105,10 +105,10 @@ class BackgroundContentsService : private NotificationObserver,
// Registers for various notifications.
void StartObserving(Profile* profile);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Loads all registered BackgroundContents at startup.
void LoadBackgroundContentsFromPrefs(Profile* profile);
@@ -157,7 +157,7 @@ class BackgroundContentsService : private NotificationObserver,
// PrefService used to store list of background pages (or NULL if this is
// running under an incognito profile).
PrefService* prefs_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Information we track about each BackgroundContents.
struct BackgroundContentsInfo {
diff --git a/chrome/browser/background/background_contents_service_unittest.cc b/chrome/browser/background/background_contents_service_unittest.cc
index c62b64e..0daedf7 100644
--- a/chrome/browser/background/background_contents_service_unittest.cc
+++ b/chrome/browser/background/background_contents_service_unittest.cc
@@ -71,24 +71,24 @@ class MockBackgroundContents : public BackgroundContents {
url_ = url;
NotificationService::current()->Notify(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED,
- Source<Profile>(profile_),
- Details<BackgroundContents>(this));
+ content::Source<Profile>(profile_),
+ content::Details<BackgroundContents>(this));
}
virtual const GURL& GetURL() const { return url_; }
void MockClose(Profile* profile) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_CLOSED,
- Source<Profile>(profile),
- Details<BackgroundContents>(this));
+ content::Source<Profile>(profile),
+ content::Details<BackgroundContents>(this));
delete this;
}
~MockBackgroundContents() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED,
- Source<Profile>(profile_),
- Details<BackgroundContents>(this));
+ content::Source<Profile>(profile_),
+ content::Details<BackgroundContents>(this));
}
const string16& appid() { return appid_; }
diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/browser/background/background_mode_manager.cc
index c384cf6..1b58478 100644
--- a/chrome/browser/background/background_mode_manager.cc
+++ b/chrome/browser/background/background_mode_manager.cc
@@ -214,16 +214,16 @@ void BackgroundModeManager::RegisterProfile(Profile* profile) {
// we can display a "background app installed" notification and enter
// "launch on login" mode on the Mac.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PERMISSIONS_UPDATED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
// Check for the presence of background apps after all extensions have been
// loaded, to handle the case where an extension has been manually removed
// while Chrome was not running.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSIONS_READY,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
bmd->applications_->AddObserver(this);
@@ -246,13 +246,14 @@ void BackgroundModeManager::LaunchBackgroundApplication(
}
///////////////////////////////////////////////////////////////////////////////
-// BackgroundModeManager, NotificationObserver overrides
-void BackgroundModeManager::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+// BackgroundModeManager, content::NotificationObserver overrides
+void BackgroundModeManager::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_PREF_CHANGED:
- DCHECK(*Details<std::string>(details).ptr() ==
+ DCHECK(*content::Details<std::string>(details).ptr() ==
prefs::kBackgroundModeEnabled);
if (IsBackgroundModePrefEnabled())
EnableBackgroundMode();
@@ -266,11 +267,11 @@ void BackgroundModeManager::Observe(int type,
break;
case chrome::NOTIFICATION_EXTENSION_LOADED: {
- Extension* extension = Details<Extension>(details).ptr();
+ Extension* extension = content::Details<Extension>(details).ptr();
if (BackgroundApplicationListModel::IsBackgroundApp(*extension)) {
// Extensions loaded after the ExtensionsService is ready should be
// treated as new installs.
- Profile* profile = Source<Profile>(source).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
if (profile->GetExtensionService()->is_ready())
OnBackgroundAppInstalled(extension);
}
@@ -278,7 +279,7 @@ void BackgroundModeManager::Observe(int type,
break;
case chrome::NOTIFICATION_EXTENSION_PERMISSIONS_UPDATED: {
UpdatedExtensionPermissionsInfo* info =
- Details<UpdatedExtensionPermissionsInfo>(details).ptr();
+ content::Details<UpdatedExtensionPermissionsInfo>(details).ptr();
if (info->permissions->HasAPIPermission(
ExtensionAPIPermission::kBackground) &&
info->reason == UpdatedExtensionPermissionsInfo::ADDED) {
diff --git a/chrome/browser/background/background_mode_manager.h b/chrome/browser/background/background_mode_manager.h
index fba7d25..5ee6b44 100644
--- a/chrome/browser/background/background_mode_manager.h
+++ b/chrome/browser/background/background_mode_manager.h
@@ -13,8 +13,8 @@
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/browser/profiles/profile_keyed_service.h"
#include "chrome/browser/status_icons/status_icon.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/models/simple_menu_model.h"
class Browser;
@@ -41,7 +41,7 @@ class StatusTray;
// no open windows to allow apps with the "background" permission to run in the
// background.
class BackgroundModeManager
- : public NotificationObserver,
+ : public content::NotificationObserver,
public BackgroundApplicationListModel::Observer,
public ProfileKeyedService,
public ui::SimpleMenuModel::Delegate {
@@ -139,10 +139,10 @@ class BackgroundModeManager
// which is similar to a shared_ptr.
typedef linked_ptr<BackgroundModeData> BackgroundModeInfo;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// BackgroundApplicationListModel::Observer implementation.
virtual void OnApplicationDataChanged(const Extension* extension,
@@ -233,7 +233,7 @@ class BackgroundModeManager
ProfileInfoCache* profile_cache_;
// Registrars for managing our change observers.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
PrefChangeRegistrar pref_registrar_;
// The profile-keyed data for this background mode manager. Keyed on profile.
diff --git a/chrome/browser/bookmarks/bookmark_html_writer.h b/chrome/browser/bookmarks/bookmark_html_writer.h
index 0621b3c..c84aae2 100644
--- a/chrome/browser/bookmarks/bookmark_html_writer.h
+++ b/chrome/browser/bookmarks/bookmark_html_writer.h
@@ -12,7 +12,7 @@
#include "base/memory/ref_counted.h"
#include "chrome/browser/history/history.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "net/base/file_stream.h"
class BookmarkNode;
@@ -33,7 +33,7 @@ class BookmarksExportObserver {
// Class that fetches favicons for list of bookmarks and
// then starts Writer which outputs bookmarks and favicons to html file.
// Should be used only by WriteBookmarks function.
-class BookmarkFaviconFetcher: public NotificationObserver {
+class BookmarkFaviconFetcher: public content::NotificationObserver {
public:
// Map of URL and corresponding favicons.
typedef std::map<std::string, scoped_refptr<RefCountedMemory> > URLFaviconMap;
@@ -46,10 +46,10 @@ class BookmarkFaviconFetcher: public NotificationObserver {
// Executes bookmark export process.
void ExportBookmarks();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// Recursively extracts URLs from bookmarks.
@@ -86,7 +86,7 @@ class BookmarkFaviconFetcher: public NotificationObserver {
BookmarksExportObserver* observer_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(BookmarkFaviconFetcher);
};
diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc
index 0a1eb01..e09291a 100644
--- a/chrome/browser/bookmarks/bookmark_model.cc
+++ b/chrome/browser/bookmarks/bookmark_model.cc
@@ -185,7 +185,7 @@ void BookmarkModel::Load() {
// Listen for changes to favicons so that we can update the favicon of the
// node appropriately.
registrar_.Add(this, chrome::NOTIFICATION_FAVICON_CHANGED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
// Load the bookmarks. BookmarkStorage notifies us when done.
store_ = new BookmarkStorage(profile_, this);
@@ -617,7 +617,7 @@ void BookmarkModel::DoneLoading(
// And generic notification.
NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
- Source<Profile>(profile_),
+ content::Source<Profile>(profile_),
NotificationService::NoDetails());
}
@@ -669,8 +669,8 @@ void BookmarkModel::RemoveAndDeleteNode(BookmarkNode* delete_me) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_URLS_STARRED,
- Source<Profile>(profile_),
- Details<history::URLsStarredDetails>(&details));
+ content::Source<Profile>(profile_),
+ content::Details<history::URLsStarredDetails>(&details));
}
BookmarkNode* BookmarkModel::AddNode(BookmarkNode* parent,
@@ -692,8 +692,8 @@ BookmarkNode* BookmarkModel::AddNode(BookmarkNode* parent,
details.changed_urls.insert(node->url());
NotificationService::current()->Notify(
chrome::NOTIFICATION_URLS_STARRED,
- Source<Profile>(profile_),
- Details<history::URLsStarredDetails>(&details));
+ content::Source<Profile>(profile_),
+ content::Details<history::URLsStarredDetails>(&details));
}
return node;
}
@@ -788,12 +788,12 @@ void BookmarkModel::CancelPendingFaviconLoadRequests(BookmarkNode* node) {
}
void BookmarkModel::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_FAVICON_CHANGED: {
// Prevent the observers from getting confused for multiple favicon loads.
- Details<history::FaviconChangeDetails> favicon_details(details);
+ content::Details<history::FaviconChangeDetails> favicon_details(details);
for (std::set<GURL>::const_iterator i = favicon_details->urls.begin();
i != favicon_details->urls.end(); ++i) {
std::vector<const BookmarkNode*> nodes;
diff --git a/chrome/browser/bookmarks/bookmark_model.h b/chrome/browser/bookmarks/bookmark_model.h
index 192bc40..9f34ca6 100644
--- a/chrome/browser/bookmarks/bookmark_model.h
+++ b/chrome/browser/bookmarks/bookmark_model.h
@@ -21,7 +21,7 @@
#include "chrome/browser/favicon/favicon_service.h"
#include "chrome/browser/history/history.h"
#include "content/browser/cancelable_request.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/models/tree_node_model.h"
@@ -189,7 +189,8 @@ class BookmarkPermanentNode : public BookmarkNode {
//
// You should NOT directly create a BookmarkModel, instead go through the
// Profile.
-class BookmarkModel : public NotificationObserver, public BookmarkService {
+class BookmarkModel : public content::NotificationObserver,
+ public BookmarkService {
public:
explicit BookmarkModel(Profile* profile);
virtual ~BookmarkModel();
@@ -416,10 +417,10 @@ class BookmarkModel : public NotificationObserver, public BookmarkService {
// If we're waiting on a favicon for node, the load request is canceled.
void CancelPendingFaviconLoadRequests(BookmarkNode* node);
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Generates and returns the next node ID.
int64 generate_next_node_id();
@@ -436,7 +437,7 @@ class BookmarkModel : public NotificationObserver, public BookmarkService {
// delete the returned object.
BookmarkLoadDetails* CreateLoadDetails();
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
Profile* profile_;
diff --git a/chrome/browser/bookmarks/bookmark_model_unittest.cc b/chrome/browser/bookmarks/bookmark_model_unittest.cc
index 60936a9..ffa8bdb 100644
--- a/chrome/browser/bookmarks/bookmark_model_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_model_unittest.cc
@@ -28,9 +28,9 @@
#include "chrome/test/base/model_test_utils.h"
#include "chrome/test/base/testing_profile.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/models/tree_node_iterator.h"
#include "ui/base/models/tree_node_model.h"
@@ -540,22 +540,23 @@ TEST_F(BookmarkModelTest, HasBookmarks) {
EXPECT_TRUE(model_.HasBookmarks());
}
-// NotificationObserver implementation used in verifying we've received the
-// NOTIFY_URLS_STARRED method correctly.
-class StarredListener : public NotificationObserver {
+// content::NotificationObserver implementation used in verifying we've received
+// the NOTIFY_URLS_STARRED method correctly.
+class StarredListener : public content::NotificationObserver {
public:
StarredListener() : notification_count_(0), details_(false) {
registrar_.Add(this, chrome::NOTIFICATION_URLS_STARRED,
- Source<Profile>(NULL));
+ content::Source<Profile>(NULL));
}
// NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE {
if (type == chrome::NOTIFICATION_URLS_STARRED) {
notification_count_++;
- details_ = *(Details<history::URLsStarredDetails>(details).ptr());
+ details_ =
+ *(content::Details<history::URLsStarredDetails>(details).ptr());
}
}
@@ -566,7 +567,7 @@ class StarredListener : public NotificationObserver {
history::URLsStarredDetails details_;
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(StarredListener);
};
diff --git a/chrome/browser/bookmarks/bookmark_storage.h b/chrome/browser/bookmarks/bookmark_storage.h
index 747cd29..135f0d4 100644
--- a/chrome/browser/bookmarks/bookmark_storage.h
+++ b/chrome/browser/bookmarks/bookmark_storage.h
@@ -11,8 +11,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/bookmarks/bookmark_index.h"
#include "chrome/common/important_file_writer.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class BookmarkModel;
class BookmarkNode;
@@ -89,7 +89,7 @@ class BookmarkLoadDetails {
// as notifying the BookmarkStorage every time the model changes.
//
// Internally BookmarkStorage uses BookmarkCodec to do the actual read/write.
-class BookmarkStorage : public NotificationObserver,
+class BookmarkStorage : public content::NotificationObserver,
public ImportantFileWriter::DataSerializer,
public base::RefCountedThreadSafe<BookmarkStorage> {
public:
@@ -137,10 +137,10 @@ class BookmarkStorage : public NotificationObserver,
// the temporary file, and notifies the model.
void FinishHistoryMigration();
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Serializes the data and schedules save using ImportantFileWriter.
// Returns true on successful serialization.
@@ -156,7 +156,7 @@ class BookmarkStorage : public NotificationObserver,
ImportantFileWriter writer_;
// Helper to ensure that we unregister from notifications on destruction.
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
// Path to temporary file created during migrating bookmarks from history.
const FilePath tmp_history_path_;
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc
index c64bf44..7d19625 100644
--- a/chrome/browser/browser_focus_uitest.cc
+++ b/chrome/browser/browser_focus_uitest.cc
@@ -184,8 +184,8 @@ class TestInterstitialPage : public InterstitialPage {
void OnFocusedNodeChanged(bool is_editable_node) {
NotificationService::current()->Notify(
content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
- Source<TabContents>(tab()),
- Details<const bool>(&is_editable_node));
+ content::Source<TabContents>(tab()),
+ content::Details<const bool>(&is_editable_node));
}
private:
@@ -503,12 +503,12 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversal) {
// notified we have switched to an editable node.
bool is_editable_node =
(strcmp(kTextElementID, kExpElementIDs[j + 1]) == 0);
- Details<bool> details(&is_editable_node);
+ content::Details<bool> details(&is_editable_node);
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWaitWithDetails(
browser(), ui::VKEY_TAB, false, false, false, false,
content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
- NotificationSource(Source<TabContents>(
+ content::NotificationSource(content::Source<TabContents>(
browser()->GetSelectedTabContents())),
details));
} else {
@@ -516,7 +516,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversal) {
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
browser(), ui::VKEY_TAB, false, false, false, false,
chrome::NOTIFICATION_FOCUS_RETURNED_TO_BROWSER,
- NotificationSource(Source<Browser>(browser()))));
+ content::NotificationSource(content::Source<Browser>(browser()))));
}
}
@@ -546,12 +546,12 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversal) {
// If the next element is the kTextElementID, we expect to be
// notified we have switched to an editable node.
bool is_editable_node = (strcmp(kTextElementID, next_element) == 0);
- Details<bool> details(&is_editable_node);
+ content::Details<bool> details(&is_editable_node);
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWaitWithDetails(
browser(), ui::VKEY_TAB, false, true, false, false,
content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
- NotificationSource(Source<TabContents>(
+ content::NotificationSource(content::Source<TabContents>(
browser()->GetSelectedTabContents())),
details));
} else {
@@ -559,7 +559,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversal) {
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
browser(), ui::VKEY_TAB, false, true, false, false,
chrome::NOTIFICATION_FOCUS_RETURNED_TO_BROWSER,
- NotificationSource(Source<Browser>(browser()))));
+ content::NotificationSource(content::Source<Browser>(browser()))));
}
// Let's make sure the focus is on the expected element in the page.
@@ -631,16 +631,16 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversalOnInterstitial) {
ASSERT_STREQ(kExpElementIDs[j], actual.c_str());
int notification_type;
- NotificationSource notification_source =
+ content::NotificationSource notification_source =
NotificationService::AllSources();
if (j < arraysize(kExpElementIDs) - 1) {
notification_type = content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE;
- notification_source = Source<TabContents>(
+ notification_source = content::Source<TabContents>(
interstitial_page->tab());
} else {
// On the last tab key press, the focus returns to the browser.
notification_type = chrome::NOTIFICATION_FOCUS_RETURNED_TO_BROWSER;
- notification_source = Source<Browser>(browser());
+ notification_source = content::Source<Browser>(browser());
}
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
@@ -666,16 +666,16 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversalOnInterstitial) {
// Now let's press shift-tab to move the focus in reverse.
for (size_t j = 0; j < 7; ++j) {
int notification_type;
- NotificationSource notification_source =
+ content::NotificationSource notification_source =
NotificationService::AllSources();
if (j < arraysize(kExpElementIDs) - 1) {
notification_type = content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE;
- notification_source = Source<TabContents>(
+ notification_source = content::Source<TabContents>(
interstitial_page->tab());
} else {
// On the last tab key press, the focus returns to the browser.
notification_type = chrome::NOTIFICATION_FOCUS_RETURNED_TO_BROWSER;
- notification_source = Source<Browser>(browser());
+ notification_source = content::Source<Browser>(browser());
}
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
@@ -860,7 +860,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FocusOnReload) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
@@ -875,7 +875,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FocusOnReload) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
@@ -897,7 +897,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_FocusOnReloadCrashedTab) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
diff --git a/chrome/browser/browser_keyevents_browsertest.cc b/chrome/browser/browser_keyevents_browsertest.cc
index 64545c5..91e61c3 100644
--- a/chrome/browser/browser_keyevents_browsertest.cc
+++ b/chrome/browser/browser_keyevents_browsertest.cc
@@ -20,7 +20,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_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "net/test/test_server.h"
#include "ui/base/keycodes/keyboard_codes.h"
@@ -82,12 +82,12 @@ const wchar_t* GetBoolString(bool value) {
}
// A class to help wait for the finish of a key event test.
-class TestFinishObserver : public NotificationObserver {
+class TestFinishObserver : public content::NotificationObserver {
public:
explicit TestFinishObserver(RenderViewHost* render_view_host)
: finished_(false), waiting_(false) {
registrar_.Add(this, chrome::NOTIFICATION_DOM_OPERATION_RESPONSE,
- Source<RenderViewHost>(render_view_host));
+ content::Source<RenderViewHost>(render_view_host));
}
bool WaitForFinish() {
@@ -100,10 +100,10 @@ class TestFinishObserver : public NotificationObserver {
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_DOM_OPERATION_RESPONSE);
- Details<DomOperationNotificationDetails> dom_op_details(details);
+ content::Details<DomOperationNotificationDetails> dom_op_details(details);
// We might receive responses for other script execution, but we only
// care about the test finished message.
if (dom_op_details->json() == "\"FINISHED\"") {
@@ -116,7 +116,7 @@ class TestFinishObserver : public NotificationObserver {
private:
bool finished_;
bool waiting_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(TestFinishObserver);
};
@@ -707,7 +707,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_ReservedAccelerators) {
ASSERT_NO_FATAL_FAILURE(SuppressAllEvents(1, true));
ui_test_utils::WindowedNotificationObserver wait_for_tab_closed(
- content::NOTIFICATION_TAB_CLOSED, Source<NavigationController>(
+ content::NOTIFICATION_TAB_CLOSED, content::Source<NavigationController>(
&browser()->GetTabContentsAt(1)->controller()));
// Press Ctrl/Cmd+W, which will close the tab.
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 073f52d..704a8af 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -677,10 +677,10 @@ bool BrowserProcessImpl::plugin_finder_disabled() const {
}
void BrowserProcessImpl::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED) {
- std::string* pref = Details<std::string>(details).ptr();
+ std::string* pref = content::Details<std::string>(details).ptr();
if (*pref == prefs::kDefaultBrowserSettingEnabled) {
if (local_state_->GetBoolean(prefs::kDefaultBrowserSettingEnabled))
ShellIntegration::SetAsDefaultBrowser();
diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h
index dcfb7fa..f558ad9 100644
--- a/chrome/browser/browser_process_impl.h
+++ b/chrome/browser/browser_process_impl.h
@@ -21,8 +21,8 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/browser/prefs/pref_member.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ipc/ipc_message.h"
class BrowserOnlineStateObserver;
@@ -42,7 +42,7 @@ class BrowserPolicyConnector;
// Real implementation of BrowserProcess that creates and returns the services.
class BrowserProcessImpl : public BrowserProcess,
public base::NonThreadSafe,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit BrowserProcessImpl(const CommandLine& command_line);
virtual ~BrowserProcessImpl();
@@ -107,10 +107,10 @@ class BrowserProcessImpl : public BrowserProcess,
safe_browsing_detection_service() OVERRIDE;
virtual bool plugin_finder_disabled() const OVERRIDE;
- // NotificationObserver methods
+ // content::NotificationObserver methods
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
virtual void StartAutoupdateTimer() OVERRIDE;
@@ -290,7 +290,7 @@ class BrowserProcessImpl : public BrowserProcess,
scoped_ptr<ChromeResourceDispatcherHostDelegate>
resource_dispatcher_host_delegate_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
scoped_refptr<MHTMLGenerationManager> mhtml_generation_manager_;
diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc
index 7e2f993..4b45cbc 100644
--- a/chrome/browser/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data_remover.cc
@@ -46,7 +46,7 @@
#include "content/browser/download/download_manager.h"
#include "content/browser/in_process_webkit/webkit_context.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "net/base/cookie_monster.h"
#include "net/base/net_errors.h"
#include "net/base/transport_security_state.h"
@@ -154,7 +154,7 @@ void BrowsingDataRemover::Remove(int remove_mask) {
TemplateURLServiceFactory::GetForProfile(profile_);
if (keywords_model && !keywords_model->loaded()) {
registrar_.Add(this, chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED,
- Source<TemplateURLService>(keywords_model));
+ content::Source<TemplateURLService>(keywords_model));
keywords_model->Load();
} else if (keywords_model) {
keywords_model->RemoveAutoGeneratedBetween(delete_begin_, delete_end_);
@@ -341,13 +341,13 @@ base::Time BrowsingDataRemover::CalculateBeginDeleteTime(
}
void BrowsingDataRemover::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
// TODO(brettw) bug 1139736: This should also observe session
// clearing (what about other things such as passwords, etc.?) and wait for
// them to complete before continuing.
DCHECK(type == chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED);
- TemplateURLService* model = Source<TemplateURLService>(source).ptr();
+ TemplateURLService* model = content::Source<TemplateURLService>(source).ptr();
if (model->profile() == profile_->GetOriginalProfile()) {
registrar_.RemoveAll();
model->RemoveAutoGeneratedBetween(delete_begin_, delete_end_);
diff --git a/chrome/browser/browsing_data_remover.h b/chrome/browser/browsing_data_remover.h
index 4405400..f30ab36 100644
--- a/chrome/browser/browsing_data_remover.h
+++ b/chrome/browser/browsing_data_remover.h
@@ -15,8 +15,8 @@
#include "chrome/browser/prefs/pref_member.h"
#include "content/browser/appcache/chrome_appcache_service.h"
#include "content/browser/cancelable_request.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "webkit/quota/quota_types.h"
class ExtensionSpecialStoragePolicy;
@@ -43,7 +43,7 @@ class QuotaManager;
// BrowsingDataRemover is responsible for removing data related to browsing:
// visits in url database, downloads, cookies ...
-class BrowsingDataRemover : public NotificationObserver,
+class BrowsingDataRemover : public content::NotificationObserver,
public base::WaitableEventWatcher::Delegate {
public:
// Time period ranges available when doing browsing data removals.
@@ -129,12 +129,13 @@ class BrowsingDataRemover : public NotificationObserver,
friend class DeleteTask<BrowsingDataRemover>;
virtual ~BrowsingDataRemover();
- // NotificationObserver method. Callback when TemplateURLService has finished
- // loading. Deletes the entries from the model, and if we're not waiting on
- // anything else notifies observers and deletes this BrowsingDataRemover.
+ // content::NotificationObserver method. Callback when TemplateURLService has
+ // finished loading. Deletes the entries from the model, and if we're not
+ // waiting on anything else notifies observers and deletes this
+ // BrowsingDataRemover.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// WaitableEventWatcher implementation.
// Called when plug-in data has been cleared. Invokes NotifyAndDeleteIfDone.
@@ -206,7 +207,7 @@ class BrowsingDataRemover : public NotificationObserver,
// already removing, and vice-versa.
static void set_removing(bool removing);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Profile we're to remove from.
Profile* profile_;
diff --git a/chrome/browser/chrome_plugin_service_filter.cc b/chrome/browser/chrome_plugin_service_filter.cc
index 4f73bfe..cb3f6fd 100644
--- a/chrome/browser/chrome_plugin_service_filter.cc
+++ b/chrome/browser/chrome_plugin_service_filter.cc
@@ -133,13 +133,15 @@ ChromePluginServiceFilter::ChromePluginServiceFilter() {
ChromePluginServiceFilter::~ChromePluginServiceFilter() {
}
-void ChromePluginServiceFilter::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ChromePluginServiceFilter::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: {
- int render_process_id = Source<RenderProcessHost>(source).ptr()->id();
+ int render_process_id =
+ content::Source<RenderProcessHost>(source).ptr()->id();
base::AutoLock auto_lock(lock_);
for (size_t i = 0; i < overridden_plugins_.size(); ++i) {
@@ -151,7 +153,7 @@ void ChromePluginServiceFilter::Observe(int type,
break;
}
case chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED: {
- Profile* profile = Source<Profile>(source).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
PluginService::GetInstance()->PurgePluginListCache(profile, false);
if (profile->HasOffTheRecordProfile()) {
PluginService::GetInstance()->PurgePluginListCache(
diff --git a/chrome/browser/chrome_plugin_service_filter.h b/chrome/browser/chrome_plugin_service_filter.h
index 764e1e7..d3486ce 100644
--- a/chrome/browser/chrome_plugin_service_filter.h
+++ b/chrome/browser/chrome_plugin_service_filter.h
@@ -15,8 +15,8 @@
#include "base/memory/singleton.h"
#include "base/synchronization/lock.h"
#include "content/browser/plugin_service_filter.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
class PluginPrefs;
@@ -25,7 +25,7 @@ class Profile;
// This class must be created (by calling the |GetInstance| method) on the UI
// thread, but is safe to use on any thread after that.
class ChromePluginServiceFilter : public content::PluginServiceFilter,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
static ChromePluginServiceFilter* GetInstance();
@@ -72,12 +72,12 @@ class ChromePluginServiceFilter : public content::PluginServiceFilter,
ChromePluginServiceFilter();
virtual ~ChromePluginServiceFilter();
- // NotificationObserver implementation:
+ // content::NotificationObserver implementation:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::Lock lock_; // Guards access to member variables.
// Map of plugin paths to the origin they are restricted to.
diff --git a/chrome/browser/chromeos/boot_times_loader.cc b/chrome/browser/chromeos/boot_times_loader.cc
index d1dea1d..76d92b4 100644
--- a/chrome/browser/chromeos/boot_times_loader.cc
+++ b/chrome/browser/chromeos/boot_times_loader.cc
@@ -430,11 +430,11 @@ void BootTimesLoader::AddLogoutTimeMarker(
void BootTimesLoader::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_LOGIN_AUTHENTICATION: {
- Details<AuthenticationNotificationDetails> auth_details(details);
+ content::Details<AuthenticationNotificationDetails> auth_details(details);
if (auth_details->success()) {
AddLoginTimeMarker("Authenticate", true);
RecordCurrentStats(kLoginSuccess);
@@ -444,7 +444,8 @@ void BootTimesLoader::Observe(
break;
}
case content::NOTIFICATION_LOAD_START: {
- NavigationController* tab = Source<NavigationController>(source).ptr();
+ NavigationController* tab =
+ content::Source<NavigationController>(source).ptr();
RenderWidgetHost* rwh = GetRenderWidgetHost(tab);
DCHECK(rwh);
AddLoginTimeMarker("TabLoad-Start: " + GetTabUrl(rwh), false);
@@ -452,7 +453,8 @@ void BootTimesLoader::Observe(
break;
}
case content::NOTIFICATION_LOAD_STOP: {
- NavigationController* tab = Source<NavigationController>(source).ptr();
+ NavigationController* tab =
+ content::Source<NavigationController>(source).ptr();
RenderWidgetHost* rwh = GetRenderWidgetHost(tab);
if (render_widget_hosts_loading_.find(rwh) !=
render_widget_hosts_loading_.end()) {
@@ -461,7 +463,7 @@ void BootTimesLoader::Observe(
break;
}
case content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT: {
- RenderWidgetHost* rwh = Source<RenderWidgetHost>(source).ptr();
+ RenderWidgetHost* rwh = content::Source<RenderWidgetHost>(source).ptr();
if (render_widget_hosts_loading_.find(rwh) !=
render_widget_hosts_loading_.end()) {
AddLoginTimeMarker("TabPaint: " + GetTabUrl(rwh), false);
@@ -470,7 +472,7 @@ void BootTimesLoader::Observe(
break;
}
case content::NOTIFICATION_TAB_CONTENTS_DESTROYED: {
- TabContents* tab_contents = Source<TabContents>(source).ptr();
+ TabContents* tab_contents = content::Source<TabContents>(source).ptr();
RenderWidgetHost* render_widget_host =
GetRenderWidgetHost(&tab_contents->controller());
render_widget_hosts_loading_.erase(render_widget_host);
diff --git a/chrome/browser/chromeos/boot_times_loader.h b/chrome/browser/chromeos/boot_times_loader.h
index 7bffef8..dfd73d2 100644
--- a/chrome/browser/chromeos/boot_times_loader.h
+++ b/chrome/browser/chromeos/boot_times_loader.h
@@ -14,8 +14,8 @@
#include "base/time.h"
#include "content/browser/cancelable_request.h"
#include "content/browser/renderer_host/render_widget_host.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
namespace chromeos {
@@ -32,7 +32,7 @@ namespace chromeos {
// . When you want the version invoke: loader.GetBootTimes(&consumer, callback);
class BootTimesLoader
: public CancelableRequestProvider,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
BootTimesLoader();
virtual ~BootTimesLoader();
@@ -102,10 +102,10 @@ class BootTimesLoader
// previous login attempt times.
void RecordLoginAttempted();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Writes the logout times to a /tmp/logout-times-sent. Unlike login
// times, we manually call this function for logout times, as we cannot
@@ -166,7 +166,7 @@ class BootTimesLoader
scoped_refptr<Backend> backend_;
// Used to track notifications for login.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::AtomicSequenceNumber num_tabs_;
bool have_registered_;
diff --git a/chrome/browser/chromeos/cros_settings.h b/chrome/browser/chromeos/cros_settings.h
index cc15f2f..660c447 100644
--- a/chrome/browser/chromeos/cros_settings.h
+++ b/chrome/browser/chromeos/cros_settings.h
@@ -14,7 +14,7 @@
#include "base/observer_list.h"
#include "base/threading/non_thread_safe.h"
#include "chrome/browser/chromeos/cros_settings_names.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
namespace base {
template <typename T> struct DefaultLazyInstanceTraits;
@@ -66,8 +66,10 @@ class CrosSettings : public base::NonThreadSafe {
// If the pref at the given path changes, we call the observer's Observe
// method with PREF_CHANGED.
- void AddSettingsObserver(const char* path, NotificationObserver* obs);
- void RemoveSettingsObserver(const char* path, NotificationObserver* obs);
+ void AddSettingsObserver(const char* path,
+ content::NotificationObserver* obs);
+ void RemoveSettingsObserver(const char* path,
+ content::NotificationObserver* obs);
// Returns the provider that handles settings with the path or prefix.
CrosSettingsProvider* GetProvider(const std::string& path) const;
@@ -78,7 +80,7 @@ class CrosSettings : public base::NonThreadSafe {
// A map from settings names to a list of observers. Observers get fired in
// the order they are added.
- typedef ObserverList<NotificationObserver> NotificationObserverList;
+ typedef ObserverList<content::NotificationObserver> NotificationObserverList;
typedef base::hash_map<std::string, NotificationObserverList*>
SettingsObserverMap;
SettingsObserverMap settings_observers_;
diff --git a/chrome/browser/chromeos/enterprise_extension_observer.cc b/chrome/browser/chromeos/enterprise_extension_observer.cc
index 32f1c82..2de2806 100644
--- a/chrome/browser/chromeos/enterprise_extension_observer.cc
+++ b/chrome/browser/chromeos/enterprise_extension_observer.cc
@@ -19,18 +19,19 @@ EnterpriseExtensionObserver::EnterpriseExtensionObserver(Profile* profile)
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
registrar_.Add(this,
chrome::NOTIFICATION_EXTENSION_INSTALLED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
-void EnterpriseExtensionObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void EnterpriseExtensionObserver::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(type == chrome::NOTIFICATION_EXTENSION_INSTALLED);
- if (Source<Profile>(source).ptr() != profile_) {
+ if (content::Source<Profile>(source).ptr() != profile_) {
return;
}
- Extension* extension = Details<Extension>(details).ptr();
+ Extension* extension = content::Details<Extension>(details).ptr();
if (extension->location() != Extension::EXTERNAL_POLICY_DOWNLOAD) {
return;
}
diff --git a/chrome/browser/chromeos/frame/layout_mode_button.h b/chrome/browser/chromeos/frame/layout_mode_button.h
index 82248a9..0d26c62 100644
--- a/chrome/browser/chromeos/frame/layout_mode_button.h
+++ b/chrome/browser/chromeos/frame/layout_mode_button.h
@@ -7,20 +7,17 @@
#pragma once
#include "base/basictypes.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "views/controls/button/button.h"
#include "views/controls/button/image_button.h"
-class NotificationDetails;
-class NotificationSource;
-
namespace chromeos {
// Maximize/restore button in the corner of each browser window.
class LayoutModeButton : public views::ImageButton,
public views::ButtonListener,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
LayoutModeButton();
virtual ~LayoutModeButton();
@@ -29,10 +26,10 @@ class LayoutModeButton : public views::ImageButton,
virtual gfx::Size GetPreferredSize() OVERRIDE;
virtual bool HitTest(const gfx::Point& l) const OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
void Init();
@@ -45,7 +42,7 @@ class LayoutModeButton : public views::ImageButton,
void UpdateForCurrentLayoutMode();
// A registrar for subscribing to LAYOUT_MODE_CHANGED notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(LayoutModeButton);
};
diff --git a/chrome/browser/chromeos/frame/panel_controller.cc b/chrome/browser/chromeos/frame/panel_controller.cc
index 174d67a..8ddd9e1 100644
--- a/chrome/browser/chromeos/frame/panel_controller.cc
+++ b/chrome/browser/chromeos/frame/panel_controller.cc
@@ -398,8 +398,8 @@ bool PanelController::PanelClientEvent(GdkEventClient* event) {
State state = new_state ? EXPANDED : MINIMIZED;
NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_STATE_CHANGED,
- Source<PanelController>(this),
- Details<State>(&state));
+ content::Source<PanelController>(this),
+ content::Details<State>(&state));
}
}
#endif
diff --git a/chrome/browser/chromeos/input_method/input_method_manager.cc b/chrome/browser/chromeos/input_method/input_method_manager.cc
index 6a1dce1..107cc33 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager.cc
@@ -24,8 +24,8 @@
#include "chrome/browser/chromeos/input_method/xkeyboard.h"
#include "chrome/browser/chromeos/language_preferences.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.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 "googleurl/src/gurl.h"
@@ -129,7 +129,7 @@ namespace input_method {
// The implementation of InputMethodManager.
class InputMethodManagerImpl : public HotkeyManager::Observer,
public InputMethodManager,
- public NotificationObserver,
+ public content::NotificationObserver,
public IBusController::Observer {
public:
InputMethodManagerImpl()
@@ -1162,10 +1162,10 @@ class InputMethodManagerImpl : public HotkeyManager::Observer,
enable_auto_ime_shutdown_ = enable;
}
- // NotificationObserver implementation:
+ // content::NotificationObserver implementation:
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
// Stop the input method daemon on browser shutdown.
if (type == content::NOTIFICATION_APP_TERMINATING) {
shutting_down_ = true;
@@ -1318,7 +1318,7 @@ class InputMethodManagerImpl : public HotkeyManager::Observer,
InputMethodConfigRequests current_config_values_;
// This is used to register this object to APP_TERMINATING notification.
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
// True if we should launch the input method daemon.
bool should_launch_ime_;
diff --git a/chrome/browser/chromeos/locale_change_guard.h b/chrome/browser/chromeos/locale_change_guard.h
index 1ba08d7..b76d082 100644
--- a/chrome/browser/chromeos/locale_change_guard.h
+++ b/chrome/browser/chromeos/locale_change_guard.h
@@ -11,12 +11,10 @@
#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/chromeos/notifications/system_notification.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
-class NotificationDetails;
-class NotificationSource;
class Profile;
namespace base {
@@ -28,7 +26,7 @@ namespace chromeos {
// Performs check whether locale has been changed automatically recently
// (based on synchronized user preference). If so: shows notification that
// allows user to revert change.
-class LocaleChangeGuard : public NotificationObserver {
+class LocaleChangeGuard : public content::NotificationObserver {
public:
explicit LocaleChangeGuard(Profile* profile);
virtual ~LocaleChangeGuard();
@@ -47,17 +45,17 @@ class LocaleChangeGuard : public NotificationObserver {
void AcceptLocaleChange();
void Check();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
std::string from_locale_;
std::string to_locale_;
Profile* profile_;
scoped_ptr<chromeos::SystemNotification> note_;
bool reverted_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// We want to show locale change notification in previous language however
// we cannot directly load strings for non-current locale. So we cache
diff --git a/chrome/browser/chromeos/login/base_login_display_host.cc b/chrome/browser/chromeos/login/base_login_display_host.cc
index 1525153..c342562 100644
--- a/chrome/browser/chromeos/login/base_login_display_host.cc
+++ b/chrome/browser/chromeos/login/base_login_display_host.cc
@@ -205,9 +205,10 @@ void BaseLoginDisplayHost::StartSignInScreen() {
// BaseLoginDisplayHost --------------------------------------------------------
-void BaseLoginDisplayHost::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void BaseLoginDisplayHost::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
CHECK(type == content::NOTIFICATION_APP_EXITING);
registrar_.RemoveAll();
diff --git a/chrome/browser/chromeos/login/base_login_display_host.h b/chrome/browser/chromeos/login/base_login_display_host.h
index f4287d6..16c3f7c 100644
--- a/chrome/browser/chromeos/login/base_login_display_host.h
+++ b/chrome/browser/chromeos/login/base_login_display_host.h
@@ -11,8 +11,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/chromeos/login/login_display.h"
#include "chrome/browser/chromeos/login/login_display_host.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/rect.h"
namespace views {
@@ -28,7 +28,7 @@ class WizardController;
// An abstract base class that defines OOBE/login screen host.
// It encapsulates controllers, background integration and flow.
class BaseLoginDisplayHost : public LoginDisplayHost,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit BaseLoginDisplayHost(const gfx::Rect& background_bounds);
virtual ~BaseLoginDisplayHost();
@@ -51,15 +51,15 @@ class BaseLoginDisplayHost : public LoginDisplayHost,
const gfx::Rect& background_bounds() const { return background_bounds_; }
private:
- // NotificationObserver implementation:
+ // content::NotificationObserver implementation:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Used to calculate position of the screens and background.
gfx::Rect background_bounds_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Default LoginDisplayHost.
static LoginDisplayHost* default_host_;
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
index 710a238..660524b 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -119,16 +119,17 @@ void ExistingUserController::Init(const UserVector& users) {
}
////////////////////////////////////////////////////////////////////////////////
-// ExistingUserController, NotificationObserver implementation:
+// ExistingUserController, content::NotificationObserver implementation:
//
-void ExistingUserController::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ExistingUserController::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type != chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED)
return;
- UserManager::User* user = Details<UserManager::User>(details).ptr();
+ UserManager::User* user = content::Details<UserManager::User>(details).ptr();
login_display_->OnUserImageChanged(user);
}
diff --git a/chrome/browser/chromeos/login/existing_user_controller.h b/chrome/browser/chromeos/login/existing_user_controller.h
index 3dc0ce1..aebf04d 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.h
+++ b/chrome/browser/chromeos/login/existing_user_controller.h
@@ -21,8 +21,8 @@
#include "chrome/browser/chromeos/login/ownership_status_checker.h"
#include "chrome/browser/chromeos/login/password_changed_view.h"
#include "chrome/browser/chromeos/login/user_manager.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
#include "ui/gfx/rect.h"
@@ -44,7 +44,7 @@ class UserCrosSettingsProvider;
// ExistingUserController maintains it's own life cycle and deletes itself when
// the user logs in (or chooses to see other settings).
class ExistingUserController : public LoginDisplay::Delegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public LoginPerformer::Delegate,
public LoginUtils::Delegate,
public CaptchaView::Delegate,
@@ -74,10 +74,10 @@ class ExistingUserController : public LoginDisplay::Delegate,
virtual void OnUserSelected(const std::string& username) OVERRIDE;
virtual void OnStartEnterpriseEnrollment() OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Set a delegate that we will pass LoginStatusConsumer events to.
// Used for testing.
@@ -186,7 +186,7 @@ class ExistingUserController : public LoginDisplay::Delegate,
GURL guest_mode_url_;
// Used for user image changed notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Factory of callbacks.
base::WeakPtrFactory<ExistingUserController> weak_factory_;
diff --git a/chrome/browser/chromeos/login/google_authenticator.cc b/chrome/browser/chromeos/login/google_authenticator.cc
index 557a374a..cc96b1c 100644
--- a/chrome/browser/chromeos/login/google_authenticator.cc
+++ b/chrome/browser/chromeos/login/google_authenticator.cc
@@ -172,11 +172,11 @@ void GoogleAuthenticator::LoginOffTheRecord() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
int mount_error = chromeos::kCryptohomeMountErrorNone;
if (CrosLibrary::Get()->GetCryptohomeLibrary()->MountForBwsi(&mount_error)) {
- AuthenticationNotificationDetails details(true);
+ Authenticationcontent::NotificationDetails details(true);
NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_AUTHENTICATION,
NotificationService::AllSources(),
- Details<AuthenticationNotificationDetails>(&details));
+ content::Details<AuthenticationNotificationDetails>(&details));
consumer_->OnOffTheRecordLoginSuccess();
} else {
LOG(ERROR) << "Could not mount tmpfs: " << mount_error;
diff --git a/chrome/browser/chromeos/login/login_html_dialog.cc b/chrome/browser/chromeos/login/login_html_dialog.cc
index 8b494e8..53c439f 100644
--- a/chrome/browser/chromeos/login/login_html_dialog.cc
+++ b/chrome/browser/chromeos/login/login_html_dialog.cc
@@ -73,7 +73,8 @@ void LoginHtmlDialog::Show() {
bubble_frame_view_->StartThrobber();
notification_registrar_.Add(
this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
- Source<TabContents>(html_view->dom_contents()->tab_contents()));
+ content::Source<TabContents>(
+ html_view->dom_contents()->tab_contents()));
}
#endif
html_view->GetWidget()->Show();
@@ -136,8 +137,8 @@ bool LoginHtmlDialog::HandleContextMenu(const ContextMenuParams& params) {
}
void LoginHtmlDialog::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME);
#if defined(USE_AURA)
// TODO(saintlou): Do we need a throbber for Aura?
diff --git a/chrome/browser/chromeos/login/login_html_dialog.h b/chrome/browser/chromeos/login/login_html_dialog.h
index 189de35..a02966c 100644
--- a/chrome/browser/chromeos/login/login_html_dialog.h
+++ b/chrome/browser/chromeos/login/login_html_dialog.h
@@ -9,8 +9,8 @@
#include <string>
#include "chrome/browser/ui/webui/html_dialog_ui.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
@@ -20,7 +20,7 @@ class BubbleFrameView;
// Launches html dialog during OOBE/Login with specified URL and title.
class LoginHtmlDialog : public HtmlDialogUIDelegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// Delegate class to get notifications from the dialog.
class Delegate {
@@ -68,10 +68,10 @@ class LoginHtmlDialog : public HtmlDialogUIDelegate,
virtual bool ShouldShowDialogTitle() const OVERRIDE;
virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// Notifications receiver.
@@ -81,7 +81,7 @@ class LoginHtmlDialog : public HtmlDialogUIDelegate,
string16 title_;
GURL url_;
Style style_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
BubbleFrameView* bubble_frame_view_;
bool is_open_;
diff --git a/chrome/browser/chromeos/login/login_performer.cc b/chrome/browser/chromeos/login/login_performer.cc
index a58c4cf..fb79108 100644
--- a/chrome/browser/chromeos/login/login_performer.cc
+++ b/chrome/browser/chromeos/login/login_performer.cc
@@ -247,12 +247,12 @@ void LoginPerformer::OnCheckWhitelistCompleted(SignedSettings::ReturnCode code,
}
////////////////////////////////////////////////////////////////////////////////
-// LoginPerformer, NotificationObserver implementation:
+// LoginPerformer, content::NotificationObserver implementation:
//
void LoginPerformer::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type != chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED)
return;
diff --git a/chrome/browser/chromeos/login/login_performer.h b/chrome/browser/chromeos/login/login_performer.h
index c1f8edd..d8eb8e3 100644
--- a/chrome/browser/chromeos/login/login_performer.h
+++ b/chrome/browser/chromeos/login/login_performer.h
@@ -16,8 +16,8 @@
#include "chrome/browser/chromeos/login/signed_settings_helper.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
namespace chromeos {
@@ -53,7 +53,7 @@ namespace chromeos {
// 2. Pending online auth request.
class LoginPerformer : public LoginStatusConsumer,
public SignedSettingsHelper::Callback,
- public NotificationObserver,
+ public content::NotificationObserver,
public ProfileManagerObserver {
public:
// Delegate class to get notifications from the LoginPerformer.
@@ -123,10 +123,10 @@ class LoginPerformer : public LoginStatusConsumer,
AuthorizationMode auth_mode() const { return auth_mode_; }
private:
- // NotificationObserver implementation:
+ // content::NotificationObserver implementation:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// SignedSettingsHelper::Callback implementation:
virtual void OnCheckWhitelistCompleted(SignedSettings::ReturnCode code,
@@ -193,7 +193,7 @@ class LoginPerformer : public LoginStatusConsumer,
bool password_changed_;
// Used for ScreenLock notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// True if LoginPerformer has requested screen lock. Used to distinguish
// such requests with cases when screen is locked on its own.
diff --git a/chrome/browser/chromeos/login/owner_manager.cc b/chrome/browser/chromeos/login/owner_manager.cc
index a408c53..2c5bbe0 100644
--- a/chrome/browser/chromeos/login/owner_manager.cc
+++ b/chrome/browser/chromeos/login/owner_manager.cc
@@ -133,8 +133,9 @@ void OwnerManager::Verify(const BrowserThread::ID thread_id,
BootTimesLoader::Get()->AddLoginTimeMarker("VerifyEnd", false);
}
-void OwnerManager::SendNotification(int type,
- const NotificationDetails& details) {
+void OwnerManager::SendNotification(
+ int type,
+ const content::NotificationDetails& details) {
NotificationService::current()->Notify(
type,
NotificationService::AllSources(),
diff --git a/chrome/browser/chromeos/login/owner_manager.h b/chrome/browser/chromeos/login/owner_manager.h
index d546b02..639bfa2 100644
--- a/chrome/browser/chromeos/login/owner_manager.h
+++ b/chrome/browser/chromeos/login/owner_manager.h
@@ -15,7 +15,10 @@
#include "content/browser/browser_thread.h"
class FilePath;
+
+namespace content {
class NotificationDetails;
+}
namespace chromeos {
@@ -90,7 +93,7 @@ class OwnerManager : public base::RefCountedThreadSafe<OwnerManager> {
private:
// A helper method to send a notification on another thread.
void SendNotification(int type,
- const NotificationDetails& details);
+ const content::NotificationDetails& details);
// Calls back a key update delegate on a given thread.
void CallKeyUpdateDelegate(KeyUpdateDelegate* d) {
diff --git a/chrome/browser/chromeos/login/owner_manager_unittest.cc b/chrome/browser/chromeos/login/owner_manager_unittest.cc
index 9793886..de6f5f03 100644
--- a/chrome/browser/chromeos/login/owner_manager_unittest.cc
+++ b/chrome/browser/chromeos/login/owner_manager_unittest.cc
@@ -51,8 +51,8 @@ MockKeyLoadObserver::~MockKeyLoadObserver() {
}
void MockKeyLoadObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
LOG(INFO) << "Observed key fetch event";
if (type == chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED) {
DCHECK(success_expected_);
diff --git a/chrome/browser/chromeos/login/owner_manager_unittest.h b/chrome/browser/chromeos/login/owner_manager_unittest.h
index 5da5f7b..f18cca0 100644
--- a/chrome/browser/chromeos/login/owner_manager_unittest.h
+++ b/chrome/browser/chromeos/login/owner_manager_unittest.h
@@ -14,8 +14,8 @@
#include "base/file_util.h"
#include "base/logging.h"
#include "base/synchronization/waitable_event.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.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"
@@ -23,20 +23,20 @@
namespace chromeos {
-class MockKeyLoadObserver : public NotificationObserver {
+class MockKeyLoadObserver : public content::NotificationObserver {
public:
explicit MockKeyLoadObserver(base::WaitableEvent* e);
virtual ~MockKeyLoadObserver();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
void ExpectKeyFetchSuccess(bool should_succeed);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
bool success_expected_;
base::WaitableEvent* event_;
bool observed_;
diff --git a/chrome/browser/chromeos/login/ownership_service.cc b/chrome/browser/chromeos/login/ownership_service.cc
index 954e62a..1e30995 100644
--- a/chrome/browser/chromeos/login/ownership_service.cc
+++ b/chrome/browser/chromeos/login/ownership_service.cc
@@ -138,8 +138,8 @@ void OwnershipService::StartVerifyAttempt(const std::string& data,
}
void OwnershipService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED) {
SetStatus(OWNERSHIP_TAKEN);
notification_registrar_.RemoveAll();
diff --git a/chrome/browser/chromeos/login/ownership_service.h b/chrome/browser/chromeos/login/ownership_service.h
index d96102e..920e063 100644
--- a/chrome/browser/chromeos/login/ownership_service.h
+++ b/chrome/browser/chromeos/login/ownership_service.h
@@ -15,8 +15,8 @@
#include "chrome/browser/chromeos/login/owner_manager.h"
#include "chrome/browser/policy/proto/device_management_backend.pb.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
namespace base {
@@ -26,7 +26,7 @@ template <typename T> struct DefaultLazyInstanceTraits;
namespace em = enterprise_management;
namespace chromeos {
-class OwnershipService : public NotificationObserver {
+class OwnershipService : public content::NotificationObserver {
public:
enum Status {
// Listed in upgrade order.
@@ -102,10 +102,10 @@ class OwnershipService : public NotificationObserver {
protected:
OwnershipService();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
friend struct base::DefaultLazyInstanceTraits<OwnershipService>;
@@ -138,7 +138,7 @@ class OwnershipService : public NotificationObserver {
scoped_refptr<OwnerManager> manager_;
scoped_refptr<OwnerKeyUtils> utils_;
scoped_ptr<em::PolicyData> policy_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
volatile Status ownership_status_;
base::Lock ownership_status_lock_;
};
diff --git a/chrome/browser/chromeos/login/parallel_authenticator.cc b/chrome/browser/chromeos/login/parallel_authenticator.cc
index d7b11c8..2301943 100644
--- a/chrome/browser/chromeos/login/parallel_authenticator.cc
+++ b/chrome/browser/chromeos/login/parallel_authenticator.cc
@@ -222,7 +222,7 @@ void ParallelAuthenticator::OnLoginSuccess(
NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_AUTHENTICATION,
NotificationService::AllSources(),
- Details<AuthenticationNotificationDetails>(&details));
+ content::Details<AuthenticationNotificationDetails>(&details));
{
base::AutoLock for_this_block(success_lock_);
already_reported_success_ = true;
diff --git a/chrome/browser/chromeos/login/profile_image_downloader.h b/chrome/browser/chromeos/login/profile_image_downloader.h
index b134d68..16ee463 100644
--- a/chrome/browser/chromeos/login/profile_image_downloader.h
+++ b/chrome/browser/chromeos/login/profile_image_downloader.h
@@ -11,9 +11,9 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/chromeos/login/image_decoder.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
#include "content/common/net/url_fetcher.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
namespace chromeos {
@@ -21,7 +21,7 @@ namespace chromeos {
// Downloads user profile image, decodes it in a sandboxed process.
class ProfileImageDownloader : public URLFetcher::Delegate,
public ImageDecoder::Delegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// Reports on success or failure of Profile image download.
class Delegate {
@@ -57,10 +57,10 @@ class ProfileImageDownloader : public URLFetcher::Delegate,
const SkBitmap& decoded_image) OVERRIDE;
virtual void OnDecodeImageFailed(const ImageDecoder* decoder) OVERRIDE;
- // Overriden from NotificationObserver:
+ // Overriden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Searches for profile image URL in user entry response from Picasa.
// Returns an empty string on failure.
@@ -73,7 +73,7 @@ class ProfileImageDownloader : public URLFetcher::Delegate,
std::string auth_token_;
scoped_ptr<URLFetcher> user_entry_fetcher_;
scoped_ptr<URLFetcher> profile_image_fetcher_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(ProfileImageDownloader);
};
diff --git a/chrome/browser/chromeos/login/screen_lock_view.cc b/chrome/browser/chromeos/login/screen_lock_view.cc
index 6a572eb..1509241 100644
--- a/chrome/browser/chromeos/login/screen_lock_view.cc
+++ b/chrome/browser/chromeos/login/screen_lock_view.cc
@@ -249,12 +249,12 @@ bool ScreenLockView::HandleKeyEvent(
void ScreenLockView::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type != chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED || !user_view_)
return;
- UserManager::User* user = Details<UserManager::User>(details).ptr();
+ UserManager::User* user = content::Details<UserManager::User>(details).ptr();
if (screen_locker_->user().email() != user->email())
return;
user_view_->SetImage(user->image(), user->image());
diff --git a/chrome/browser/chromeos/login/screen_lock_view.h b/chrome/browser/chromeos/login/screen_lock_view.h
index e845585..6df1df1 100644
--- a/chrome/browser/chromeos/login/screen_lock_view.h
+++ b/chrome/browser/chromeos/login/screen_lock_view.h
@@ -8,8 +8,8 @@
#include "chrome/browser/chromeos/login/helper.h"
#include "chrome/browser/chromeos/login/user_view.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "views/controls/textfield/textfield_controller.h"
#include "views/view.h"
@@ -30,7 +30,7 @@ class ScreenLockerTester;
// a user to unlock the screen.
class ScreenLockView : public ThrobberHostView,
public views::TextfieldController,
- public NotificationObserver,
+ public content::NotificationObserver,
public UserView::Delegate {
public:
explicit ScreenLockView(ScreenLocker* screen_locker);
@@ -52,10 +52,10 @@ class ScreenLockView : public ThrobberHostView,
virtual void Layout();
virtual gfx::Size GetPreferredSize();
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// views::TextfieldController:
virtual void ContentsChanged(views::Textfield* sender,
@@ -78,7 +78,7 @@ class ScreenLockView : public ThrobberHostView,
// ScreenLocker is owned by itself.
ScreenLocker* screen_locker_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// User's picture, signout button and password field.
views::View* main_;
diff --git a/chrome/browser/chromeos/login/screen_locker.cc b/chrome/browser/chromeos/login/screen_locker.cc
index 3f82096..005bb3e 100644
--- a/chrome/browser/chromeos/login/screen_locker.cc
+++ b/chrome/browser/chromeos/login/screen_locker.cc
@@ -53,7 +53,7 @@ namespace {
// Observer to start ScreenLocker when the screen lock
class ScreenLockObserver : public chromeos::ScreenLockLibrary::Observer,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
ScreenLockObserver() {
registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_CHANGED,
@@ -62,8 +62,8 @@ class ScreenLockObserver : public chromeos::ScreenLockLibrary::Observer,
// NotificationObserver overrides:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE {
if (type == chrome::NOTIFICATION_LOGIN_USER_CHANGED) {
// Register Screen Lock after login screen to make sure
// we don't show the screen lock on top of the login screen by accident.
@@ -164,7 +164,7 @@ class ScreenLockObserver : public chromeos::ScreenLockLibrary::Observer,
}
}
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
std::string saved_previous_input_method_id_;
std::string saved_current_input_method_id_;
std::vector<std::string> saved_active_input_method_list_;
@@ -423,8 +423,8 @@ ScreenLocker::~ScreenLocker() {
bool state = false;
NotificationService::current()->Notify(
chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
- Source<ScreenLocker>(this),
- Details<bool>(&state));
+ content::Source<ScreenLocker>(this),
+ content::Details<bool>(&state));
if (CrosLibrary::Get()->EnsureLoaded())
CrosLibrary::Get()->GetScreenLockLibrary()->NotifyScreenUnlockCompleted();
}
@@ -443,7 +443,7 @@ void ScreenLocker::ScreenLockReady() {
bool state = true;
NotificationService::current()->Notify(
chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
- Source<ScreenLocker>(this),
+ content::Source<ScreenLocker>(this),
Details<bool>(&state));
if (CrosLibrary::Get()->EnsureLoaded())
CrosLibrary::Get()->GetScreenLockLibrary()->NotifyScreenLockCompleted();
diff --git a/chrome/browser/chromeos/login/screen_locker_browsertest.cc b/chrome/browser/chromeos/login/screen_locker_browsertest.cc
index 3d8c25f..18e8802 100644
--- a/chrome/browser/chromeos/login/screen_locker_browsertest.cc
+++ b/chrome/browser/chromeos/login/screen_locker_browsertest.cc
@@ -28,7 +28,7 @@
namespace {
// An object that wait for lock state and fullscreen state.
-class Waiter : public NotificationObserver {
+class Waiter : public content::NotificationObserver {
public:
explicit Waiter(Browser* browser)
: browser_(browser),
@@ -50,8 +50,8 @@ class Waiter : public NotificationObserver {
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED);
if (running_)
MessageLoop::current()->Quit();
@@ -77,7 +77,7 @@ class Waiter : public NotificationObserver {
private:
Browser* browser_;
gulong handler_id_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Are we currently running the message loop?
bool running_;
diff --git a/chrome/browser/chromeos/login/user_image_screen.cc b/chrome/browser/chromeos/login/user_image_screen.cc
index 47ebe44..0d8f7a1 100644
--- a/chrome/browser/chromeos/login/user_image_screen.cc
+++ b/chrome/browser/chromeos/login/user_image_screen.cc
@@ -170,8 +170,8 @@ void UserImageScreen::OnActorDestroyed(UserImageScreenActor* actor) {
}
void UserImageScreen::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED);
bool is_screen_locked = *Details<bool>(details).ptr();
if (is_screen_locked)
diff --git a/chrome/browser/chromeos/login/user_image_screen.h b/chrome/browser/chromeos/login/user_image_screen.h
index 23dcb16..06b0ab3 100644
--- a/chrome/browser/chromeos/login/user_image_screen.h
+++ b/chrome/browser/chromeos/login/user_image_screen.h
@@ -11,8 +11,8 @@
#include "chrome/browser/chromeos/login/profile_image_downloader.h"
#include "chrome/browser/chromeos/login/user_image_screen_actor.h"
#include "chrome/browser/chromeos/login/wizard_screen.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "third_party/skia/include/core/SkBitmap.h"
namespace chromeos {
@@ -20,7 +20,7 @@ namespace chromeos {
class UserImageScreen: public WizardScreen,
public CameraController::Delegate,
public UserImageScreenActor::Delegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public ProfileImageDownloader::Delegate {
public:
UserImageScreen(ScreenObserver* screen_observer,
@@ -44,10 +44,10 @@ class UserImageScreen: public WizardScreen,
virtual void OnDefaultImageSelected(int index) OVERRIDE;
virtual void OnActorDestroyed(UserImageScreenActor* actor) OVERRIDE;
- // NotificationObserver implementation:
+ // content::NotificationObserver implementation:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// ProfileImageDownloader::Delegate implementation.
virtual void OnDownloadSuccess(const SkBitmap& profile_image) OVERRIDE;
@@ -58,7 +58,7 @@ class UserImageScreen: public WizardScreen,
CameraController camera_controller_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
UserImageScreenActor* actor_;
diff --git a/chrome/browser/chromeos/login/user_manager.cc b/chrome/browser/chromeos/login/user_manager.cc
index ed01829..e0cbf26 100644
--- a/chrome/browser/chromeos/login/user_manager.cc
+++ b/chrome/browser/chromeos/login/user_manager.cc
@@ -231,8 +231,8 @@ void UserManager::SaveImageToLocalState(const std::string& username,
NotifyLocalStateChanged();
NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED,
- Source<UserManager>(this),
- Details<const User>(&logged_in_user_));
+ content::Source<UserManager>(this),
+ content::Details<const User>(&logged_in_user_));
}
void UserManager::SaveImageToFile(const SkBitmap& image,
@@ -691,7 +691,7 @@ void UserManager::OnDownloadSuccess(const SkBitmap& image) {
SaveUserImage(logged_in_user_.email(), image, User::kProfileImageIndex);
NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED,
- Source<UserManager>(this),
+ content::Source<UserManager>(this),
Details<const UserManager::User>(&logged_in_user()));
}
}
@@ -759,7 +759,7 @@ void RealTPMTokenInfoDelegate::GetTokenInfo(std::string* token_name,
void UserManager::NotifyOnLogin() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_USER_CHANGED,
- Source<UserManager>(this),
+ content::Source<UserManager>(this),
Details<const User>(&logged_in_user_));
chromeos::input_method::InputMethodManager::GetInstance()->
@@ -791,8 +791,8 @@ void UserManager::NotifyOnLogin() {
}
void UserManager::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED) {
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
base::Bind(&UserManager::CheckOwnership,
diff --git a/chrome/browser/chromeos/login/user_manager.h b/chrome/browser/chromeos/login/user_manager.h
index 722f09a..526aefb 100644
--- a/chrome/browser/chromeos/login/user_manager.h
+++ b/chrome/browser/chromeos/login/user_manager.h
@@ -16,8 +16,8 @@
#include "base/synchronization/lock.h"
#include "chrome/browser/chromeos/login/profile_image_downloader.h"
#include "chrome/browser/chromeos/login/user_image_loader.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "third_party/skia/include/core/SkBitmap.h"
class FilePath;
@@ -34,7 +34,7 @@ class RemoveUserDelegate;
// into this chromium os device before and updating that list.
class UserManager : public UserImageLoader::Delegate,
public ProfileImageDownloader::Delegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// User OAuth token status according to the last check.
typedef enum {
@@ -173,10 +173,10 @@ class UserManager : public UserImageLoader::Delegate,
// ProfileImageDownloader::Delegate implementation.
virtual void OnDownloadSuccess(const SkBitmap& image) OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Accessor for current_user_is_owner_
virtual bool current_user_is_owner() const;
@@ -285,7 +285,7 @@ class UserManager : public UserImageLoader::Delegate,
// Cached flag of whether any user is logged in at the moment.
bool user_is_logged_in_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
friend struct base::DefaultLazyInstanceTraits<UserManager>;
diff --git a/chrome/browser/chromeos/login/wizard_accessibility_helper.cc b/chrome/browser/chromeos/login/wizard_accessibility_helper.cc
index aec9062..ae09646 100644
--- a/chrome/browser/chromeos/login/wizard_accessibility_helper.cc
+++ b/chrome/browser/chromeos/login/wizard_accessibility_helper.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/chromeos/login/wizard_accessibility_helper.h b/chrome/browser/chromeos/login/wizard_accessibility_helper.h
index 05ea7b6..5cd0cfd 100644
--- a/chrome/browser/chromeos/login/wizard_accessibility_helper.h
+++ b/chrome/browser/chromeos/login/wizard_accessibility_helper.h
@@ -9,7 +9,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "chrome/browser/chromeos/login/wizard_accessibility_handler.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/keycodes/keyboard_codes.h"
class Profile;
@@ -66,7 +66,7 @@ class WizardAccessibilityHelper {
Profile* profile_;
// Used for tracking registrations to accessibility notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
bool registered_notifications_;
diff --git a/chrome/browser/chromeos/media/media_player.cc b/chrome/browser/chromeos/media/media_player.cc
index 2d562bc..f62bd6e 100644
--- a/chrome/browser/chromeos/media/media_player.cc
+++ b/chrome/browser/chromeos/media/media_player.cc
@@ -148,15 +148,15 @@ void MediaPlayer::SetPlaybackError(GURL const& url) {
}
void MediaPlayer::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_BROWSER_CLOSED);
registrar_.Remove(this,
chrome::NOTIFICATION_BROWSER_CLOSED,
source);
- if (Source<Browser>(source).ptr() == mediaplayer_browser_) {
+ if (content::Source<Browser>(source).ptr() == mediaplayer_browser_) {
mediaplayer_browser_ = NULL;
- } else if (Source<Browser>(source).ptr() == playlist_browser_) {
+ } else if (content::Source<Browser>(source).ptr() == playlist_browser_) {
playlist_browser_ = NULL;
}
}
@@ -192,7 +192,7 @@ void MediaPlayer::PopupPlaylist(Browser* creator) {
profile);
registrar_.Add(this,
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(playlist_browser_));
+ content::Source<Browser>(playlist_browser_));
playlist_browser_->AddSelectedTabWithURL(GetMediaplayerPlaylistUrl(),
content::PAGE_TRANSITION_LINK);
playlist_browser_->window()->SetBounds(gfx::Rect(kPopupLeft,
@@ -220,7 +220,7 @@ void MediaPlayer::PopupMediaPlayer(Browser* creator) {
profile);
registrar_.Add(this,
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(mediaplayer_browser_));
+ content::Source<Browser>(mediaplayer_browser_));
#if defined(OS_CHROMEOS) && defined(TOOLKIT_USES_GTK)
// Since we are on chromeos, popups should be a PanelBrowserView,
diff --git a/chrome/browser/chromeos/notifications/balloon_collection_impl.cc b/chrome/browser/chromeos/notifications/balloon_collection_impl.cc
index 1778e66..68c28f4 100644
--- a/chrome/browser/chromeos/notifications/balloon_collection_impl.cc
+++ b/chrome/browser/chromeos/notifications/balloon_collection_impl.cc
@@ -147,9 +147,10 @@ const BalloonCollectionImpl::Balloons&
return base_.balloons();
}
-void BalloonCollectionImpl::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void BalloonCollectionImpl::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_BROWSER_CLOSED);
bool app_closing = *Details<bool>(details).ptr();
// When exiting, we need to shutdown all renderers in
diff --git a/chrome/browser/chromeos/notifications/balloon_collection_impl.h b/chrome/browser/chromeos/notifications/balloon_collection_impl.h
index e8b3980..1ae433c 100644
--- a/chrome/browser/chromeos/notifications/balloon_collection_impl.h
+++ b/chrome/browser/chromeos/notifications/balloon_collection_impl.h
@@ -13,7 +13,7 @@
#include "chrome/browser/chromeos/notifications/balloon_view_host.h"
#include "chrome/browser/notifications/balloon_collection.h"
#include "chrome/browser/notifications/balloon_collection_base.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/point.h"
#include "ui/gfx/rect.h"
@@ -30,7 +30,7 @@ class BalloonViewImpl;
// chromeos shows the all notifications in the notification panel, and
// this class does not manage the location of balloons.
class BalloonCollectionImpl : public BalloonCollection,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// An interface to display balloons on the screen.
// This is used for unit tests to inject a mock ui implementation.
@@ -73,8 +73,8 @@ class BalloonCollectionImpl : public BalloonCollection,
// NotificationObserver overrides:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Adds a callback for WebUI message. Returns true if the callback
// is succssfully registered, or false otherwise. It fails to add if
@@ -134,7 +134,7 @@ class BalloonCollectionImpl : public BalloonCollection,
scoped_ptr<NotificationUI> notification_ui_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(BalloonCollectionImpl);
};
diff --git a/chrome/browser/chromeos/notifications/balloon_view.h b/chrome/browser/chromeos/notifications/balloon_view.h
index 2f38f22..74673dd 100644
--- a/chrome/browser/chromeos/notifications/balloon_view.h
+++ b/chrome/browser/chromeos/notifications/balloon_view.h
@@ -12,8 +12,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/task.h"
#include "chrome/browser/notifications/balloon.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/path.h"
#include "ui/gfx/point.h"
#include "ui/gfx/rect.h"
@@ -28,8 +28,6 @@ class Widget;
} // namespace views
class Notification;
-class NotificationDetails;
-class NotificationSource;
namespace chromeos {
@@ -39,7 +37,7 @@ class NotificationControlView;
// A balloon view is the UI component for a notification panel.
class BalloonViewImpl : public BalloonView,
public views::View,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
BalloonViewImpl(bool sticky, bool controls, bool web_ui);
virtual ~BalloonViewImpl();
@@ -83,10 +81,10 @@ class BalloonViewImpl : public BalloonView,
// views::View interface.
virtual gfx::Size GetPreferredSize();
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Initializes the options menu.
void CreateOptionsMenu();
@@ -113,7 +111,7 @@ class BalloonViewImpl : public BalloonView,
scoped_ptr<views::Widget> control_view_host_;
bool stale_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
// A sticky flag. A sticky notification cannot be dismissed by a user.
bool sticky_;
// True if a notification should have info/option/dismiss label/buttons.
diff --git a/chrome/browser/chromeos/notifications/notification_browsertest.cc b/chrome/browser/chromeos/notifications/notification_browsertest.cc
index 49d2895..dbe881a 100644
--- a/chrome/browser/chromeos/notifications/notification_browsertest.cc
+++ b/chrome/browser/chromeos/notifications/notification_browsertest.cc
@@ -33,7 +33,7 @@ const char* kChromeOsWindowManagerName = "chromeos-wm";
namespace chromeos {
class NotificationTest : public InProcessBrowserTest,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
NotificationTest()
: under_chromeos_(false),
@@ -112,8 +112,8 @@ class NotificationTest : public InProcessBrowserTest,
// NotificationObserver overrides.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
ASSERT_TRUE(chrome::NOTIFICATION_PANEL_STATE_CHANGED == type);
PanelController::State* state =
reinterpret_cast<PanelController::State*>(details.map_key());
@@ -301,7 +301,7 @@ IN_PROC_BROWSER_TEST_F(NotificationTest, TestStateTransition1) {
// 0. This test explicitly controls the stale state instead.
IN_PROC_BROWSER_TEST_F(NotificationTest, TestStateTransition2) {
// Register observer here as the registration does not work in SetUp().
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
registrar.Add(this,
chrome::NOTIFICATION_PANEL_STATE_CHANGED,
NotificationService::AllSources());
@@ -368,7 +368,7 @@ IN_PROC_BROWSER_TEST_F(NotificationTest, TestStateTransition2) {
}
IN_PROC_BROWSER_TEST_F(NotificationTest, TestCleanupOnExit) {
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
registrar.Add(this,
chrome::NOTIFICATION_PANEL_STATE_CHANGED,
NotificationService::AllSources());
diff --git a/chrome/browser/chromeos/notifications/notification_panel.h b/chrome/browser/chromeos/notifications/notification_panel.h
index 13c5e03..652d424 100644
--- a/chrome/browser/chromeos/notifications/notification_panel.h
+++ b/chrome/browser/chromeos/notifications/notification_panel.h
@@ -12,7 +12,7 @@
#include "base/task.h"
#include "chrome/browser/chromeos/frame/panel_controller.h"
#include "chrome/browser/chromeos/notifications/balloon_collection_impl.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/rect.h"
class Balloon;
@@ -71,7 +71,7 @@ class NotificationPanelTester;
//
class NotificationPanel : public PanelController::Delegate,
public BalloonCollectionImpl::NotificationUI,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
enum State {
FULL, // Show all notifications
@@ -106,8 +106,8 @@ class NotificationPanel : public PanelController::Delegate,
// NotificationObserver overrides:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Called when a mouse left the panel window.
void OnMouseLeave();
@@ -185,7 +185,7 @@ class NotificationPanel : public PanelController::Delegate,
int stale_timeout_;
// A registrar to subscribe PANEL_STATE_CHANGED event.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The notification a mouse pointer is currently on. NULL if the mouse
// is out of the panel.
diff --git a/chrome/browser/chromeos/options/take_photo_dialog.cc b/chrome/browser/chromeos/options/take_photo_dialog.cc
index 17f4108..9023936 100644
--- a/chrome/browser/chromeos/options/take_photo_dialog.cc
+++ b/chrome/browser/chromeos/options/take_photo_dialog.cc
@@ -139,8 +139,8 @@ void TakePhotoDialog::NotifyOnCapturingStopped() {
}
void TakePhotoDialog::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type != chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED)
return;
diff --git a/chrome/browser/chromeos/options/take_photo_dialog.h b/chrome/browser/chromeos/options/take_photo_dialog.h
index 25874ed..d59bf48 100644
--- a/chrome/browser/chromeos/options/take_photo_dialog.h
+++ b/chrome/browser/chromeos/options/take_photo_dialog.h
@@ -10,8 +10,8 @@
#include "base/observer_list.h"
#include "chrome/browser/chromeos/login/camera_controller.h"
#include "chrome/browser/chromeos/login/take_photo_view.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "views/window/dialog_delegate.h"
namespace views {
@@ -24,7 +24,7 @@ namespace chromeos {
class TakePhotoDialog : public views::DialogDelegateView,
public TakePhotoView::Delegate,
public CameraController::Delegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
class Delegate {
public:
@@ -86,10 +86,10 @@ class TakePhotoDialog : public views::DialogDelegateView,
void NotifyOnCaptureFailure();
void NotifyOnCapturingStopped();
- // NotificationObserver implementation:
+ // content::NotificationObserver implementation:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
protected:
// views::View overrides:
@@ -105,7 +105,7 @@ class TakePhotoDialog : public views::DialogDelegateView,
CameraController camera_controller_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
Delegate* delegate_;
diff --git a/chrome/browser/chromeos/preferences.h b/chrome/browser/chromeos/preferences.h
index 1da0a30..6c593e1 100644
--- a/chrome/browser/chromeos/preferences.h
+++ b/chrome/browser/chromeos/preferences.h
@@ -11,7 +11,7 @@
#include "chrome/browser/chromeos/language_preferences.h"
#include "chrome/browser/prefs/pref_member.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
class PrefService;
@@ -21,7 +21,7 @@ namespace chromeos {
// is first initialized, it will initialize the OS settings to what's stored in
// the preferences. These include touchpad settings, etc.
// When the preferences change, we change the settings to reflect the new value.
-class Preferences : public NotificationObserver {
+class Preferences : public content::NotificationObserver {
public:
Preferences();
virtual ~Preferences();
@@ -36,10 +36,10 @@ class Preferences : public NotificationObserver {
// This method will initialize Chrome OS settings to values in user prefs.
void Init(PrefService* prefs);
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// This will set the OS settings when the preference changes.
diff --git a/chrome/browser/chromeos/status/accessibility_menu_button.cc b/chrome/browser/chromeos/status/accessibility_menu_button.cc
index 7d8f8b9..2070da1 100644
--- a/chrome/browser/chromeos/status/accessibility_menu_button.cc
+++ b/chrome/browser/chromeos/status/accessibility_menu_button.cc
@@ -73,11 +73,12 @@ void AccessibilityMenuButton::ExecuteCommand(int id) {
}
////////////////////////////////////////////////////////////////////////////////
-// NotificationObserver implementation
+// content::NotificationObserver implementation
-void AccessibilityMenuButton::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void AccessibilityMenuButton::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED)
Update();
}
diff --git a/chrome/browser/chromeos/status/accessibility_menu_button.h b/chrome/browser/chromeos/status/accessibility_menu_button.h
index 36988ca..148bad5 100644
--- a/chrome/browser/chromeos/status/accessibility_menu_button.h
+++ b/chrome/browser/chromeos/status/accessibility_menu_button.h
@@ -8,7 +8,7 @@
#include "chrome/browser/chromeos/status/status_area_button.h"
#include "chrome/browser/prefs/pref_member.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "views/controls/menu/view_menu_delegate.h"
#include "views/controls/menu/menu_delegate.h"
@@ -25,7 +25,7 @@ class StatusAreaHost;
class AccessibilityMenuButton : public StatusAreaButton,
public views::ViewMenuDelegate,
public views::MenuDelegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit AccessibilityMenuButton(StatusAreaHost* host);
virtual ~AccessibilityMenuButton();
@@ -36,10 +36,10 @@ class AccessibilityMenuButton : public StatusAreaButton,
// views::MenuDelegate implementation
virtual void ExecuteCommand(int id) OVERRIDE;
- // NotificationObserver implementation
+ // content::NotificationObserver implementation
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
// Updates the state along with the preferences.
diff --git a/chrome/browser/chromeos/status/caps_lock_menu_button.cc b/chrome/browser/chromeos/status/caps_lock_menu_button.cc
index a4a8c6c..2b0bc76 100644
--- a/chrome/browser/chromeos/status/caps_lock_menu_button.cc
+++ b/chrome/browser/chromeos/status/caps_lock_menu_button.cc
@@ -214,11 +214,11 @@ void CapsLockMenuButton::OnCapsLockChange(bool enabled) {
}
////////////////////////////////////////////////////////////////////////////////
-// NotificationObserver implementation
+// content::NotificationObserver implementation
void CapsLockMenuButton::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED)
UpdateAccessibleName();
}
diff --git a/chrome/browser/chromeos/status/caps_lock_menu_button.h b/chrome/browser/chromeos/status/caps_lock_menu_button.h
index f0ca1cd..0db2d1f 100644
--- a/chrome/browser/chromeos/status/caps_lock_menu_button.h
+++ b/chrome/browser/chromeos/status/caps_lock_menu_button.h
@@ -11,7 +11,7 @@
#include "chrome/browser/chromeos/status/status_area_button.h"
#include "chrome/browser/chromeos/system_key_event_listener.h"
#include "chrome/browser/prefs/pref_member.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "views/controls/menu/menu_delegate.h"
#include "views/controls/menu/view_menu_delegate.h"
@@ -25,7 +25,7 @@ class StatusAreaHost;
// A class for the button in the status area which alerts the user when caps
// lock is active.
-class CapsLockMenuButton : public NotificationObserver,
+class CapsLockMenuButton : public content::NotificationObserver,
public StatusAreaButton,
public views::MenuDelegate,
public views::ViewMenuDelegate,
@@ -47,10 +47,10 @@ class CapsLockMenuButton : public NotificationObserver,
// SystemKeyEventListener::CapsLockObserver implementation
virtual void OnCapsLockChange(bool enabled);
- // NotificationObserver implementation
+ // content::NotificationObserver implementation
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Updates the accessible name.
void UpdateAccessibleName();
diff --git a/chrome/browser/chromeos/status/clock_menu_button.h b/chrome/browser/chromeos/status/clock_menu_button.h
index 941ec5d4..b4ea90f 100644
--- a/chrome/browser/chromeos/status/clock_menu_button.h
+++ b/chrome/browser/chromeos/status/clock_menu_button.h
@@ -13,7 +13,7 @@
#include "chrome/browser/chromeos/system/timezone_settings.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/browser/prefs/pref_member.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_types.h"
#include "unicode/calendar.h"
#include "views/controls/button/menu_button.h"
@@ -33,7 +33,7 @@ class StatusAreaHost;
class ClockMenuButton : public StatusAreaButton,
public views::MenuDelegate,
public views::ViewMenuDelegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public PowerLibrary::Observer,
public system::TimezoneSettings::Observer {
public:
@@ -62,10 +62,10 @@ class ClockMenuButton : public StatusAreaButton,
// Sets default use 24hour clock mode.
void SetDefaultUse24HourClock(bool use_24hour_clock);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
protected:
virtual int horizontal_padding();
diff --git a/chrome/browser/chromeos/status/input_method_menu.cc b/chrome/browser/chromeos/status/input_method_menu.cc
index 8a8037e..18eaf44 100644
--- a/chrome/browser/chromeos/status/input_method_menu.cc
+++ b/chrome/browser/chromeos/status/input_method_menu.cc
@@ -699,8 +699,8 @@ void InputMethodMenu::RegisterPrefs(PrefService* local_state) {
}
void InputMethodMenu::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_LOGIN_USER_CHANGED) {
// When a user logs in, we should remove |this| object from the observer
// list so that PreferenceUpdateNeeded() does not update the local state
diff --git a/chrome/browser/chromeos/status/input_method_menu.h b/chrome/browser/chromeos/status/input_method_menu.h
index 7ceab26..6d712af 100644
--- a/chrome/browser/chromeos/status/input_method_menu.h
+++ b/chrome/browser/chromeos/status/input_method_menu.h
@@ -11,8 +11,8 @@
#include "chrome/browser/chromeos/input_method/input_method_manager.h"
#include "chrome/browser/chromeos/status/status_area_host.h"
#include "chrome/browser/prefs/pref_member.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
#include "ui/base/models/menu_model.h"
#include "views/controls/menu/menu_item_view.h"
@@ -42,7 +42,7 @@ class InputMethodMenu
public ui::MenuModel,
public input_method::InputMethodManager::Observer,
public input_method::InputMethodManager::PreferenceObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
InputMethodMenu(PrefService* pref_service,
StatusAreaHost::ScreenMode screen_mode,
@@ -93,10 +93,10 @@ class InputMethodMenu
const input_method::InputMethodDescriptor& current_input_method);
virtual void FirstObserverIsAdded(input_method::InputMethodManager* manager);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Specify menu alignment (default TOPRIGHT).
void set_menu_alignment(views::MenuItemView::AnchorPosition menu_alignment) {
@@ -190,7 +190,7 @@ class InputMethodMenu
views::MenuItemView::AnchorPosition menu_alignment_;
PrefService* pref_service_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The mode of the host screen (e.g. browser, screen locker, login screen.)
const StatusAreaHost::ScreenMode screen_mode_;
diff --git a/chrome/browser/chromeos/status/memory_menu_button.cc b/chrome/browser/chromeos/status/memory_menu_button.cc
index 04f5ada..1d26743 100644
--- a/chrome/browser/chromeos/status/memory_menu_button.cc
+++ b/chrome/browser/chromeos/status/memory_menu_button.cc
@@ -253,15 +253,16 @@ views::MenuItemView* MemoryMenuButton::CreateMenu() {
}
/////////////////////////////////////////////////////////////////////////////
-// NotificationObserver overrides.
+// content::NotificationObserver overrides.
void MemoryMenuButton::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: {
RenderProcessHost::RendererClosedDetails* process_details =
- Details<RenderProcessHost::RendererClosedDetails>(details).ptr();
+ content::Details<RenderProcessHost::RendererClosedDetails>(details).
+ ptr();
if (process_details->status ==
base::TERMINATION_STATUS_PROCESS_WAS_KILLED) {
renderer_kills_++;
diff --git a/chrome/browser/chromeos/status/memory_menu_button.h b/chrome/browser/chromeos/status/memory_menu_button.h
index ac3a30e..47be7a6 100644
--- a/chrome/browser/chromeos/status/memory_menu_button.h
+++ b/chrome/browser/chromeos/status/memory_menu_button.h
@@ -9,8 +9,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/timer.h"
#include "chrome/browser/chromeos/status/status_area_button.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "views/controls/menu/menu_delegate.h"
#include "views/controls/menu/view_menu_delegate.h"
@@ -31,7 +31,7 @@ class StatusAreaHost;
class MemoryMenuButton : public StatusAreaButton,
public views::MenuDelegate,
public views::ViewMenuDelegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit MemoryMenuButton(StatusAreaHost* host);
virtual ~MemoryMenuButton();
@@ -44,10 +44,10 @@ class MemoryMenuButton : public StatusAreaButton,
// views::ViewMenuDelegate implementation.
virtual void RunMenu(views::View* source, const gfx::Point& pt) OVERRIDE;
- // NotificationObserver overrides.
+ // content::NotificationObserver overrides.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Updates the text on the menu button.
void UpdateText();
@@ -70,7 +70,7 @@ class MemoryMenuButton : public StatusAreaButton,
// Raw data from /proc/meminfo
scoped_ptr<base::SystemMemoryInfoKB> meminfo_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Number of renderer kills we have observed.
int renderer_kills_;
diff --git a/chrome/browser/chromeos/tab_closeable_state_watcher.cc b/chrome/browser/chromeos/tab_closeable_state_watcher.cc
index a45a0d6c..2cddd98 100644
--- a/chrome/browser/chromeos/tab_closeable_state_watcher.cc
+++ b/chrome/browser/chromeos/tab_closeable_state_watcher.cc
@@ -186,10 +186,11 @@ void TabCloseableStateWatcher::OnBrowserRemoved(const Browser* browser) {
}
////////////////////////////////////////////////////////////////////////////////
-// TabCloseableStateWatcher, NotificationObserver implementation:
+// TabCloseableStateWatcher, content::NotificationObserver implementation:
void TabCloseableStateWatcher::Observe(int type,
- const NotificationSource& source, const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type != content::NOTIFICATION_APP_EXITING)
NOTREACHED();
if (!signing_off_) {
@@ -263,7 +264,7 @@ void TabCloseableStateWatcher::SetCloseableState(bool closeable) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CLOSEABLE_STATE_CHANGED,
NotificationService::AllSources(),
- Details<bool>(&can_close_tab_));
+ content::Details<bool>(&can_close_tab_));
}
bool TabCloseableStateWatcher::CanCloseBrowserImpl(
diff --git a/chrome/browser/chromeos/tab_closeable_state_watcher.h b/chrome/browser/chromeos/tab_closeable_state_watcher.h
index b31f18d..47ec5a2 100644
--- a/chrome/browser/chromeos/tab_closeable_state_watcher.h
+++ b/chrome/browser/chromeos/tab_closeable_state_watcher.h
@@ -11,7 +11,7 @@
#include "chrome/browser/tab_closeable_state_watcher.h"
#include "chrome/browser/tabs/tab_strip_model_observer.h"
#include "chrome/browser/ui/browser_list.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
namespace chromeos {
@@ -41,7 +41,7 @@ namespace chromeos {
class TabCloseableStateWatcher : public ::TabCloseableStateWatcher,
public BrowserList::Observer,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
TabCloseableStateWatcher();
virtual ~TabCloseableStateWatcher();
@@ -65,8 +65,8 @@ class TabCloseableStateWatcher : public ::TabCloseableStateWatcher,
virtual void OnBrowserRemoved(const Browser* browser);
// NotificationObserver implementation:
- virtual void Observe(int type, const NotificationSource& source,
- const NotificationDetails& details);
+ virtual void Observe(int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Called by private class TabStripWatcher for TabStripModelObserver
// notifications.
@@ -108,7 +108,7 @@ class TabCloseableStateWatcher : public ::TabCloseableStateWatcher,
// being created.
bool waiting_for_browser_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
// TabStripWatcher is a TabStripModelObserver that funnels all interesting
// methods to TabCloseableStateWatcher::OnTabStripChanged. TabStripWatcher is
diff --git a/chrome/browser/chromeos/tab_first_render_watcher.h b/chrome/browser/chromeos/tab_first_render_watcher.h
index 2fde9b0..22218c2 100644
--- a/chrome/browser/chromeos/tab_first_render_watcher.h
+++ b/chrome/browser/chromeos/tab_first_render_watcher.h
@@ -7,8 +7,8 @@
#pragma once
#include "base/compiler_specific.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class RenderViewHost;
class TabContents;
@@ -17,7 +17,7 @@ namespace chromeos {
// This class watches given TabContent's loading and rendering state change.
// TODO(xiyuan): Move this to a proper place and share with HTMLDialogView.
-class TabFirstRenderWatcher : public NotificationObserver {
+class TabFirstRenderWatcher : public content::NotificationObserver {
public:
class Delegate {
public:
@@ -29,10 +29,10 @@ class TabFirstRenderWatcher : public NotificationObserver {
TabFirstRenderWatcher(TabContents* tab, Delegate* delegate);
private:
- // Overridden from NotificationObserver
+ // Overridden from content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
enum State {
NONE,
@@ -47,7 +47,7 @@ class TabFirstRenderWatcher : public NotificationObserver {
// Delegate to notify.
Delegate* delegate_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(TabFirstRenderWatcher);
};
diff --git a/chrome/browser/chromeos/user_cros_settings_provider.cc b/chrome/browser/chromeos/user_cros_settings_provider.cc
index 55b0b44..c01c897 100644
--- a/chrome/browser/chromeos/user_cros_settings_provider.cc
+++ b/chrome/browser/chromeos/user_cros_settings_provider.cc
@@ -65,7 +65,7 @@ const char* kListSettings[] = {
// SignedSettingsTempStorage if there is no owner yet, or waits for an
// OWNERSHIP_CHECKED notification to delay the storing until the owner has
// logged in.
-class MigrationHelper : public NotificationObserver {
+class MigrationHelper : public content::NotificationObserver {
public:
explicit MigrationHelper() : callback_(NULL) {
registrar_.Add(this, chrome::NOTIFICATION_OWNERSHIP_CHECKED,
@@ -87,8 +87,8 @@ class MigrationHelper : public NotificationObserver {
// NotificationObserver overrides:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE {
if (type == chrome::NOTIFICATION_OWNERSHIP_CHECKED)
MigrateValues();
}
@@ -114,7 +114,7 @@ class MigrationHelper : public NotificationObserver {
}
}
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
scoped_ptr<OwnershipStatusChecker> ownership_checker_;
SignedSettingsHelper::Callback* callback_;
diff --git a/chrome/browser/chromeos/web_socket_proxy.cc b/chrome/browser/chromeos/web_socket_proxy.cc
index d1712cb..0d685da 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_details.h"
#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_types.h"
#include "content/public/common/url_constants.h"
#include "googleurl/src/gurl.h"
@@ -194,7 +194,7 @@ void SendNotification(int port) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
NotificationService::current()->Notify(
chrome::NOTIFICATION_WEB_SOCKET_PROXY_STARTED,
- NotificationService::AllSources(), Details<int>(&port));
+ 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 3001ce0..1368ce2 100644
--- a/chrome/browser/chromeos/web_socket_proxy_controller.cc
+++ b/chrome/browser/chromeos/web_socket_proxy_controller.cc
@@ -22,8 +22,8 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.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"
@@ -127,7 +127,7 @@ class ProxyLifetime : public net::NetworkChangeNotifier::OnlineStateObserver {
chromeos::WebSocketProxy* volatile server_;
volatile bool shutdown_requested_;
base::Lock lock_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
friend class ProxyTask;
friend class chromeos::WebSocketProxyController;
};
diff --git a/chrome/browser/chromeos/wm_ipc.cc b/chrome/browser/chromeos/wm_ipc.cc
index 668327a..f400996 100644
--- a/chrome/browser/chromeos/wm_ipc.cc
+++ b/chrome/browser/chromeos/wm_ipc.cc
@@ -305,8 +305,8 @@ void WmIpc::FetchLayoutModeProperty() {
layout_mode_ = static_cast<WmIpcLayoutMode>(value);
NotificationService::current()->Notify(
chrome::NOTIFICATION_LAYOUT_MODE_CHANGED,
- Source<WmIpc>(this),
- Details<WmIpcLayoutMode>(&layout_mode_));
+ content::Source<WmIpc>(this),
+ content::Details<WmIpcLayoutMode>(&layout_mode_));
} else {
DLOG(WARNING) << "Missing _CHROME_LAYOUT_MODE property on root window";
}
diff --git a/chrome/browser/component_updater/component_updater_service.cc b/chrome/browser/component_updater/component_updater_service.cc
index 8dc6418..84e37d4d5 100644
--- a/chrome/browser/component_updater/component_updater_service.cc
+++ b/chrome/browser/component_updater/component_updater_service.cc
@@ -349,7 +349,7 @@ ComponentUpdateService::Status CrxUpdateService::Start() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_COMPONENT_UPDATER_STARTED,
- Source<ComponentUpdateService>(this),
+ content::Source<ComponentUpdateService>(this),
NotificationService::NoDetails());
timer_.Start(FROM_HERE, base::TimeDelta::FromSeconds(config_->InitialDelay()),
@@ -383,7 +383,7 @@ void CrxUpdateService::ScheduleNextRun(bool step_delay) {
if (!step_delay) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_COMPONENT_UPDATER_SLEEPING,
- Source<ComponentUpdateService>(this),
+ content::Source<ComponentUpdateService>(this),
NotificationService::NoDetails());
// Zero is only used for unit tests.
if (0 == delay)
@@ -636,7 +636,7 @@ void CrxUpdateService::OnParseUpdateManifestSucceeded(
NotificationService::current()->Notify(
chrome::NOTIFICATION_COMPONENT_UPDATE_FOUND,
- Source<std::string>(&crx->id),
+ content::Source<std::string>(&crx->id),
NotificationService::NoDetails());
}
@@ -683,7 +683,7 @@ void CrxUpdateService::OnURLFetchComplete(const URLFetcher* source,
NotificationService::current()->Notify(
chrome::NOTIFICATION_COMPONENT_UPDATE_READY,
- Source<std::string>(&context->id),
+ content::Source<std::string>(&context->id),
NotificationService::NoDetails());
BrowserThread::PostDelayedTask(BrowserThread::FILE, FROM_HERE,
diff --git a/chrome/browser/component_updater/component_updater_service_unittest.cc b/chrome/browser/component_updater/component_updater_service_unittest.cc
index 5190a7d..496e765 100644
--- a/chrome/browser/component_updater/component_updater_service_unittest.cc
+++ b/chrome/browser/component_updater/component_updater_service_unittest.cc
@@ -15,7 +15,7 @@
#include "chrome/test/base/test_url_request_context_getter.h"
#include "content/browser/browser_thread.h"
#include "content/common/net/url_fetcher.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "content/common/notification_service.h"
#include "content/test/test_notification_tracker.h"
diff --git a/chrome/browser/content_settings/content_settings_default_provider.h b/chrome/browser/content_settings/content_settings_default_provider.h
index aeec126..f4a9c34 100644
--- a/chrome/browser/content_settings/content_settings_default_provider.h
+++ b/chrome/browser/content_settings/content_settings_default_provider.h
@@ -12,8 +12,8 @@
#include "base/synchronization/lock.h"
#include "chrome/browser/content_settings/content_settings_observable_provider.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class PrefService;
@@ -23,7 +23,7 @@ namespace content_settings {
// user prefs. If no default values are set by the user we use the hard coded
// default values.
class DefaultProvider : public ObservableProvider,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
static void RegisterUserPrefs(PrefService* prefs);
@@ -49,10 +49,10 @@ class DefaultProvider : public ObservableProvider,
virtual void ShutdownOnUIThread() OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
// Sets the fields of |settings| based on the values in |dictionary|.
diff --git a/chrome/browser/content_settings/content_settings_policy_provider.h b/chrome/browser/content_settings/content_settings_policy_provider.h
index 091479c..fd68faa 100644
--- a/chrome/browser/content_settings/content_settings_policy_provider.h
+++ b/chrome/browser/content_settings/content_settings_policy_provider.h
@@ -15,7 +15,7 @@
#include "chrome/browser/content_settings/content_settings_observable_provider.h"
#include "chrome/browser/content_settings/content_settings_origin_identifier_value_map.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
class PrefService;
@@ -23,7 +23,7 @@ namespace content_settings {
// PolicyProvider that provides managed content-settings.
class PolicyProvider : public ObservableProvider,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit PolicyProvider(PrefService* prefs);
virtual ~PolicyProvider();
@@ -47,10 +47,10 @@ class PolicyProvider : public ObservableProvider,
virtual void ShutdownOnUIThread() OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
// Reads the policy managed default settings.
void ReadManagedDefaultSettings();
diff --git a/chrome/browser/content_settings/content_settings_pref_provider.h b/chrome/browser/content_settings/content_settings_pref_provider.h
index d2e6b68..2ee4c18 100644
--- a/chrome/browser/content_settings/content_settings_pref_provider.h
+++ b/chrome/browser/content_settings/content_settings_pref_provider.h
@@ -16,8 +16,8 @@
#include "chrome/browser/content_settings/content_settings_observable_provider.h"
#include "chrome/browser/content_settings/content_settings_utils.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class PrefService;
@@ -30,7 +30,7 @@ namespace content_settings {
// Content settings provider that provides content settings from the user
// preference.
class PrefProvider : public ObservableProvider,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
static void RegisterUserPrefs(PrefService* prefs);
@@ -56,10 +56,10 @@ class PrefProvider : public ObservableProvider,
virtual void ShutdownOnUIThread() OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
friend class DeadlockCheckerThread; // For testing.
diff --git a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
index bc2f8b0..2099027 100644
--- a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
+++ b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
@@ -25,7 +25,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_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -79,7 +79,7 @@ class DeadlockCheckerThread : public base::PlatformThread::Delegate {
// A helper for observing an preference changes and testing whether
// |PrefProvider| holds a lock when the preferences change.
-class DeadlockCheckerObserver : public NotificationObserver {
+class DeadlockCheckerObserver : public content::NotificationObserver {
public:
// |DeadlockCheckerObserver| doesn't take the ownership of |prefs| or
// ||provider|.
@@ -92,8 +92,8 @@ class DeadlockCheckerObserver : public NotificationObserver {
virtual ~DeadlockCheckerObserver() {}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
ASSERT_EQ(type, chrome::NOTIFICATION_PREF_CHANGED);
// Check whether |provider_| holds its lock. For this, we need a separate
// thread.
diff --git a/chrome/browser/content_settings/host_content_settings_map.h b/chrome/browser/content_settings/host_content_settings_map.h
index f29aff3..e6831a1 100644
--- a/chrome/browser/content_settings/host_content_settings_map.h
+++ b/chrome/browser/content_settings/host_content_settings_map.h
@@ -21,8 +21,8 @@
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/common/content_settings.h"
#include "chrome/common/content_settings_pattern.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
namespace base {
class Value;
@@ -38,7 +38,7 @@ class PrefService;
class HostContentSettingsMap
: public content_settings::Observer,
- public NotificationObserver,
+ public content::NotificationObserver,
public base::RefCountedThreadSafe<HostContentSettingsMap> {
public:
enum ProviderType {
@@ -197,10 +197,10 @@ class HostContentSettingsMap
ContentSettingsType content_type,
std::string resource_identifier);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
friend class base::RefCountedThreadSafe<HostContentSettingsMap>;
diff --git a/chrome/browser/content_settings/mock_settings_observer.cc b/chrome/browser/content_settings/mock_settings_observer.cc
index 0098b18..7bcacfc 100644
--- a/chrome/browser/content_settings/mock_settings_observer.cc
+++ b/chrome/browser/content_settings/mock_settings_observer.cc
@@ -8,7 +8,7 @@
#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/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "googleurl/src/gurl.h"
MockSettingsObserver::MockSettingsObserver() {
@@ -18,13 +18,14 @@ MockSettingsObserver::MockSettingsObserver() {
MockSettingsObserver::~MockSettingsObserver() {}
-void MockSettingsObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void MockSettingsObserver::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
HostContentSettingsMap* map =
- Source<HostContentSettingsMap>(source).ptr();
+ content::Source<HostContentSettingsMap>(source).ptr();
ContentSettingsDetails* settings_details =
- Details<ContentSettingsDetails>(details).ptr();
+ content::Details<ContentSettingsDetails>(details).ptr();
OnContentSettingsChanged(map,
settings_details->type(),
settings_details->update_all_types(),
diff --git a/chrome/browser/content_settings/mock_settings_observer.h b/chrome/browser/content_settings/mock_settings_observer.h
index c0a2231..6583fcf 100644
--- a/chrome/browser/content_settings/mock_settings_observer.h
+++ b/chrome/browser/content_settings/mock_settings_observer.h
@@ -7,21 +7,21 @@
#pragma once
#include "chrome/common/content_settings_types.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "testing/gmock/include/gmock/gmock.h"
class ContentSettingsPattern;
class HostContentSettingsMap;
-class MockSettingsObserver : public NotificationObserver {
+class MockSettingsObserver : public content::NotificationObserver {
public:
MockSettingsObserver();
virtual ~MockSettingsObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
MOCK_METHOD6(OnContentSettingsChanged,
void(HostContentSettingsMap*,
@@ -32,7 +32,7 @@ class MockSettingsObserver : public NotificationObserver {
bool));
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
#endif // CHROME_BROWSER_CONTENT_SETTINGS_MOCK_SETTINGS_OBSERVER_H_
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index 3ba057c..42ac3cb 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -59,7 +59,7 @@ TabSpecificContentSettings::TabSpecificContentSettings(TabContents* tab)
g_tab_specific.Get().push_back(this);
registrar_.Add(this, chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED,
- Source<HostContentSettingsMap>(
+ content::Source<HostContentSettingsMap>(
profile_->GetHostContentSettingsMap()));
}
@@ -233,7 +233,7 @@ void TabSpecificContentSettings::OnContentBlocked(
// TODO: it would be nice to have a way of mocking this in tests.
NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED,
- Source<TabContents>(tab_contents()),
+ content::Source<TabContents>(tab_contents()),
NotificationService::NoDetails());
}
}
@@ -245,7 +245,7 @@ void TabSpecificContentSettings::OnContentAccessed(ContentSettingsType type) {
content_accessed_[type] = true;
NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED,
- Source<TabContents>(tab_contents()),
+ content::Source<TabContents>(tab_contents()),
NotificationService::NoDetails());
}
}
@@ -351,7 +351,7 @@ void TabSpecificContentSettings::OnGeolocationPermissionSet(
allowed);
NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED,
- Source<TabContents>(tab_contents()),
+ content::Source<TabContents>(tab_contents()),
NotificationService::NoDetails());
}
@@ -367,7 +367,7 @@ void TabSpecificContentSettings::ClearBlockedContentSettingsExceptForCookies() {
load_plugins_link_enabled_ = true;
NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED,
- Source<TabContents>(tab_contents()),
+ content::Source<TabContents>(tab_contents()),
NotificationService::NoDetails());
}
@@ -379,7 +379,7 @@ void TabSpecificContentSettings::ClearCookieSpecificContentSettings() {
content_blockage_indicated_to_user_[CONTENT_SETTINGS_TYPE_COOKIES] = false;
NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED,
- Source<TabContents>(tab_contents()),
+ content::Source<TabContents>(tab_contents()),
NotificationService::NoDetails());
}
@@ -388,7 +388,7 @@ void TabSpecificContentSettings::SetPopupsBlocked(bool blocked) {
content_blockage_indicated_to_user_[CONTENT_SETTINGS_TYPE_POPUPS] = false;
NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED,
- Source<TabContents>(tab_contents()),
+ content::Source<TabContents>(tab_contents()),
NotificationService::NoDetails());
}
@@ -466,12 +466,13 @@ void TabSpecificContentSettings::AppCacheAccessed(const GURL& manifest_url,
}
}
-void TabSpecificContentSettings::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void TabSpecificContentSettings::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED);
- Details<const ContentSettingsDetails> settings_details(details);
+ content::Details<const ContentSettingsDetails> settings_details(details);
const NavigationController& controller = tab_contents()->controller();
NavigationEntry* entry = controller.GetActiveEntry();
GURL entry_url;
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.h b/chrome/browser/content_settings/tab_specific_content_settings.h
index a10e2e9..c240759 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.h
+++ b/chrome/browser/content_settings/tab_specific_content_settings.h
@@ -17,8 +17,8 @@
#include "chrome/common/content_settings_types.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/common/dom_storage_common.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class CannedBrowsingDataAppCacheHelper;
class CannedBrowsingDataCookieHelper;
@@ -36,7 +36,7 @@ class CookieOptions;
}
class TabSpecificContentSettings : public TabContentsObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit TabSpecificContentSettings(TabContents* tab);
@@ -253,10 +253,10 @@ class TabSpecificContentSettings : public TabContentsObserver,
void OnContentAccessed(ContentSettingsType type);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Stores which content setting types actually have blocked content.
bool content_blocked_[CONTENT_SETTINGS_NUM_TYPES];
@@ -285,7 +285,7 @@ class TabSpecificContentSettings : public TabContentsObserver,
// Stores whether the user can load blocked plugins on this page.
bool load_plugins_link_enabled_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings);
};
diff --git a/chrome/browser/cookies_tree_model_unittest.cc b/chrome/browser/cookies_tree_model_unittest.cc
index 569c2d9..275f2d7 100644
--- a/chrome/browser/cookies_tree_model_unittest.cc
+++ b/chrome/browser/cookies_tree_model_unittest.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/mock_browsing_data_quota_helper.h"
#include "chrome/browser/mock_browsing_data_local_storage_helper.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/common/notification_details.h"
+#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_types.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
diff --git a/chrome/browser/crash_recovery_browsertest.cc b/chrome/browser/crash_recovery_browsertest.cc
index 1f3dea1..4aedfe6 100644
--- a/chrome/browser/crash_recovery_browsertest.cc
+++ b/chrome/browser/crash_recovery_browsertest.cc
@@ -45,7 +45,7 @@ IN_PROC_BROWSER_TEST_F(CrashRecoveryBrowserTest, Reload) {
SimulateRendererCrash(browser());
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
@@ -74,7 +74,7 @@ IN_PROC_BROWSER_TEST_F(CrashRecoveryBrowserTest, LoadInNewTab) {
SimulateRendererCrash(browser());
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry.cc b/chrome/browser/custom_handlers/protocol_handler_registry.cc
index 55f3fe5..9ce8bdc 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry.cc
@@ -573,7 +573,7 @@ void ProtocolHandlerRegistry::NotifyChanged() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
NotificationService::current()->Notify(
chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED,
- Source<Profile>(profile_),
+ content::Source<Profile>(profile_),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
index 024134d..0f83c2d 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
@@ -17,8 +17,8 @@
#include "chrome/test/base/testing_profile.h"
#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/test_render_view_host.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "net/url_request/url_request.h"
@@ -138,30 +138,31 @@ ShellIntegration::DefaultProtocolClientWorker* FakeDelegate::CreateShellWorker(
return new FakeProtocolClientWorker(observer, protocol, force_os_failure_);
}
-class NotificationCounter : public NotificationObserver {
+class NotificationCounter : public content::NotificationObserver {
public:
explicit NotificationCounter(Profile* profile)
: events_(0),
notification_registrar_() {
notification_registrar_.Add(this,
chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
}
int events() { return events_; }
bool notified() { return events_ > 0; }
void Clear() { events_ = 0; }
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
++events_;
}
int events_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
};
-class QueryProtocolHandlerOnChange : public NotificationObserver {
+class QueryProtocolHandlerOnChange
+ : public content::NotificationObserver {
public:
QueryProtocolHandlerOnChange(Profile* profile,
ProtocolHandlerRegistry* registry)
@@ -170,12 +171,12 @@ class QueryProtocolHandlerOnChange : public NotificationObserver {
notification_registrar_() {
notification_registrar_.Add(this,
chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
std::vector<std::string> output;
registry_->GetRegisteredProtocols(&output);
called_ = true;
@@ -183,7 +184,7 @@ class QueryProtocolHandlerOnChange : public NotificationObserver {
ProtocolHandlerRegistry* registry_;
bool called_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
};
class ProtocolHandlerRegistryTest : public testing::Test {
diff --git a/chrome/browser/debugger/devtools_sanity_unittest.cc b/chrome/browser/debugger/devtools_sanity_unittest.cc
index 5bc66b0..86e1050 100644
--- a/chrome/browser/debugger/devtools_sanity_unittest.cc
+++ b/chrome/browser/debugger/devtools_sanity_unittest.cc
@@ -26,30 +26,30 @@
#include "content/browser/worker_host/worker_process_host.h"
#include "content/browser/worker_host/worker_service.h"
#include "content/browser/worker_host/worker_service_observer.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_service.h"
#include "content/common/worker_messages.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/common/notification_service.h"
#include "net/test/test_server.h"
namespace {
// Used to block until a dev tools client window's browser is closed.
-class BrowserClosedObserver : public NotificationObserver {
+class BrowserClosedObserver : public content::NotificationObserver {
public:
explicit BrowserClosedObserver(Browser* browser) {
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(browser));
+ content::Source<Browser>(browser));
ui_test_utils::RunMessageLoop();
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
MessageLoopForUI::current()->Quit();
}
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(BrowserClosedObserver);
};
@@ -180,7 +180,7 @@ class CancelableQuitTask : public Task {
// Base class for DevTools tests that test devtools functionality for
// extensions and content scripts.
class DevToolsExtensionDebugTest : public DevToolsSanityTest,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
DevToolsExtensionDebugTest() : DevToolsSanityTest() {
PathService::Get(chrome::DIR_TEST_DATA, &test_extensions_dir_);
@@ -200,7 +200,7 @@ class DevToolsExtensionDebugTest : public DevToolsSanityTest,
ExtensionService* service = browser()->profile()->GetExtensionService();
size_t num_before = service->extensions()->size();
{
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
registrar.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
NotificationService::AllSources());
CancelableQuitTask* delayed_quit =
@@ -223,7 +223,7 @@ class DevToolsExtensionDebugTest : public DevToolsSanityTest,
// NOTE: This assumes that the extension host list is not changing while
// this method is running.
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
registrar.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
NotificationService::AllSources());
CancelableQuitTask* delayed_quit =
@@ -246,8 +246,8 @@ class DevToolsExtensionDebugTest : public DevToolsSanityTest,
}
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_LOADED:
case chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING:
@@ -412,7 +412,8 @@ class WorkerDevToolsSanityTest : public InProcessBrowserTest {
if (client_contents->IsLoading()) {
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&client_contents->controller()));
+ content::Source<NavigationController>(
+ &client_contents->controller()));
observer.Wait();
}
}
diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc
index 2d072d9..0490567 100644
--- a/chrome/browser/debugger/devtools_window.cc
+++ b/chrome/browser/debugger/devtools_window.cc
@@ -149,16 +149,19 @@ DevToolsWindow::DevToolsWindow(TabContentsWrapper* tab_contents,
entry->favicon().set_is_valid(true);
// Register on-load actions.
- registrar_.Add(this,
- content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab_contents_->controller()));
- registrar_.Add(this,
- content::NOTIFICATION_TAB_CLOSING,
- Source<NavigationController>(&tab_contents_->controller()));
+ registrar_.Add(
+ this,
+ content::NOTIFICATION_LOAD_STOP,
+ content::Source<NavigationController>(&tab_contents_->controller()));
+ registrar_.Add(
+ this,
+ content::NOTIFICATION_TAB_CLOSING,
+ content::Source<NavigationController>(&tab_contents_->controller()));
registrar_.Add(
this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(ThemeServiceFactory::GetForProfile(profile_)));
+ content::Source<ThemeService>(
+ ThemeServiceFactory::GetForProfile(profile_)));
// There is no inspected_rvh in case of shared workers.
if (inspected_rvh) {
TabContents* tab = inspected_rvh->delegate()->GetAsTabContents();
@@ -448,15 +451,15 @@ void DevToolsWindow::CallClientFunction(const string16& function_name,
}
void DevToolsWindow::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_LOAD_STOP && !is_loaded_) {
is_loaded_ = true;
UpdateTheme();
DoAction();
AddDevToolsExtensionsToClient();
} else if (type == content::NOTIFICATION_TAB_CLOSING) {
- if (Source<NavigationController>(source).ptr() ==
+ if (content::Source<NavigationController>(source).ptr() ==
&tab_contents_->controller()) {
// This happens when browser closes all of its tabs as a result
// of window.Close event.
diff --git a/chrome/browser/debugger/devtools_window.h b/chrome/browser/debugger/devtools_window.h
index d60d88b..afd903a 100644
--- a/chrome/browser/debugger/devtools_window.h
+++ b/chrome/browser/debugger/devtools_window.h
@@ -15,8 +15,8 @@
#include "content/browser/debugger/devtools_client_host.h"
#include "content/browser/renderer_host/render_view_host_observer.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
namespace IPC {
class Message;
@@ -35,7 +35,7 @@ class Value;
class DevToolsWindow
: public DevToolsClientHost,
- private NotificationObserver,
+ private content::NotificationObserver,
private TabContentsDelegate,
private RenderViewHostObserver {
public:
@@ -78,10 +78,10 @@ class DevToolsWindow
bool IsInspectedBrowserPopupOrPanel();
void UpdateFrontendAttachedState();
- // Overridden from NotificationObserver.
+ // Overridden from content::NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
void ScheduleAction(DevToolsToggleAction action);
void DoAction();
@@ -139,7 +139,7 @@ class DevToolsWindow
bool docked_;
bool is_loaded_;
DevToolsToggleAction action_on_load_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(DevToolsWindow);
};
diff --git a/chrome/browser/download/chrome_download_manager_delegate.h b/chrome/browser/download/chrome_download_manager_delegate.h
index e66955b..9d21fe6 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.h
+++ b/chrome/browser/download/chrome_download_manager_delegate.h
@@ -12,8 +12,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/task.h"
#include "content/browser/download/download_manager_delegate.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class CrxInstaller;
class DownloadHistory;
@@ -40,7 +40,7 @@ struct hash<CrxInstaller*> {
class ChromeDownloadManagerDelegate
: public base::RefCountedThreadSafe<ChromeDownloadManagerDelegate>,
public DownloadManagerDelegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit ChromeDownloadManagerDelegate(Profile* profile);
@@ -94,10 +94,10 @@ class ChromeDownloadManagerDelegate
private:
friend class base::RefCountedThreadSafe<ChromeDownloadManagerDelegate>;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Callback function after url is checked with safebrowsing service.
void CheckDownloadUrlDone(int32 download_id, bool is_dangerous_url);
@@ -142,7 +142,7 @@ class ChromeDownloadManagerDelegate
typedef base::hash_map<CrxInstaller*, int> CrxInstallerMap;
CrxInstallerMap crx_installers_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate);
};
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index 054feae..33732e7 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -1186,7 +1186,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, IncognitoDownload) {
// notification inside of a test.
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(incognito));
+ content::Source<Browser>(incognito));
#endif
// Close the Incognito window and don't crash.
@@ -1437,7 +1437,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, NewWindow) {
// notification inside of a test.
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(download_browser));
+ content::Source<Browser>(download_browser));
#endif
// Close the new window.
@@ -1595,7 +1595,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, BrowserCloseAfterDownload) {
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(browser()));
+ content::Source<Browser>(browser()));
browser()->CloseWindow();
signal.Wait();
}
diff --git a/chrome/browser/download/download_crx_util.cc b/chrome/browser/download/download_crx_util.cc
index f27391b..779cdc5 100644
--- a/chrome/browser/download/download_crx_util.cc
+++ b/chrome/browser/download/download_crx_util.cc
@@ -56,8 +56,8 @@ scoped_refptr<CrxInstaller> OpenChromeExtension(
NotificationService* nservice = NotificationService::current();
GURL nonconst_download_url = download_item.GetURL();
nservice->Notify(chrome::NOTIFICATION_EXTENSION_READY_FOR_INSTALL,
- Source<Profile>(profile),
- Details<GURL>(&nonconst_download_url));
+ content::Source<Profile>(profile),
+ content::Details<GURL>(&nonconst_download_url));
scoped_refptr<CrxInstaller> installer(
service->MakeCrxInstaller(CreateExtensionInstallUI(profile)));
diff --git a/chrome/browser/download/download_request_limiter.h b/chrome/browser/download/download_request_limiter.h
index 135d9af..d7c6a7f 100644
--- a/chrome/browser/download/download_request_limiter.h
+++ b/chrome/browser/download/download_request_limiter.h
@@ -11,8 +11,8 @@
#include <vector>
#include "base/memory/ref_counted.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class DownloadRequestInfoBarDelegate;
class NavigationController;
@@ -69,7 +69,7 @@ class DownloadRequestLimiter
// TabDownloadState prompts the user with an infobar as necessary.
// TabDownloadState deletes itself (by invoking
// DownloadRequestLimiter::Remove) as necessary.
- class TabDownloadState : public NotificationObserver {
+ class TabDownloadState : public content::NotificationObserver {
public:
// Creates a new TabDownloadState. |controller| is the controller the
// TabDownloadState tracks the state of and is the host for any dialogs that
@@ -130,10 +130,10 @@ class DownloadRequestLimiter
}
private:
- // NotificationObserver method.
+ // content::NotificationObserver method.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Notifies the callbacks as to whether the download is allowed or not.
// Updates status_ appropriately.
@@ -157,7 +157,7 @@ class DownloadRequestLimiter
std::vector<DownloadRequestLimiter::Callback*> callbacks_;
// Used to remove observers installed on NavigationController.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Handles showing the infobar to the user, may be null.
DownloadRequestInfoBarDelegate* infobar_;
diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc
index 7633340..8677e58 100644
--- a/chrome/browser/download/save_page_browsertest.cc
+++ b/chrome/browser/download/save_page_browsertest.cc
@@ -83,7 +83,8 @@ class SavePageBrowserTest : public InProcessBrowserTest {
ui_test_utils::RegisterAndWait(&observer,
content::NOTIFICATION_SAVE_PACKAGE_SUCCESSFULLY_FINISHED,
NotificationService::AllSources());
- return Details<DownloadItem>(observer.details()).ptr()->original_url();
+ return content::Details<DownloadItem>(observer.details()).ptr()->
+ original_url();
}
#if defined(OS_CHROMEOS) && defined(TOUCH_UI)
diff --git a/chrome/browser/enumerate_modules_model_win.cc b/chrome/browser/enumerate_modules_model_win.cc
index 694de06..83e2752 100644
--- a/chrome/browser/enumerate_modules_model_win.cc
+++ b/chrome/browser/enumerate_modules_model_win.cc
@@ -787,7 +787,7 @@ void EnumerateModulesModel::AcknowledgeConflictNotification() {
conflict_notification_acknowledged_ = true;
NotificationService::current()->Notify(
chrome::NOTIFICATION_MODULE_INCOMPATIBILITY_BADGE_CHANGE,
- Source<EnumerateModulesModel>(this),
+ content::Source<EnumerateModulesModel>(this),
NotificationService::NoDetails());
}
}
@@ -942,7 +942,7 @@ void EnumerateModulesModel::DoneScanning() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_MODULE_LIST_ENUMERATED,
- Source<EnumerateModulesModel>(this),
+ content::Source<EnumerateModulesModel>(this),
NotificationService::NoDetails());
// Command line flag must be enabled for the notification to get sent out.
@@ -954,7 +954,7 @@ void EnumerateModulesModel::DoneScanning() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_MODULE_INCOMPATIBILITY_BADGE_CHANGE,
- Source<EnumerateModulesModel>(this),
+ content::Source<EnumerateModulesModel>(this),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/errorpage_browsertest.cc b/chrome/browser/errorpage_browsertest.cc
index 482bb67..9d3b004b 100644
--- a/chrome/browser/errorpage_browsertest.cc
+++ b/chrome/browser/errorpage_browsertest.cc
@@ -78,7 +78,7 @@ class ErrorPageTest : public InProcessBrowserTest {
ASCIIToUTF16(expected_title));
TestNavigationObserver test_navigation_observer(
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()),
NULL,
num_navigations);
diff --git a/chrome/browser/extensions/app_notification_manager.cc b/chrome/browser/extensions/app_notification_manager.cc
index 01a2bbc..84d5658 100644
--- a/chrome/browser/extensions/app_notification_manager.cc
+++ b/chrome/browser/extensions/app_notification_manager.cc
@@ -17,7 +17,7 @@ AppNotificationManager::AppNotificationManager(Profile* profile)
: profile_(profile) {
registrar_.Add(this,
chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
namespace {
@@ -97,11 +97,12 @@ void AppNotificationManager::ClearAll(const std::string& extension_id) {
&AppNotificationManager::DeleteOnFileThread, this, extension_id));
}
-void AppNotificationManager::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void AppNotificationManager::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
CHECK(type == chrome::NOTIFICATION_EXTENSION_UNINSTALLED);
- ClearAll(*Details<const std::string>(details).ptr());
+ ClearAll(*content::Details<const std::string>(details).ptr());
}
void AppNotificationManager::LoadOnFileThread(const FilePath& storage_path) {
@@ -140,8 +141,8 @@ void AppNotificationManager::HandleLoadResults(const NotificationMap& map) {
list.end());
NotificationService::current()->Notify(
chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED,
- Source<Profile>(profile_),
- Details<const std::string>(&id));
+ content::Source<Profile>(profile_),
+ content::Details<const std::string>(&id));
}
}
diff --git a/chrome/browser/extensions/app_notification_manager.h b/chrome/browser/extensions/app_notification_manager.h
index 8148a08..3136f56 100644
--- a/chrome/browser/extensions/app_notification_manager.h
+++ b/chrome/browser/extensions/app_notification_manager.h
@@ -13,15 +13,15 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/extensions/app_notification.h"
#include "chrome/browser/extensions/app_notification_storage.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class Profile;
// This class keeps track of notifications for installed apps.
class AppNotificationManager
: public base::RefCountedThreadSafe<AppNotificationManager>,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit AppNotificationManager(Profile* profile);
@@ -40,10 +40,10 @@ class AppNotificationManager
// Clears all notifications for |extension_id|.
void ClearAll(const std::string& extension_id);
- // Implementing NotificationObserver interface.
+ // Implementing content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
friend class base::RefCountedThreadSafe<AppNotificationManager>;
@@ -65,7 +65,7 @@ class AppNotificationManager
void DeleteOnFileThread(const std::string& extension_id);
Profile* profile_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
NotificationMap notifications_;
// This should only be used on the FILE thread.
diff --git a/chrome/browser/extensions/app_notification_manager_unittest.cc b/chrome/browser/extensions/app_notification_manager_unittest.cc
index 37aa6c6..ab908e6 100644
--- a/chrome/browser/extensions/app_notification_manager_unittest.cc
+++ b/chrome/browser/extensions/app_notification_manager_unittest.cc
@@ -10,8 +10,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/testing_profile.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
-#include "content/common/notification_details.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace util = app_notification_test_util;
@@ -111,8 +111,8 @@ TEST_F(AppNotificationManagerTest, MAYBE_ExtensionUninstall) {
// Send the uninstall notification for extension id1.
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
- Source<Profile>(profile_.get()),
- Details<const std::string>(&id1));
+ content::Source<Profile>(profile_.get()),
+ content::Details<const std::string>(&id1));
// The id1 items should be gone but the id2 items should still be there.
EXPECT_EQ(NULL, mgr_->GetLast(id1));
diff --git a/chrome/browser/extensions/app_process_apitest.cc b/chrome/browser/extensions/app_process_apitest.cc
index 33f8fcc9..e7bfbb7 100644
--- a/chrome/browser/extensions/app_process_apitest.cc
+++ b/chrome/browser/extensions/app_process_apitest.cc
@@ -305,7 +305,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadIntoAppProcess) {
EnableExtension(app->id());
ui_test_utils::WindowedNotificationObserver reload_observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
browser()->Reload(CURRENT_TAB);
reload_observer.Wait();
@@ -316,7 +316,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadIntoAppProcess) {
DisableExtension(app->id());
ui_test_utils::WindowedNotificationObserver reload_observer2(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
browser()->Reload(CURRENT_TAB);
reload_observer2.Wait();
@@ -327,7 +327,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadIntoAppProcess) {
EnableExtension(app->id());
ui_test_utils::WindowedNotificationObserver js_reload_observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(contents->render_view_host(),
L"", L"location.reload();"));
@@ -339,7 +339,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadIntoAppProcess) {
DisableExtension(app->id());
ui_test_utils::WindowedNotificationObserver js_reload_observer2(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(contents->render_view_host(),
L"", L"location.reload();"));
@@ -489,7 +489,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadAppAfterCrash) {
ui_test_utils::CrashTab(browser()->GetSelectedTabContents());
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
diff --git a/chrome/browser/extensions/apps_promo.cc b/chrome/browser/extensions/apps_promo.cc
index 5f8f734..dd226da 100644
--- a/chrome/browser/extensions/apps_promo.cc
+++ b/chrome/browser/extensions/apps_promo.cc
@@ -390,7 +390,7 @@ void AppsPromoLogoFetcher::SavePromo() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_WEB_STORE_PROMO_LOADED,
- Source<Profile>(profile_),
+ content::Source<Profile>(profile_),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/extensions/content_script_apitest.cc b/chrome/browser/extensions/content_script_apitest.cc
index a5dda3b8..a124f9b 100644
--- a/chrome/browser/extensions/content_script_apitest.cc
+++ b/chrome/browser/extensions/content_script_apitest.cc
@@ -85,7 +85,7 @@ IN_PROC_BROWSER_TEST_F(
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_USER_SCRIPTS_UPDATED,
- Source<Profile>(browser()->profile()));
+ content::Source<Profile>(browser()->profile()));
// Start with a renderer already open at a URL.
GURL url(test_server()->GetURL("file/extensions/test_file.html"));
diff --git a/chrome/browser/extensions/convert_web_app_browsertest.cc b/chrome/browser/extensions/convert_web_app_browsertest.cc
index c426ed8..440a454 100644
--- a/chrome/browser/extensions/convert_web_app_browsertest.cc
+++ b/chrome/browser/extensions/convert_web_app_browsertest.cc
@@ -12,12 +12,12 @@
#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/common/notification_details.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class ExtensionFromWebAppTest
- : public InProcessBrowserTest, public NotificationObserver {
+ : public InProcessBrowserTest, public content::NotificationObserver {
protected:
ExtensionFromWebAppTest() : installed_extension_(NULL) {
}
@@ -31,12 +31,13 @@ class ExtensionFromWebAppTest
command_line->AppendSwitch(switches::kEnableCrxlessWebApps);
}
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_EXTENSION_INSTALLED) {
- const Extension* extension = Details<const Extension>(details).ptr();
+ const Extension* extension =
+ content::Details<const Extension>(details).ptr();
if (extension->id() == expected_extension_id_) {
installed_extension_ = extension;
MessageLoopForUI::current()->Quit();
@@ -50,7 +51,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionFromWebAppTest, Basic) {
browser()->profile()->GetExtensionService()->set_show_extensions_prompts(
false);
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
registrar.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
NotificationService::AllSources());
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index 18a1a87..86ea255 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -446,7 +446,7 @@ void CrxInstaller::InstallUIAbort(bool user_initiated) {
// Kill the theme loading bubble.
NotificationService* service = NotificationService::current();
service->Notify(chrome::NOTIFICATION_NO_THEME_DETECTED,
- Source<CrxInstaller>(this),
+ content::Source<CrxInstaller>(this),
NotificationService::NoDetails());
Release(); // balanced in ConfirmInstall().
@@ -520,8 +520,8 @@ void CrxInstaller::ReportFailureFromUIThread(const std::string& error) {
NotificationService* service = NotificationService::current();
service->Notify(chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
- Source<CrxInstaller>(this),
- Details<const std::string>(&error));
+ content::Source<CrxInstaller>(this),
+ content::Details<const std::string>(&error));
// This isn't really necessary, it is only used because unit tests expect to
// see errors get reported via this interface.
@@ -596,6 +596,6 @@ void CrxInstaller::NotifyCrxInstallComplete() {
// on the extension.
NotificationService::current()->Notify(
chrome::NOTIFICATION_CRX_INSTALLER_DONE,
- Source<CrxInstaller>(this),
+ content::Source<CrxInstaller>(this),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/extensions/extension_accessibility_api.cc b/chrome/browser/extensions/extension_accessibility_api.cc
index c5cb3ad1..08e3a59 100644
--- a/chrome/browser/extensions/extension_accessibility_api.cc
+++ b/chrome/browser/extensions/extension_accessibility_api.cc
@@ -72,32 +72,40 @@ ExtensionAccessibilityEventRouter::~ExtensionAccessibilityEventRouter() {
void ExtensionAccessibilityEventRouter::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_ACCESSIBILITY_WINDOW_OPENED:
- OnWindowOpened(Details<const AccessibilityWindowInfo>(details).ptr());
+ OnWindowOpened(
+ content::Details<const AccessibilityWindowInfo>(details).ptr());
break;
case chrome::NOTIFICATION_ACCESSIBILITY_WINDOW_CLOSED:
- OnWindowClosed(Details<const AccessibilityWindowInfo>(details).ptr());
+ OnWindowClosed(
+ content::Details<const AccessibilityWindowInfo>(details).ptr());
break;
case chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED:
- OnControlFocused(Details<const AccessibilityControlInfo>(details).ptr());
+ OnControlFocused(
+ content::Details<const AccessibilityControlInfo>(details).ptr());
break;
case chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_ACTION:
- OnControlAction(Details<const AccessibilityControlInfo>(details).ptr());
+ OnControlAction(
+ content::Details<const AccessibilityControlInfo>(details).ptr());
break;
case chrome::NOTIFICATION_ACCESSIBILITY_TEXT_CHANGED:
- OnTextChanged(Details<const AccessibilityControlInfo>(details).ptr());
+ OnTextChanged(
+ content::Details<const AccessibilityControlInfo>(details).ptr());
break;
case chrome::NOTIFICATION_ACCESSIBILITY_MENU_OPENED:
- OnMenuOpened(Details<const AccessibilityMenuInfo>(details).ptr());
+ OnMenuOpened(
+ content::Details<const AccessibilityMenuInfo>(details).ptr());
break;
case chrome::NOTIFICATION_ACCESSIBILITY_MENU_CLOSED:
- OnMenuClosed(Details<const AccessibilityMenuInfo>(details).ptr());
+ OnMenuClosed(
+ content::Details<const AccessibilityMenuInfo>(details).ptr());
break;
case chrome::NOTIFICATION_ACCESSIBILITY_VOLUME_CHANGED:
- OnVolumeChanged(Details<const AccessibilityVolumeInfo>(details).ptr());
+ OnVolumeChanged(
+ content::Details<const AccessibilityVolumeInfo>(details).ptr());
break;
default:
NOTREACHED();
diff --git a/chrome/browser/extensions/extension_accessibility_api.h b/chrome/browser/extensions/extension_accessibility_api.h
index c89a1ba..2ead75b 100644
--- a/chrome/browser/extensions/extension_accessibility_api.h
+++ b/chrome/browser/extensions/extension_accessibility_api.h
@@ -13,12 +13,12 @@
#include "base/values.h"
#include "chrome/browser/accessibility_events.h"
#include "chrome/browser/extensions/extension_function.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
// Observes the profile and routes accessibility notifications as events
// to the extension system.
-class ExtensionAccessibilityEventRouter : public NotificationObserver {
+class ExtensionAccessibilityEventRouter : public content::NotificationObserver {
public:
// Single instance of the event router.
static ExtensionAccessibilityEventRouter* GetInstance();
@@ -42,10 +42,10 @@ class ExtensionAccessibilityEventRouter : public NotificationObserver {
ExtensionAccessibilityEventRouter();
virtual ~ExtensionAccessibilityEventRouter();
- // NotificationObserver::Observe.
+ // content::NotificationObserver::Observe.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
void OnWindowOpened(const AccessibilityWindowInfo* details);
void OnWindowClosed(const AccessibilityWindowInfo* details);
@@ -61,7 +61,7 @@ class ExtensionAccessibilityEventRouter : public NotificationObserver {
const std::string& json_args);
// Used for tracking registrations to history service notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DictionaryValue last_focused_control_dict_;
diff --git a/chrome/browser/extensions/extension_apitest.cc b/chrome/browser/extensions/extension_apitest.cc
index 59d7311..b6c0d10 100644
--- a/chrome/browser/extensions/extension_apitest.cc
+++ b/chrome/browser/extensions/extension_apitest.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
namespace {
@@ -60,10 +60,10 @@ bool ExtensionApiTest::ResultCatcher::GetNextResult() {
}
void ExtensionApiTest::ResultCatcher::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (profile_restriction_ &&
- Source<Profile>(source).ptr() != profile_restriction_) {
+ content::Source<Profile>(source).ptr() != profile_restriction_) {
return;
}
@@ -79,7 +79,7 @@ void ExtensionApiTest::ResultCatcher::Observe(
case chrome::NOTIFICATION_EXTENSION_TEST_FAILED:
VLOG(1) << "Got EXTENSION_TEST_FAILED notification.";
results_.push_back(false);
- messages_.push_back(*(Details<std::string>(details).ptr()));
+ messages_.push_back(*(content::Details<std::string>(details).ptr()));
if (waiting_)
MessageLoopForUI::current()->Quit();
break;
diff --git a/chrome/browser/extensions/extension_apitest.h b/chrome/browser/extensions/extension_apitest.h
index bc0465e..8b000de 100644
--- a/chrome/browser/extensions/extension_apitest.h
+++ b/chrome/browser/extensions/extension_apitest.h
@@ -12,7 +12,7 @@
#include "base/compiler_specific.h"
#include "base/values.h"
#include "chrome/browser/extensions/extension_browsertest.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
class Extension;
@@ -36,7 +36,7 @@ class ExtensionApiTest : public ExtensionBrowserTest {
// GetNextResult() and message() if GetNextResult() return false. If there
// are no results, this method will pump the UI message loop until one is
// received.
- class ResultCatcher : public NotificationObserver {
+ class ResultCatcher : public content::NotificationObserver {
public:
ResultCatcher();
virtual ~ResultCatcher();
@@ -51,10 +51,10 @@ class ExtensionApiTest : public ExtensionBrowserTest {
private:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// A sequential list of pass/fail notifications from the test extension(s).
std::deque<bool> results_;
diff --git a/chrome/browser/extensions/extension_app_api.cc b/chrome/browser/extensions/extension_app_api.cc
index d89526c..dd7506c 100644
--- a/chrome/browser/extensions/extension_app_api.cc
+++ b/chrome/browser/extensions/extension_app_api.cc
@@ -72,8 +72,8 @@ bool AppNotifyFunction::RunImpl() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED,
- Source<Profile>(profile_),
- Details<const std::string>(&id));
+ content::Source<Profile>(profile_),
+ content::Details<const std::string>(&id));
return true;
}
@@ -94,7 +94,7 @@ bool AppClearAllNotificationsFunction::RunImpl() {
manager->ClearAll(id);
NotificationService::current()->Notify(
chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED,
- Source<Profile>(profile_),
- Details<const std::string>(&id));
+ content::Source<Profile>(profile_),
+ content::Details<const std::string>(&id));
return true;
}
diff --git a/chrome/browser/extensions/extension_bookmarks_module.cc b/chrome/browser/extensions/extension_bookmarks_module.cc
index 3e1d22c..21f6607 100644
--- a/chrome/browser/extensions/extension_bookmarks_module.cc
+++ b/chrome/browser/extensions/extension_bookmarks_module.cc
@@ -89,8 +89,8 @@ void BookmarksFunction::Run() {
if (success) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_BOOKMARKS_API_INVOKED,
- Source<const Extension>(GetExtension()),
- Details<const BookmarksFunction>(this));
+ content::Source<const Extension>(GetExtension()),
+ content::Details<const BookmarksFunction>(this));
}
SendResponse(success);
}
@@ -112,10 +112,10 @@ bool BookmarksFunction::EditBookmarksEnabled() {
}
void BookmarksFunction::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED);
- Profile* source_profile = Source<Profile>(source).ptr();
+ Profile* source_profile = content::Source<Profile>(source).ptr();
if (!source_profile || !source_profile->IsSameProfile(profile()))
return;
diff --git a/chrome/browser/extensions/extension_bookmarks_module.h b/chrome/browser/extensions/extension_bookmarks_module.h
index b925d8c..9004b31 100644
--- a/chrome/browser/extensions/extension_bookmarks_module.h
+++ b/chrome/browser/extensions/extension_bookmarks_module.h
@@ -15,8 +15,8 @@
#include "chrome/browser/bookmarks/bookmark_model_observer.h"
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/ui/shell_dialogs.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class FilePath;
@@ -69,7 +69,7 @@ class ExtensionBookmarkEventRouter : public BookmarkModelObserver {
};
class BookmarksFunction : public AsyncExtensionFunction,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// AsyncExtensionFunction:
virtual void Run() OVERRIDE;
@@ -87,12 +87,12 @@ class BookmarksFunction : public AsyncExtensionFunction,
bool EditBookmarksEnabled();
private:
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
class GetBookmarksFunction : public BookmarksFunction {
diff --git a/chrome/browser/extensions/extension_browser_actions_api.cc b/chrome/browser/extensions/extension_browser_actions_api.cc
index 562c479..31ae81f 100644
--- a/chrome/browser/extensions/extension_browser_actions_api.cc
+++ b/chrome/browser/extensions/extension_browser_actions_api.cc
@@ -40,7 +40,7 @@ bool BrowserActionFunction::RunImpl() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
- Source<ExtensionAction>(browser_action_),
+ content::Source<ExtensionAction>(browser_action_),
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 66b3236..6b7b6bb 100644
--- a/chrome/browser/extensions/extension_browser_event_router.cc
+++ b/chrome/browser/extensions/extension_browser_event_router.cc
@@ -130,7 +130,7 @@ void ExtensionBrowserEventRouter::RegisterForBrowserNotifications(
// notified when it is. If this is an existing window, this is a no-op that we
// just do to reduce code complexity.
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_WINDOW_READY,
- Source<const Browser>(browser));
+ content::Source<const Browser>(browser));
for (int i = 0; i < browser->tabstrip_model()->count(); ++i)
RegisterForTabNotifications(browser->GetTabContentsAt(i));
@@ -139,22 +139,22 @@ void ExtensionBrowserEventRouter::RegisterForBrowserNotifications(
void ExtensionBrowserEventRouter::RegisterForTabNotifications(
TabContents* contents) {
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(&contents->controller()));
+ content::Source<NavigationController>(&contents->controller()));
// Observing TAB_CONTENTS_DESTROYED is necessary because it's
// possible for tabs to be created, detached and then destroyed without
// ever having been re-attached and closed. This happens in the case of
// a devtools TabContents that is opened in window, docked, then closed.
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(contents));
+ content::Source<TabContents>(contents));
}
void ExtensionBrowserEventRouter::UnregisterForTabNotifications(
TabContents* contents) {
registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(&contents->controller()));
+ content::Source<NavigationController>(&contents->controller()));
registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(contents));
+ content::Source<TabContents>(contents));
}
void ExtensionBrowserEventRouter::OnBrowserWindowReady(const Browser* browser) {
@@ -178,7 +178,7 @@ void ExtensionBrowserEventRouter::OnBrowserRemoved(const Browser* browser) {
browser->tabstrip_model()->RemoveObserver(this);
registrar_.Remove(this, chrome::NOTIFICATION_BROWSER_WINDOW_READY,
- Source<const Browser>(browser));
+ content::Source<const Browser>(browser));
DispatchSimpleBrowserEvent(browser->profile(),
ExtensionTabUtil::GetWindowId(browser),
@@ -523,22 +523,23 @@ ExtensionBrowserEventRouter::TabEntry* ExtensionBrowserEventRouter::GetTabEntry(
return &i->second;
}
-void ExtensionBrowserEventRouter::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ExtensionBrowserEventRouter::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
NavigationController* source_controller =
- Source<NavigationController>(source).ptr();
+ content::Source<NavigationController>(source).ptr();
TabUpdated(source_controller->tab_contents(), true);
} else if (type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED) {
// Tab was destroyed after being detached (without being re-attached).
- TabContents* contents = Source<TabContents>(source).ptr();
+ TabContents* contents = content::Source<TabContents>(source).ptr();
registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(&contents->controller()));
+ content::Source<NavigationController>(&contents->controller()));
registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(contents));
+ content::Source<TabContents>(contents));
} else if (type == chrome::NOTIFICATION_BROWSER_WINDOW_READY) {
- const Browser* browser = Source<const Browser>(source).ptr();
+ const Browser* browser = content::Source<const Browser>(source).ptr();
OnBrowserWindowReady(browser);
#if defined(OS_MACOSX)
} else if (type == content::NOTIFICATION_NO_KEY_WINDOW) {
diff --git a/chrome/browser/extensions/extension_browser_event_router.h b/chrome/browser/extensions/extension_browser_event_router.h
index c3f104f..d0fbf3e 100644
--- a/chrome/browser/extensions/extension_browser_event_router.h
+++ b/chrome/browser/extensions/extension_browser_event_router.h
@@ -14,7 +14,7 @@
#include "chrome/browser/extensions/extension_tabs_module.h"
#include "chrome/browser/tabs/tab_strip_model_observer.h"
#include "chrome/browser/ui/browser_list.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#if defined(TOOLKIT_VIEWS)
#include "views/focus/widget_focus_manager.h"
#elif defined(TOOLKIT_GTK)
@@ -33,7 +33,7 @@ class ExtensionBrowserEventRouter : public TabStripModelObserver,
public ui::ActiveWindowWatcherX::Observer,
#endif
public BrowserList::Observer,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit ExtensionBrowserEventRouter(Profile* profile);
virtual ~ExtensionBrowserEventRouter();
@@ -95,10 +95,10 @@ class ExtensionBrowserEventRouter : public TabStripModelObserver,
const std::string& extension_id,
Browser* browser);
- // NotificationObserver.
+ // content::NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
// "Synthetic" event. Called from TabInsertedAt if new tab is detected.
void TabCreatedAt(TabContents* contents, int index, bool active);
@@ -160,7 +160,7 @@ class ExtensionBrowserEventRouter : public TabStripModelObserver,
// Removes notifications added in RegisterForTabNotifications.
void UnregisterForTabNotifications(TabContents* contents);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
bool initialized_;
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index 14d17d3..8898459 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -26,7 +26,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
ExtensionBrowserTest::ExtensionBrowserTest()
@@ -63,7 +63,7 @@ const Extension* ExtensionBrowserTest::LoadExtensionWithOptions(
const FilePath& path, bool incognito_enabled, bool fileaccess_enabled) {
ExtensionService* service = browser()->profile()->GetExtensionService();
{
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
registrar.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
NotificationService::AllSources());
service->LoadExtension(path, false);
@@ -99,7 +99,7 @@ const Extension* ExtensionBrowserTest::LoadExtensionWithOptions(
{
ui_test_utils::WindowedNotificationObserver load_signal(
chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(browser()->profile()));
+ content::Source<Profile>(browser()->profile()));
CHECK(!service->IsIncognitoEnabled(extension_id));
if (incognito_enabled) {
@@ -113,7 +113,7 @@ const Extension* ExtensionBrowserTest::LoadExtensionWithOptions(
{
ui_test_utils::WindowedNotificationObserver load_signal(
chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(browser()->profile()));
+ content::Source<Profile>(browser()->profile()));
CHECK(service->AllowFileAccess(extension));
if (!fileaccess_enabled) {
@@ -240,7 +240,7 @@ bool ExtensionBrowserTest::InstallOrUpdateExtension(const std::string& id,
size_t num_before = service->extensions()->size();
{
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
registrar.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
NotificationService::AllSources());
registrar.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
@@ -352,7 +352,7 @@ bool ExtensionBrowserTest::WaitForPageActionVisibilityChangeTo(int count) {
bool ExtensionBrowserTest::WaitForExtensionHostsToLoad() {
// Wait for all the extension hosts that exist to finish loading.
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
registrar.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
NotificationService::AllSources());
@@ -410,12 +410,14 @@ bool ExtensionBrowserTest::WaitForExtensionCrash(
return (service->GetExtensionById(extension_id, true) == NULL);
}
-void ExtensionBrowserTest::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ExtensionBrowserTest::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_LOADED:
- last_loaded_extension_id_ = Details<const Extension>(details).ptr()->id();
+ last_loaded_extension_id_ =
+ content::Details<const Extension>(details).ptr()->id();
VLOG(1) << "Got EXTENSION_LOADED notification.";
MessageLoopForUI::current()->Quit();
break;
diff --git a/chrome/browser/extensions/extension_browsertest.h b/chrome/browser/extensions/extension_browsertest.h
index 5521ccc..30645ed 100644
--- a/chrome/browser/extensions/extension_browsertest.h
+++ b/chrome/browser/extensions/extension_browsertest.h
@@ -13,8 +13,8 @@
#include "base/file_path.h"
#include "base/scoped_temp_dir.h"
#include "chrome/test/base/in_process_browser_test.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_types.h"
class Extension;
@@ -22,7 +22,7 @@ class Extension;
// Base class for extension browser tests. Provides utilities for loading,
// unloading, and installing extensions.
class ExtensionBrowserTest
- : public InProcessBrowserTest, public NotificationObserver {
+ : public InProcessBrowserTest, public content::NotificationObserver {
protected:
ExtensionBrowserTest();
@@ -112,10 +112,10 @@ class ExtensionBrowserTest
// crashed.
bool WaitForExtensionCrash(const std::string& extension_id);
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
bool loaded_;
bool installed_;
diff --git a/chrome/browser/extensions/extension_browsertests_misc.cc b/chrome/browser/extensions/extension_browsertests_misc.cc
index f2a8cb0..2b4f79a 100644
--- a/chrome/browser/extensions/extension_browsertests_misc.cc
+++ b/chrome/browser/extensions/extension_browsertests_misc.cc
@@ -728,7 +728,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_PluginLoadUnload) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
@@ -754,7 +754,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_PluginLoadUnload) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
diff --git a/chrome/browser/extensions/extension_cookies_api.cc b/chrome/browser/extensions/extension_cookies_api.cc
index e2af159..aaa6067 100644
--- a/chrome/browser/extensions/extension_cookies_api.cc
+++ b/chrome/browser/extensions/extension_cookies_api.cc
@@ -38,10 +38,11 @@ void ExtensionCookiesEventRouter::Init() {
NotificationService::AllBrowserContextsAndSources());
}
-void ExtensionCookiesEventRouter::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
- Profile* profile = Source<Profile>(source).ptr();
+void ExtensionCookiesEventRouter::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ Profile* profile = content::Source<Profile>(source).ptr();
if (!profile_->IsSameProfile(profile)) {
return;
}
@@ -49,7 +50,7 @@ void ExtensionCookiesEventRouter::Observe(int type,
case chrome::NOTIFICATION_COOKIE_CHANGED:
CookieChanged(
profile,
- Details<ChromeCookieDetails>(details).ptr());
+ content::Details<ChromeCookieDetails>(details).ptr());
break;
default:
diff --git a/chrome/browser/extensions/extension_cookies_api.h b/chrome/browser/extensions/extension_cookies_api.h
index 8266265..66e2cb1 100644
--- a/chrome/browser/extensions/extension_cookies_api.h
+++ b/chrome/browser/extensions/extension_cookies_api.h
@@ -16,8 +16,8 @@
#include "base/time.h"
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/net/chrome_cookie_notification_details.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
namespace base {
@@ -31,7 +31,7 @@ class URLRequestContextGetter;
// Observes CookieMonster notifications and routes them as events to the
// extension system.
-class ExtensionCookiesEventRouter : public NotificationObserver {
+class ExtensionCookiesEventRouter : public content::NotificationObserver {
public:
explicit ExtensionCookiesEventRouter(Profile* profile);
virtual ~ExtensionCookiesEventRouter();
@@ -39,10 +39,10 @@ class ExtensionCookiesEventRouter : public NotificationObserver {
void Init();
private:
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Handler for the COOKIE_CHANGED event. The method takes the details of such
// an event and constructs a suitable JSON formatted extension event from it.
@@ -56,7 +56,7 @@ class ExtensionCookiesEventRouter : public NotificationObserver {
GURL& cookie_domain);
// Used for tracking registrations to CookieMonster notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
Profile* profile_;
diff --git a/chrome/browser/extensions/extension_debugger_api.cc b/chrome/browser/extensions/extension_debugger_api.cc
index aeddcfc..ec39215 100644
--- a/chrome/browser/extensions/extension_debugger_api.cc
+++ b/chrome/browser/extensions/extension_debugger_api.cc
@@ -31,7 +31,7 @@
namespace keys = extension_debugger_api_constants;
class ExtensionDevToolsClientHost : public DevToolsClientHost,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
ExtensionDevToolsClientHost(TabContents* tab_contents,
const std::string& extension_id,
@@ -53,16 +53,16 @@ class ExtensionDevToolsClientHost : public DevToolsClientHost,
virtual void FrameNavigating(const std::string& url) {}
private:
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
void OnDispatchOnInspectorFrontend(const std::string& data);
TabContents* tab_contents_;
std::string extension_id_;
int tab_id_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
int last_request_id_;
typedef std::map<int, scoped_refptr<SendRequestDebuggerFunction> >
PendingRequests;
@@ -120,7 +120,7 @@ ExtensionDevToolsClientHost::ExtensionDevToolsClientHost(
Profile* profile =
Profile::FromBrowserContext(tab_contents_->browser_context());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
// Attach to debugger and tell it we are ready.
DevToolsManager::GetInstance()->RegisterDevToolsClientHostFor(
@@ -200,8 +200,8 @@ void ExtensionDevToolsClientHost::SendMessageToBackend(
void ExtensionDevToolsClientHost::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_EXTENSION_UNLOADED);
Close();
}
diff --git a/chrome/browser/extensions/extension_event_router.cc b/chrome/browser/extensions/extension_event_router.cc
index 7f662ea..355daca 100644
--- a/chrome/browser/extensions/extension_event_router.cc
+++ b/chrome/browser/extensions/extension_event_router.cc
@@ -96,7 +96,7 @@ ExtensionEventRouter::ExtensionEventRouter(Profile* profile)
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
// TODO(tessamac): also get notified for background page crash/failure.
}
@@ -331,13 +331,15 @@ void ExtensionEventRouter::DispatchPendingEvents(
pending_events_.erase(extension_id);
}
-void ExtensionEventRouter::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ExtensionEventRouter::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED:
case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: {
- RenderProcessHost* renderer = Source<RenderProcessHost>(source).ptr();
+ RenderProcessHost* renderer =
+ content::Source<RenderProcessHost>(source).ptr();
// Remove all event listeners associated with this renderer
for (ListenerMap::iterator it = listeners_.begin();
it != listeners_.end(); ) {
@@ -356,7 +358,7 @@ void ExtensionEventRouter::Observe(int type,
}
case chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING: {
// TODO: dispatch events in queue. ExtensionHost is in the details.
- ExtensionHost* eh = Details<ExtensionHost>(details).ptr();
+ ExtensionHost* eh = content::Details<ExtensionHost>(details).ptr();
DispatchPendingEvents(eh->extension_id());
break;
}
diff --git a/chrome/browser/extensions/extension_event_router.h b/chrome/browser/extensions/extension_event_router.h
index 909d185..55831ed7 100644
--- a/chrome/browser/extensions/extension_event_router.h
+++ b/chrome/browser/extensions/extension_event_router.h
@@ -13,8 +13,8 @@
#include "base/compiler_specific.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ipc/ipc_message.h"
class GURL;
@@ -23,7 +23,7 @@ class ExtensionDevToolsManager;
class Profile;
class RenderProcessHost;
-class ExtensionEventRouter : public NotificationObserver {
+class ExtensionEventRouter : public content::NotificationObserver {
public:
// Sends an event via ipc_sender to the given extension. Can be called on
// any thread.
@@ -111,12 +111,12 @@ class ExtensionEventRouter : public NotificationObserver {
struct EventListener;
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
Profile* profile_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
scoped_refptr<ExtensionDevToolsManager> extension_devtools_manager_;
diff --git a/chrome/browser/extensions/extension_function.h b/chrome/browser/extensions/extension_function.h
index b006fd8..bbac274 100644
--- a/chrome/browser/extensions/extension_function.h
+++ b/chrome/browser/extensions/extension_function.h
@@ -17,8 +17,8 @@
#include "chrome/browser/extensions/extension_info_map.h"
#include "chrome/common/extensions/extension.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ipc/ipc_message.h"
class Browser;
@@ -266,15 +266,15 @@ class UIThreadExtensionFunction : public ExtensionFunction {
// common for subclasses of ExtensionFunction to be NotificationObservers, and
// it would be an easy error to forget to call the base class's Observe()
// method.
- class RenderViewHostTracker : public NotificationObserver {
+ class RenderViewHostTracker : public content::NotificationObserver {
public:
explicit RenderViewHostTracker(UIThreadExtensionFunction* function);
private:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
UIThreadExtensionFunction* function_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
virtual void Destruct() const;
diff --git a/chrome/browser/extensions/extension_history_api.cc b/chrome/browser/extensions/extension_history_api.cc
index 4145305..5d6fd0f 100644
--- a/chrome/browser/extensions/extension_history_api.cc
+++ b/chrome/browser/extensions/extension_history_api.cc
@@ -73,7 +73,7 @@ ExtensionHistoryEventRouter::~ExtensionHistoryEventRouter() {}
void ExtensionHistoryEventRouter::ObserveProfile(Profile* profile) {
CHECK(registrar_.IsEmpty());
- const Source<Profile> source = Source<Profile>(profile);
+ const content::Source<Profile> source = content::Source<Profile>(profile);
registrar_.Add(this,
chrome::NOTIFICATION_HISTORY_URL_VISITED,
source);
@@ -82,19 +82,20 @@ void ExtensionHistoryEventRouter::ObserveProfile(Profile* profile) {
source);
}
-void ExtensionHistoryEventRouter::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ExtensionHistoryEventRouter::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_HISTORY_URL_VISITED:
HistoryUrlVisited(
- Source<Profile>(source).ptr(),
- Details<const history::URLVisitedDetails>(details).ptr());
+ content::Source<Profile>(source).ptr(),
+ content::Details<const history::URLVisitedDetails>(details).ptr());
break;
case chrome::NOTIFICATION_HISTORY_URLS_DELETED:
HistoryUrlsRemoved(
- Source<Profile>(source).ptr(),
- Details<const history::URLsDeletedDetails>(details).ptr());
+ content::Source<Profile>(source).ptr(),
+ content::Details<const history::URLsDeletedDetails>(details).ptr());
break;
default:
NOTREACHED();
diff --git a/chrome/browser/extensions/extension_history_api.h b/chrome/browser/extensions/extension_history_api.h
index a7ec19a..f455a1c 100644
--- a/chrome/browser/extensions/extension_history_api.h
+++ b/chrome/browser/extensions/extension_history_api.h
@@ -12,11 +12,11 @@
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/history/history_notifications.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
// Observes History service and routes the notifications as events to the
// extension system.
-class ExtensionHistoryEventRouter : public NotificationObserver {
+class ExtensionHistoryEventRouter : public content::NotificationObserver {
public:
explicit ExtensionHistoryEventRouter();
virtual ~ExtensionHistoryEventRouter();
@@ -24,10 +24,10 @@ class ExtensionHistoryEventRouter : public NotificationObserver {
void ObserveProfile(Profile* profile);
private:
- // NotificationObserver::Observe.
+ // content::NotificationObserver::Observe.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
void HistoryUrlVisited(Profile* profile,
const history::URLVisitedDetails* details);
@@ -40,7 +40,7 @@ class ExtensionHistoryEventRouter : public NotificationObserver {
const std::string& json_args);
// Used for tracking registrations to history service notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(ExtensionHistoryEventRouter);
};
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 2b8adf6..5cfa428 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -151,11 +151,11 @@ ExtensionHost::ExtensionHost(const Extension* extension,
// Listen for when the render process' handle is available so we can add it
// to the task manager then.
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED,
- Source<RenderProcessHost>(render_process_host()));
+ content::Source<RenderProcessHost>(render_process_host()));
// Listen for when an extension is unloaded from the same profile, as it may
// be the same extension that this points to.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
// This "mock" constructor should only be used by unit tests.
@@ -177,8 +177,8 @@ ExtensionHost::ExtensionHost(const Extension* extension,
ExtensionHost::~ExtensionHost() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED,
- Source<Profile>(profile_),
- Details<ExtensionHost>(this));
+ content::Source<Profile>(profile_),
+ content::Details<ExtensionHost>(this));
ProcessCreationQueue::GetInstance()->Remove(this);
GetJavaScriptDialogCreatorInstance()->ResetJavaScriptState(this);
// render_view_host_ may be NULL in unit tests.
@@ -281,7 +281,7 @@ void ExtensionHost::NavigateToURL(const GURL& url) {
!profile_->GetExtensionService()->IsBackgroundPageReady(extension_)) {
// Make sure the background page loads before any others.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY,
- Source<Extension>(extension_));
+ content::Source<Extension>(extension_));
return;
}
@@ -289,8 +289,8 @@ void ExtensionHost::NavigateToURL(const GURL& url) {
}
void ExtensionHost::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY:
DCHECK(profile_->GetExtensionService()->
@@ -300,16 +300,18 @@ void ExtensionHost::Observe(int type,
case content::NOTIFICATION_RENDERER_PROCESS_CREATED:
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PROCESS_CREATED,
- Source<Profile>(profile_),
- Details<ExtensionHost>(this));
+ content::Source<Profile>(profile_),
+ content::Details<ExtensionHost>(this));
break;
case chrome::NOTIFICATION_EXTENSION_UNLOADED:
// The extension object will be deleted after this notification has been
// sent. NULL it out so that dirty pointer issues don't arise in cases
// when multiple ExtensionHost objects pointing to the same Extension are
// present.
- if (extension_ == Details<UnloadedExtensionInfo>(details)->extension)
+ if (extension_ ==
+ content::Details<UnloadedExtensionInfo>(details)->extension) {
extension_ = NULL;
+ }
break;
default:
NOTREACHED() << "Unexpected notification sent.";
@@ -346,8 +348,8 @@ void ExtensionHost::RenderViewGone(RenderViewHost* render_view_host,
DCHECK_EQ(render_view_host_, render_view_host);
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
- Source<Profile>(profile_),
- Details<ExtensionHost>(this));
+ content::Source<Profile>(profile_),
+ content::Details<ExtensionHost>(this));
}
void ExtensionHost::DidNavigate(RenderViewHost* render_view_host,
@@ -388,8 +390,8 @@ void ExtensionHost::DidStopLoading() {
if (notify) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
- Source<Profile>(profile_),
- Details<ExtensionHost>(this));
+ content::Source<Profile>(profile_),
+ content::Details<ExtensionHost>(this));
if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE) {
UMA_HISTOGRAM_TIMES("Extensions.BackgroundPageLoadTime",
since_created_.Elapsed());
@@ -431,8 +433,8 @@ void ExtensionHost::DocumentOnLoadCompletedInMainFrame(RenderViewHost* rvh,
if (chrome::VIEW_TYPE_EXTENSION_POPUP == GetRenderViewType()) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_POPUP_VIEW_READY,
- Source<Profile>(profile_),
- Details<ExtensionHost>(this));
+ content::Source<Profile>(profile_),
+ content::Details<ExtensionHost>(this));
}
}
@@ -503,8 +505,8 @@ void ExtensionHost::Close(RenderViewHost* render_view_host) {
extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
- Source<Profile>(profile_),
- Details<ExtensionHost>(this));
+ content::Source<Profile>(profile_),
+ content::Details<ExtensionHost>(this));
}
}
@@ -572,8 +574,8 @@ void ExtensionHost::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
event.windowsKeyCode == ui::VKEY_ESCAPE) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
- Source<Profile>(profile_),
- Details<ExtensionHost>(this));
+ content::Source<Profile>(profile_),
+ content::Details<ExtensionHost>(this));
return;
}
}
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h
index 3ae64f5..9777dda 100644
--- a/chrome/browser/extensions/extension_host.h
+++ b/chrome/browser/extensions/extension_host.h
@@ -15,8 +15,8 @@
#include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
#include "content/browser/javascript_dialogs.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#if defined(TOOLKIT_VIEWS)
#include "chrome/browser/ui/views/extensions/extension_view.h"
@@ -42,7 +42,7 @@ struct WebPreferences;
class ExtensionHost : public RenderViewHostDelegate,
public RenderViewHostDelegate::View,
public ExtensionFunctionDispatcher::Delegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public content::JavaScriptDialogDelegate {
public:
class ProcessCreationQueue;
@@ -183,10 +183,10 @@ class ExtensionHost : public RenderViewHostDelegate,
virtual void GotFocus() OVERRIDE;
virtual void TakeFocus(bool reverse) OVERRIDE;
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Overridden from content::JavaScriptDialogDelegate:
virtual void OnDialogClosed(IPC::Message* reply_msg,
@@ -274,7 +274,7 @@ class ExtensionHost : public RenderViewHostDelegate,
// The URL being hosted.
GURL url_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
ExtensionFunctionDispatcher extension_function_dispatcher_;
diff --git a/chrome/browser/extensions/extension_infobar_delegate.h b/chrome/browser/extensions/extension_infobar_delegate.h
index 225e92d..8568b34 100644
--- a/chrome/browser/extensions/extension_infobar_delegate.h
+++ b/chrome/browser/extensions/extension_infobar_delegate.h
@@ -8,8 +8,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class Browser;
class Extension;
@@ -20,7 +20,7 @@ class Profile;
// The InfobarDelegate for creating and managing state for the ExtensionInfobar
// plus monitor when the extension goes away.
class ExtensionInfoBarDelegate : public InfoBarDelegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// The observer for when the delegate dies.
class DelegateObserver {
@@ -55,10 +55,10 @@ class ExtensionInfoBarDelegate : public InfoBarDelegate,
virtual Type GetInfoBarType() const OVERRIDE;
virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate() OVERRIDE;
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
Browser* browser_;
@@ -72,7 +72,7 @@ class ExtensionInfoBarDelegate : public InfoBarDelegate,
DelegateObserver* observer_;
const Extension* extension_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The requested height of the infobar (in pixels).
int height_;
diff --git a/chrome/browser/extensions/extension_input_api.cc b/chrome/browser/extensions/extension_input_api.cc
index 698140a..86012cb 100644
--- a/chrome/browser/extensions/extension_input_api.cc
+++ b/chrome/browser/extensions/extension_input_api.cc
@@ -168,7 +168,7 @@ bool SendKeyboardEventInputFunction::RunImpl() {
bool HideKeyboardFunction::RunImpl() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_HIDE_KEYBOARD_INVOKED,
- Source<HideKeyboardFunction>(this),
+ content::Source<HideKeyboardFunction>(this),
NotificationService::NoDetails());
return true;
}
@@ -187,8 +187,8 @@ bool SetKeyboardHeightFunction::RunImpl() {
// notification.
NotificationService::current()->Notify(
chrome::NOTIFICATION_SET_KEYBOARD_HEIGHT_INVOKED,
- Source<SetKeyboardHeightFunction>(this),
- Details<int>(&height));
+ content::Source<SetKeyboardHeightFunction>(this),
+ content::Details<int>(&height));
return true;
}
#endif
diff --git a/chrome/browser/extensions/extension_input_method_apitest.cc b/chrome/browser/extensions/extension_input_method_apitest.cc
index bce261c..f040efd 100644
--- a/chrome/browser/extensions/extension_input_method_apitest.cc
+++ b/chrome/browser/extensions/extension_input_method_apitest.cc
@@ -9,8 +9,8 @@
#include "chrome/browser/chromeos/input_method/input_method_manager.h"
#include "chrome/browser/extensions/extension_test_api.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -22,7 +22,7 @@ const char kSetInputMethodDone[] = "done";
// Class that listens for the JS message then changes input method and replies
// back.
-class SetInputMethodListener : public NotificationObserver {
+class SetInputMethodListener : public content::NotificationObserver {
public:
// Creates listener, which should reply exactly |count_| times.
explicit SetInputMethodListener(int count) : count_(count) {
@@ -34,10 +34,10 @@ class SetInputMethodListener : public NotificationObserver {
EXPECT_EQ(0, count_);
}
- // Implements the NotificationObserver interface.
+ // Implements the content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
const std::string& content = *Details<std::string>(details).ptr();
const std::string expected_message = StringPrintf("%s:%s",
kSetInputMethodMessage,
@@ -47,14 +47,14 @@ class SetInputMethodListener : public NotificationObserver {
ChangeInputMethod(StringPrintf("xkb:%s", kNewInputMethod));
ExtensionTestSendMessageFunction* function =
- Source<ExtensionTestSendMessageFunction>(source).ptr();
+ content::Source<ExtensionTestSendMessageFunction>(source).ptr();
EXPECT_GT(count_--, 0);
function->Reply(kSetInputMethodDone);
}
}
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
int count_;
};
diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc
index 14c47e4..25466a6 100644
--- a/chrome/browser/extensions/extension_install_ui.cc
+++ b/chrome/browser/extensions/extension_install_ui.cc
@@ -325,7 +325,7 @@ void ExtensionInstallUI::OnImageLoaded(
case INSTALL_PROMPT: {
NotificationService* service = NotificationService::current();
service->Notify(chrome::NOTIFICATION_EXTENSION_WILL_SHOW_CONFIRM_DIALOG,
- Source<ExtensionInstallUI>(this),
+ content::Source<ExtensionInstallUI>(this),
NotificationService::NoDetails());
Prompt prompt(prompt_type_);
@@ -349,8 +349,8 @@ void ExtensionInstallUI::OpenAppInstalledNTP(Browser* browser,
NotificationService::current()->Notify(
chrome::NOTIFICATION_APP_INSTALLED_TO_NTP,
- Source<TabContents>(params.target_contents->tab_contents()),
- Details<const std::string>(&app_id));
+ content::Source<TabContents>(params.target_contents->tab_contents()),
+ content::Details<const std::string>(&app_id));
}
// static
diff --git a/chrome/browser/extensions/extension_management_api.cc b/chrome/browser/extensions/extension_management_api.cc
index e638801..06c846d 100644
--- a/chrome/browser/extensions/extension_management_api.cc
+++ b/chrome/browser/extensions/extension_management_api.cc
@@ -431,16 +431,16 @@ void ExtensionManagementEventRouter::Init() {
for (size_t i = 0; i < arraysize(types); i++) {
registrar_.Add(this,
types[i],
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
}
void ExtensionManagementEventRouter::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
const char* event_name = NULL;
- Profile* profile = Source<Profile>(source).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
CHECK(profile);
CHECK(profile_->IsSameProfile(profile));
@@ -464,14 +464,14 @@ void ExtensionManagementEventRouter::Observe(
ListValue args;
if (event_name == events::kOnExtensionUninstalled) {
- args.Append(
- Value::CreateStringValue(*Details<const std::string>(details).ptr()));
+ args.Append(Value::CreateStringValue(
+ *content::Details<const std::string>(details).ptr()));
} else {
const Extension* extension = NULL;
if (event_name == events::kOnExtensionDisabled) {
- extension = Details<UnloadedExtensionInfo>(details)->extension;
+ extension = content::Details<UnloadedExtensionInfo>(details)->extension;
} else {
- extension = Details<const Extension>(details).ptr();
+ extension = content::Details<const Extension>(details).ptr();
}
CHECK(extension);
ExtensionService* service = profile->GetExtensionService();
diff --git a/chrome/browser/extensions/extension_management_api.h b/chrome/browser/extensions/extension_management_api.h
index 6ebe35c..d73b407 100644
--- a/chrome/browser/extensions/extension_management_api.h
+++ b/chrome/browser/extensions/extension_management_api.h
@@ -8,8 +8,8 @@
#include "base/compiler_specific.h"
#include "chrome/browser/extensions/extension_function.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class ExtensionService;
@@ -66,7 +66,7 @@ class UninstallFunction : public ExtensionManagementFunction {
DECLARE_EXTENSION_FUNCTION_NAME("management.uninstall");
};
-class ExtensionManagementEventRouter : public NotificationObserver {
+class ExtensionManagementEventRouter : public content::NotificationObserver {
public:
explicit ExtensionManagementEventRouter(Profile* profile);
virtual ~ExtensionManagementEventRouter();
@@ -74,12 +74,12 @@ class ExtensionManagementEventRouter : public NotificationObserver {
void Init();
private:
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
Profile* profile_;
diff --git a/chrome/browser/extensions/extension_management_apitest.cc b/chrome/browser/extensions/extension_management_apitest.cc
index b1efdf6..d71591b 100644
--- a/chrome/browser/extensions/extension_management_apitest.cc
+++ b/chrome/browser/extensions/extension_management_apitest.cc
@@ -99,7 +99,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchPanelApp) {
// Close the app panel.
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(app_browser));
+ content::Source<Browser>(app_browser));
app_browser->CloseWindow();
signal.Wait();
diff --git a/chrome/browser/extensions/extension_management_browsertest.cc b/chrome/browser/extensions/extension_management_browsertest.cc
index 3119ab0..2f33502 100644
--- a/chrome/browser/extensions/extension_management_browsertest.cc
+++ b/chrome/browser/extensions/extension_management_browsertest.cc
@@ -227,7 +227,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, DisableEnable) {
}
// Used for testing notifications sent during extension updates.
-class NotificationListener : public NotificationObserver {
+class NotificationListener : public content::NotificationObserver {
public:
NotificationListener() : started_(false), finished_(false) {
int types[] = {
@@ -253,10 +253,10 @@ class NotificationListener : public NotificationObserver {
updates_.clear();
}
- // Implements NotificationObserver interface.
+ // Implements content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_UPDATING_STARTED: {
DCHECK(!started_);
@@ -269,7 +269,8 @@ class NotificationListener : public NotificationObserver {
break;
}
case chrome::NOTIFICATION_EXTENSION_UPDATE_FOUND: {
- const std::string* id = Details<const std::string>(details).ptr();
+ const std::string* id =
+ content::Details<const std::string>(details).ptr();
updates_.insert(*id);
break;
}
@@ -279,7 +280,7 @@ class NotificationListener : public NotificationObserver {
}
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Did we see EXTENSION_UPDATING_STARTED?
bool started_;
diff --git a/chrome/browser/extensions/extension_menu_manager.cc b/chrome/browser/extensions/extension_menu_manager.cc
index cf282d4..1ac320f 100644
--- a/chrome/browser/extensions/extension_menu_manager.cc
+++ b/chrome/browser/extensions/extension_menu_manager.cc
@@ -94,7 +94,7 @@ void ExtensionMenuItem::AddChild(ExtensionMenuItem* item) {
ExtensionMenuManager::ExtensionMenuManager(Profile* profile) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
}
ExtensionMenuManager::~ExtensionMenuManager() {
@@ -446,14 +446,15 @@ void ExtensionMenuManager::ExecuteCommand(
item->extension_id(), event_name, json_args, profile, GURL());
}
-void ExtensionMenuManager::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ExtensionMenuManager::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_EXTENSION_UNLOADED);
// Remove menu items for disabled/uninstalled extensions.
const Extension* extension =
- Details<UnloadedExtensionInfo>(details)->extension;
+ content::Details<UnloadedExtensionInfo>(details)->extension;
if (ContainsKey(context_items_, extension->id())) {
RemoveAllContextItems(extension->id());
}
diff --git a/chrome/browser/extensions/extension_menu_manager.h b/chrome/browser/extensions/extension_menu_manager.h
index 3d39950..06652af 100644
--- a/chrome/browser/extensions/extension_menu_manager.h
+++ b/chrome/browser/extensions/extension_menu_manager.h
@@ -18,8 +18,8 @@
#include "base/string16.h"
#include "chrome/browser/extensions/extension_icon_manager.h"
#include "chrome/common/extensions/url_pattern_set.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
struct ContextMenuParams;
@@ -192,7 +192,7 @@ class ExtensionMenuItem {
};
// This class keeps track of menu items added by extensions.
-class ExtensionMenuManager : public NotificationObserver {
+class ExtensionMenuManager : public content::NotificationObserver {
public:
explicit ExtensionMenuManager(Profile* profile);
virtual ~ExtensionMenuManager();
@@ -246,9 +246,9 @@ class ExtensionMenuManager : public NotificationObserver {
// default extension icon.
const SkBitmap& GetIconForExtension(const std::string& extension_id);
- // Implements the NotificationObserver interface.
- virtual void Observe(int type, const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ // Implements the content::NotificationObserver interface.
+ virtual void Observe(int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
FRIEND_TEST_ALL_PREFIXES(ExtensionMenuManagerTest, DeleteParent);
@@ -271,7 +271,7 @@ class ExtensionMenuManager : public NotificationObserver {
// items.
std::map<ExtensionMenuItem::Id, ExtensionMenuItem*> items_by_id_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
ExtensionIconManager icon_manager_;
diff --git a/chrome/browser/extensions/extension_menu_manager_unittest.cc b/chrome/browser/extensions/extension_menu_manager_unittest.cc
index a1bfdbb..5492626 100644
--- a/chrome/browser/extensions/extension_menu_manager_unittest.cc
+++ b/chrome/browser/extensions/extension_menu_manager_unittest.cc
@@ -335,8 +335,8 @@ TEST_F(ExtensionMenuManagerTest, ExtensionUnloadRemovesMenuItems) {
UnloadedExtensionInfo details(
extension1, extension_misc::UNLOAD_REASON_DISABLE);
notifier->Notify(chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(&profile_),
- Details<UnloadedExtensionInfo>(&details));
+ content::Source<Profile>(&profile_),
+ content::Details<UnloadedExtensionInfo>(&details));
ASSERT_EQ(NULL, manager_.MenuItems(extension1->id()));
ASSERT_EQ(1u, manager_.MenuItems(extension2->id())->size());
ASSERT_TRUE(manager_.GetItemById(id1) == NULL);
diff --git a/chrome/browser/extensions/extension_message_service.cc b/chrome/browser/extensions/extension_message_service.cc
index c21e696..c90ca5c 100644
--- a/chrome/browser/extensions/extension_message_service.cc
+++ b/chrome/browser/extensions/extension_message_service.cc
@@ -326,18 +326,20 @@ void ExtensionMessageService::PostMessageFromRenderer(
DispatchOnMessage(port, message, dest_port_id);
}
-void ExtensionMessageService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ExtensionMessageService::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED:
case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: {
- RenderProcessHost* renderer = Source<RenderProcessHost>(source).ptr();
+ RenderProcessHost* renderer =
+ content::Source<RenderProcessHost>(source).ptr();
OnSenderClosed(renderer);
break;
}
case content::NOTIFICATION_RENDER_VIEW_HOST_DELETED:
- OnSenderClosed(Source<RenderViewHost>(source).ptr());
+ OnSenderClosed(content::Source<RenderViewHost>(source).ptr());
break;
default:
NOTREACHED();
diff --git a/chrome/browser/extensions/extension_message_service.h b/chrome/browser/extensions/extension_message_service.h
index c5adb86..e7b21e9 100644
--- a/chrome/browser/extensions/extension_message_service.h
+++ b/chrome/browser/extensions/extension_message_service.h
@@ -12,8 +12,8 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ipc/ipc_message.h"
class GURL;
@@ -46,7 +46,7 @@ class TabContents;
// class. Then we can get rid of ProfileDestroyed().
class ExtensionMessageService
: public base::RefCounted<ExtensionMessageService>,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// A messaging channel. Note that the opening port can be the same as the
// receiver, if an extension background page wants to talk to its tab (for
@@ -134,17 +134,17 @@ class ExtensionMessageService
void CloseChannelImpl(MessageChannelMap::iterator channel_iter, int port_id,
bool notify_other_port);
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// An IPC sender that might be in our list of channels has closed.
void OnSenderClosed(IPC::Message::Sender* sender);
Profile* profile_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
MessageChannelMap channels_;
diff --git a/chrome/browser/extensions/extension_messages_apitest.cc b/chrome/browser/extensions/extension_messages_apitest.cc
index 1ac06c0..36a1336 100644
--- a/chrome/browser/extensions/extension_messages_apitest.cc
+++ b/chrome/browser/extensions/extension_messages_apitest.cc
@@ -6,13 +6,13 @@
#include "chrome/browser/extensions/extension_event_router.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "googleurl/src/gurl.h"
namespace {
-class MessageSender : public NotificationObserver {
+class MessageSender : public content::NotificationObserver {
public:
MessageSender() {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
@@ -21,32 +21,32 @@ class MessageSender : public NotificationObserver {
private:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
ExtensionEventRouter* event_router =
- Source<Profile>(source).ptr()->GetExtensionEventRouter();
+ content::Source<Profile>(source).ptr()->GetExtensionEventRouter();
// Sends four messages to the extension. All but the third message sent
// from the origin http://b.com/ are supposed to arrive.
event_router->DispatchEventToRenderers("test.onMessage",
"[{\"lastMessage\":false,\"data\":\"no restriction\"}]",
- Source<Profile>(source).ptr(),
+ content::Source<Profile>(source).ptr(),
GURL());
event_router->DispatchEventToRenderers("test.onMessage",
"[{\"lastMessage\":false,\"data\":\"http://a.com/\"}]",
- Source<Profile>(source).ptr(),
+ content::Source<Profile>(source).ptr(),
GURL("http://a.com/"));
event_router->DispatchEventToRenderers("test.onMessage",
"[{\"lastMessage\":false,\"data\":\"http://b.com/\"}]",
- Source<Profile>(source).ptr(),
+ content::Source<Profile>(source).ptr(),
GURL("http://b.com/"));
event_router->DispatchEventToRenderers("test.onMessage",
"[{\"lastMessage\":true,\"data\":\"last message\"}]",
- Source<Profile>(source).ptr(),
+ content::Source<Profile>(source).ptr(),
GURL());
}
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
} // namespace
diff --git a/chrome/browser/extensions/extension_metrics_apitest.cc b/chrome/browser/extensions/extension_metrics_apitest.cc
index 74bd826..3809c7a 100644
--- a/chrome/browser/extensions/extension_metrics_apitest.cc
+++ b/chrome/browser/extensions/extension_metrics_apitest.cc
@@ -8,7 +8,7 @@
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
namespace {
@@ -56,7 +56,7 @@ std::string BuildFullName(const std::string& name, const Extension* extension) {
// This class observes and collects user action notifications that are sent
// by the tests, so that they can be examined afterwards for correctness.
-class UserActionObserver : public NotificationObserver {
+class UserActionObserver : public content::NotificationObserver {
public:
UserActionObserver();
@@ -65,8 +65,8 @@ class UserActionObserver : public NotificationObserver {
int count);
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
typedef std::map<std::string, int> UserActionCountMap;
@@ -80,7 +80,7 @@ class UserActionObserver : public NotificationObserver {
return i == count_map_.end() ? -1 : i->second;
}
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
UserActionCountMap count_map_;
};
@@ -90,9 +90,9 @@ UserActionObserver::UserActionObserver() {
}
void UserActionObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
- const char* name = *Details<const char*>(details).ptr();
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ const char* name = *content::Details<const char*>(details).ptr();
++(count_map_[name]);
}
diff --git a/chrome/browser/extensions/extension_navigation_observer.cc b/chrome/browser/extensions/extension_navigation_observer.cc
index 8c33d7a..f093c62 100644
--- a/chrome/browser/extensions/extension_navigation_observer.cc
+++ b/chrome/browser/extensions/extension_navigation_observer.cc
@@ -17,15 +17,17 @@ ExtensionNavigationObserver::ExtensionNavigationObserver(Profile* profile)
ExtensionNavigationObserver::~ExtensionNavigationObserver() {}
-void ExtensionNavigationObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ExtensionNavigationObserver::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type != content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
NOTREACHED();
return;
}
- NavigationController* controller = Source<NavigationController>(source).ptr();
+ NavigationController* controller =
+ content::Source<NavigationController>(source).ptr();
if (!profile_->IsSameProfile(
Profile::FromBrowserContext(controller->browser_context())))
return;
diff --git a/chrome/browser/extensions/extension_navigation_observer.h b/chrome/browser/extensions/extension_navigation_observer.h
index 385e4a4..0bf09ef 100644
--- a/chrome/browser/extensions/extension_navigation_observer.h
+++ b/chrome/browser/extensions/extension_navigation_observer.h
@@ -11,7 +11,7 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/extensions/extension_install_ui.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
class Profile;
class NavigationController;
@@ -21,15 +21,15 @@ class NavigationController;
// increase, it prompts the user to accept the new permissions and re-enables
// the extension.
class ExtensionNavigationObserver : public ExtensionInstallUI::Delegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit ExtensionNavigationObserver(Profile* profile);
virtual ~ExtensionNavigationObserver();
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
// Registers for the NOTIFICATION_NAV_ENTRY_COMMITTED notification.
void RegisterForNotifications();
@@ -43,7 +43,7 @@ class ExtensionNavigationObserver : public ExtensionInstallUI::Delegate,
virtual void InstallUIProceed() OVERRIDE;
virtual void InstallUIAbort(bool user_initiated) OVERRIDE;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
Profile* profile_;
diff --git a/chrome/browser/extensions/extension_omnibox_api.cc b/chrome/browser/extensions/extension_omnibox_api.cc
index 21a7227..e51939e 100644
--- a/chrome/browser/extensions/extension_omnibox_api.cc
+++ b/chrome/browser/extensions/extension_omnibox_api.cc
@@ -101,7 +101,7 @@ void ExtensionOmniboxEventRouter::OnInputEntered(
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_OMNIBOX_INPUT_ENTERED,
- Source<Profile>(profile), NotificationService::NoDetails());
+ content::Source<Profile>(profile), NotificationService::NoDetails());
}
// static
@@ -142,8 +142,8 @@ bool OmniboxSendSuggestionsFunction::RunImpl() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_OMNIBOX_SUGGESTIONS_READY,
- Source<Profile>(profile_),
- Details<ExtensionOmniboxSuggestions>(&suggestions));
+ content::Source<Profile>(profile_),
+ content::Details<ExtensionOmniboxSuggestions>(&suggestions));
return true;
}
@@ -173,7 +173,7 @@ bool OmniboxSetDefaultSuggestionFunction::RunImpl() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_OMNIBOX_DEFAULT_SUGGESTION_CHANGED,
- Source<Profile>(profile_),
+ content::Source<Profile>(profile_),
NotificationService::NoDetails());
return true;
diff --git a/chrome/browser/extensions/extension_omnibox_apitest.cc b/chrome/browser/extensions/extension_omnibox_apitest.cc
index fe39db4..ed74ae1 100644
--- a/chrome/browser/extensions/extension_omnibox_apitest.cc
+++ b/chrome/browser/extensions/extension_omnibox_apitest.cc
@@ -79,7 +79,7 @@ class OmniboxApiTest : public ExtensionApiTest {
while (!controller->done()) {
ui_test_utils::WindowedNotificationObserver ready_observer(
chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY,
- Source<AutocompleteController>(controller));
+ content::Source<AutocompleteController>(controller));
ready_observer.Wait();
}
}
diff --git a/chrome/browser/extensions/extension_permissions_api.cc b/chrome/browser/extensions/extension_permissions_api.cc
index 6cfb43a..2c652ad 100644
--- a/chrome/browser/extensions/extension_permissions_api.cc
+++ b/chrome/browser/extensions/extension_permissions_api.cc
@@ -214,8 +214,8 @@ void ExtensionPermissionsManager::NotifyPermissionsUpdated(
extension, changed, reason);
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PERMISSIONS_UPDATED,
- Source<Profile>(extension_service_->profile()),
- Details<UpdatedExtensionPermissionsInfo>(&info));
+ content::Source<Profile>(extension_service_->profile()),
+ content::Details<UpdatedExtensionPermissionsInfo>(&info));
// Send the new permissions to the renderers.
for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
diff --git a/chrome/browser/extensions/extension_preference_api.cc b/chrome/browser/extensions/extension_preference_api.cc
index 90adc09..8d9291a 100644
--- a/chrome/browser/extensions/extension_preference_api.cc
+++ b/chrome/browser/extensions/extension_preference_api.cc
@@ -267,12 +267,12 @@ ExtensionPreferenceEventRouter::~ExtensionPreferenceEventRouter() { }
void ExtensionPreferenceEventRouter::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED) {
const std::string* pref_key =
- Details<const std::string>(details).ptr();
- OnPrefChanged(Source<PrefService>(source).ptr(), *pref_key);
+ content::Details<const std::string>(details).ptr();
+ OnPrefChanged(content::Source<PrefService>(source).ptr(), *pref_key);
} else {
NOTREACHED();
}
diff --git a/chrome/browser/extensions/extension_preference_api.h b/chrome/browser/extensions/extension_preference_api.h
index 563fcc9..e39239f 100644
--- a/chrome/browser/extensions/extension_preference_api.h
+++ b/chrome/browser/extensions/extension_preference_api.h
@@ -10,22 +10,22 @@
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
namespace base {
class Value;
}
-class ExtensionPreferenceEventRouter : public NotificationObserver {
+class ExtensionPreferenceEventRouter : public content::NotificationObserver {
public:
explicit ExtensionPreferenceEventRouter(Profile* profile);
virtual ~ExtensionPreferenceEventRouter();
private:
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
void OnPrefChanged(PrefService* pref_service, const std::string& pref_key);
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index 00997a4..3c4ee0b 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -1126,8 +1126,8 @@ void ExtensionPrefs::SetBrowserActionVisibility(const Extension* extension,
Value::CreateBooleanValue(visible));
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED,
- Source<ExtensionPrefs>(this),
- Details<const Extension>(extension));
+ content::Source<ExtensionPrefs>(this),
+ content::Details<const Extension>(extension));
}
std::string ExtensionPrefs::GetVersionString(const std::string& extension_id) {
@@ -1460,7 +1460,7 @@ void ExtensionPrefs::SetAppLauncherOrder(
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_LAUNCHER_REORDERED,
- Source<ExtensionPrefs>(this),
+ content::Source<ExtensionPrefs>(this),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/extensions/extension_prefs_unittest.cc b/chrome/browser/extensions/extension_prefs_unittest.cc
index 3e2c63d..8b484e2 100644
--- a/chrome/browser/extensions/extension_prefs_unittest.cc
+++ b/chrome/browser/extensions/extension_prefs_unittest.cc
@@ -16,9 +16,9 @@
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_permission_set.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_observer_mock.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
+#include "content/test/notification_observer_mock.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::Time;
@@ -1041,12 +1041,12 @@ class ExtensionPrefsNotifyWhenNeeded
using testing::Mock;
using testing::StrEq;
- NotificationObserverMock observer;
+ content::NotificationObserverMock observer;
PrefChangeRegistrar registrar;
registrar.Init(prefs()->pref_service());
registrar.Add(kPref1, &observer);
- NotificationObserverMock incognito_observer;
+ content::NotificationObserverMock incognito_observer;
scoped_ptr<PrefService> incog_prefs(prefs_.CreateIncognitoPrefService());
PrefChangeRegistrar incognito_registrar;
incognito_registrar.Init(incog_prefs.get());
diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc
index f33e4f3..d64656d 100644
--- a/chrome/browser/extensions/extension_process_manager.cc
+++ b/chrome/browser/extensions/extension_process_manager.cc
@@ -47,10 +47,10 @@ class IncognitoExtensionProcessManager : public ExtensionProcessManager {
virtual const Extension* GetExtensionForSiteInstance(int site_instance_id);
private:
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Returns the extension for an URL, which can either be a chrome-extension
// URL or a web app URL.
@@ -96,15 +96,15 @@ ExtensionProcessManager::ExtensionProcessManager(Profile* profile)
: browsing_instance_(new BrowsingInstance(profile)) {
Profile* original_profile = profile->GetOriginalProfile();
registrar_.Add(this, chrome::NOTIFICATION_EXTENSIONS_READY,
- Source<Profile>(original_profile));
+ content::Source<Profile>(original_profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(original_profile));
+ content::Source<Profile>(original_profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(original_profile));
+ content::Source<Profile>(original_profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
- Source<Profile>(profile));
+ content::Source<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,
@@ -376,21 +376,24 @@ bool ExtensionProcessManager::HasExtensionHost(ExtensionHost* host) const {
return all_hosts_.find(host) != all_hosts_.end();
}
-void ExtensionProcessManager::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ExtensionProcessManager::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSIONS_READY: {
CreateBackgroundHostsForProfileStartup(this,
- Source<Profile>(source).ptr()->GetExtensionService()->extensions());
+ content::Source<Profile>(source).ptr()->
+ GetExtensionService()->extensions());
break;
}
case chrome::NOTIFICATION_EXTENSION_LOADED: {
ExtensionService* service =
- Source<Profile>(source).ptr()->GetExtensionService();
+ content::Source<Profile>(source).ptr()->GetExtensionService();
if (service->is_ready()) {
- const Extension* extension = Details<const Extension>(details).ptr();
+ const Extension* extension =
+ content::Details<const Extension>(details).ptr();
::CreateBackgroundHostForExtensionLoad(this, extension);
}
break;
@@ -398,7 +401,7 @@ void ExtensionProcessManager::Observe(int type,
case chrome::NOTIFICATION_EXTENSION_UNLOADED: {
const Extension* extension =
- Details<UnloadedExtensionInfo>(details)->extension;
+ content::Details<UnloadedExtensionInfo>(details)->extension;
for (ExtensionHostSet::iterator iter = background_hosts_.begin();
iter != background_hosts_.end(); ++iter) {
ExtensionHost* host = *iter;
@@ -413,20 +416,20 @@ void ExtensionProcessManager::Observe(int type,
}
case chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED: {
- ExtensionHost* host = Details<ExtensionHost>(details).ptr();
+ ExtensionHost* host = content::Details<ExtensionHost>(details).ptr();
all_hosts_.erase(host);
background_hosts_.erase(host);
break;
}
case content::NOTIFICATION_SITE_INSTANCE_DELETED: {
- SiteInstance* site_instance = Source<SiteInstance>(source).ptr();
+ SiteInstance* site_instance = content::Source<SiteInstance>(source).ptr();
UnregisterExtensionSiteInstance(site_instance);
break;
}
case chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE: {
- ExtensionHost* host = Details<ExtensionHost>(details).ptr();
+ ExtensionHost* host = content::Details<ExtensionHost>(details).ptr();
if (host->extension_host_type() ==
chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE) {
delete host;
@@ -458,8 +461,8 @@ void ExtensionProcessManager::OnExtensionHostCreated(ExtensionHost* host,
background_hosts_.insert(host);
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_HOST_CREATED,
- Source<ExtensionProcessManager>(this),
- Details<ExtensionHost>(host));
+ content::Source<ExtensionProcessManager>(this),
+ content::Details<ExtensionHost>(host));
}
void ExtensionProcessManager::CloseBackgroundHosts() {
@@ -570,8 +573,8 @@ bool IncognitoExtensionProcessManager::IsIncognitoEnabled(
void IncognitoExtensionProcessManager::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_BROWSER_WINDOW_READY: {
if (CommandLine::ForCurrentProcess()->HasSwitch(
@@ -580,7 +583,7 @@ void IncognitoExtensionProcessManager::Observe(
// We want to spawn our background hosts as soon as the user opens an
// incognito window. Watch for new browsers and create the hosts if
// it matches our profile.
- Browser* browser = Source<Browser>(source).ptr();
+ Browser* browser = content::Source<Browser>(source).ptr();
if (browser->profile() == browsing_instance_->browser_context()) {
// On Chrome OS, a login screen is implemented as a browser.
// This browser has no extension service. In this case,
diff --git a/chrome/browser/extensions/extension_process_manager.h b/chrome/browser/extensions/extension_process_manager.h
index 7ca82de..685e761 100644
--- a/chrome/browser/extensions/extension_process_manager.h
+++ b/chrome/browser/extensions/extension_process_manager.h
@@ -12,9 +12,9 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
#include "content/public/common/view_types.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class Browser;
class BrowsingInstance;
@@ -28,7 +28,7 @@ class SiteInstance;
// Manages dynamic state of running Chromium extensions. There is one instance
// of this class per Profile. OTR Profiles have a separate instance that keeps
// track of split-mode extensions only.
-class ExtensionProcessManager : public NotificationObserver {
+class ExtensionProcessManager : public content::NotificationObserver {
public:
static ExtensionProcessManager* Create(Profile* profile);
virtual ~ExtensionProcessManager();
@@ -114,12 +114,12 @@ class ExtensionProcessManager : public NotificationObserver {
// Called on browser shutdown to close our extension hosts.
void CloseBackgroundHosts();
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The set of all ExtensionHosts managed by this process manager.
ExtensionHostSet all_hosts_;
diff --git a/chrome/browser/extensions/extension_processes_api.h b/chrome/browser/extensions/extension_processes_api.h
index fe0a2f9..712a222 100644
--- a/chrome/browser/extensions/extension_processes_api.h
+++ b/chrome/browser/extensions/extension_processes_api.h
@@ -11,7 +11,7 @@
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/task_manager/task_manager.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
// Observes the Task Manager and routes the notifications as events to the
// extension system.
@@ -46,7 +46,7 @@ class ExtensionProcessesEventRouter : public TaskManagerModelObserver {
const std::string& json_args);
// Used for tracking registrations to process related notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Registered profiles.
typedef std::set<Profile*> ProfileSet;
diff --git a/chrome/browser/extensions/extension_save_page_api.cc b/chrome/browser/extensions/extension_save_page_api.cc
index a6454ab..39f226b 100644
--- a/chrome/browser/extensions/extension_save_page_api.cc
+++ b/chrome/browser/extensions/extension_save_page_api.cc
@@ -66,21 +66,24 @@ void SavePageAsMHTMLFunction::TemporaryFileCreated(bool success) {
}
TabContents* tab_contents = tab_contents_wrapper->tab_contents();
- registrar_.Add(this, content::NOTIFICATION_MHTML_GENERATED,
- Source<RenderViewHost>(tab_contents->render_view_host()));
+ registrar_.Add(
+ this, content::NOTIFICATION_MHTML_GENERATED,
+ content::Source<RenderViewHost>(tab_contents->render_view_host()));
// TODO(jcivelli): we should listen for navigation in the tab, tab closed,
// renderer died.
g_browser_process->mhtml_generation_manager()->GenerateMHTML(
tab_contents, mhtml_path_);
}
-void SavePageAsMHTMLFunction::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void SavePageAsMHTMLFunction::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == content::NOTIFICATION_MHTML_GENERATED);
const MHTMLGenerationManager::NotificationDetails* save_details =
- Details<MHTMLGenerationManager::NotificationDetails>(details).ptr();
+ content::Details<MHTMLGenerationManager::NotificationDetails>(details).
+ ptr();
if (mhtml_path_ != save_details->file_path) {
// This could happen if there are concurrent MHTML generations going on for
diff --git a/chrome/browser/extensions/extension_save_page_api.h b/chrome/browser/extensions/extension_save_page_api.h
index 9de3f1b..4afdf62 100644
--- a/chrome/browser/extensions/extension_save_page_api.h
+++ b/chrome/browser/extensions/extension_save_page_api.h
@@ -9,11 +9,11 @@
#include "chrome/browser/extensions/extension_function.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class SavePageAsMHTMLFunction : public AsyncExtensionFunction,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
SavePageAsMHTMLFunction();
@@ -22,8 +22,8 @@ class SavePageAsMHTMLFunction : public AsyncExtensionFunction,
virtual bool RunImpl() OVERRIDE;
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Called on the file thread.
void CreateTemporaryFile();
@@ -38,7 +38,7 @@ class SavePageAsMHTMLFunction : public AsyncExtensionFunction,
// The path to the temporary file containing the MHTML data.
FilePath mhtml_path_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DECLARE_EXTENSION_FUNCTION_NAME("experimental.savePage.saveAsMHTML")
};
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 4a2f5f4..e7bc4db 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -704,7 +704,7 @@ ExtensionService::~ExtensionService() {
void ExtensionService::InitEventRoutersAfterImport() {
registrar_.Add(this, chrome::NOTIFICATION_IMPORT_FINISHED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
void ExtensionService::InitEventRouters() {
@@ -893,8 +893,8 @@ bool ExtensionService::UninstallExtension(
!external_uninstall) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UNINSTALL_NOT_ALLOWED,
- Source<Profile>(profile_),
- Details<const Extension>(extension));
+ content::Source<Profile>(profile_),
+ content::Details<const Extension>(extension));
if (error != NULL) {
*error = errors::kCannotUninstallManagedExtension;
}
@@ -961,8 +961,8 @@ bool ExtensionService::UninstallExtension(
// Notify interested parties that we've uninstalled this extension.
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
- Source<Profile>(profile_),
- Details<const std::string>(&extension_id));
+ content::Source<Profile>(profile_),
+ content::Details<const std::string>(&extension_id));
if (sync_bundle && sync_bundle->HasExtensionId(extension_id)) {
sync_bundle->sync_processor->ProcessSyncChanges(
@@ -1475,8 +1475,8 @@ void ExtensionService::NotifyExtensionLoaded(const Extension* extension) {
// extension.
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(profile_),
- Details<const Extension>(extension));
+ content::Source<Profile>(profile_),
+ content::Details<const Extension>(extension));
// Tell renderers about the new extension.
for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
@@ -1589,8 +1589,8 @@ void ExtensionService::NotifyExtensionUnloaded(
UnloadedExtensionInfo details(extension, reason);
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(profile_),
- Details<UnloadedExtensionInfo>(&details));
+ content::Source<Profile>(profile_),
+ content::Details<UnloadedExtensionInfo>(&details));
for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
@@ -2276,8 +2276,8 @@ void ExtensionService::UnloadExtension(
disabled_extensions_.erase(iter);
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(profile_),
- Details<UnloadedExtensionInfo>(&details));
+ content::Source<Profile>(profile_),
+ content::Details<UnloadedExtensionInfo>(&details));
// Make sure the profile cleans up its RequestContexts when an already
// disabled extension is unloaded (since they are also tracking the disabled
// extensions).
@@ -2348,7 +2348,7 @@ void ExtensionService::OnLoadedInstalledExtensions() {
ready_ = true;
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSIONS_READY,
- Source<Profile>(profile_),
+ content::Source<Profile>(profile_),
NotificationService::NoDetails());
}
@@ -2389,8 +2389,8 @@ void ExtensionService::AddExtension(const Extension* extension) {
// disabled.
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
- Source<Profile>(profile_),
- Details<const Extension>(extension));
+ content::Source<Profile>(profile_),
+ content::Details<const Extension>(extension));
SyncExtensionChangeIfNeeded(*extension);
return;
}
@@ -2557,8 +2557,8 @@ void ExtensionService::OnExtensionInstalled(
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_INSTALL_NOT_ALLOWED,
- Source<Profile>(profile_),
- Details<const Extension>(extension));
+ content::Source<Profile>(profile_),
+ content::Details<const Extension>(extension));
// Delete the extension directory since we're not going to
// load it.
@@ -2608,8 +2608,8 @@ void ExtensionService::OnExtensionInstalled(
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_INSTALLED,
- Source<Profile>(profile_),
- Details<const Extension>(extension));
+ content::Source<Profile>(profile_),
+ content::Details<const Extension>(extension));
// Transfer ownership of |extension| to AddExtension.
AddExtension(scoped_extension);
@@ -2782,8 +2782,8 @@ void ExtensionService::ReportExtensionLoadError(
bool be_noisy) {
NotificationService* service = NotificationService::current();
service->Notify(chrome::NOTIFICATION_EXTENSION_LOAD_ERROR,
- Source<Profile>(profile_),
- Details<const std::string>(&error));
+ content::Source<Profile>(profile_),
+ content::Details<const std::string>(&error));
std::string path_str = UTF16ToUTF8(extension_path.LossyDisplayName());
std::string message = base::StringPrintf(
@@ -2805,14 +2805,16 @@ void ExtensionService::DidCreateRenderViewForBackgroundPage(
}
void ExtensionService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED: {
- if (profile_ != Source<Profile>(source).ptr()->GetOriginalProfile())
+ if (profile_ !=
+ content::Source<Profile>(source).ptr()->GetOriginalProfile()) {
break;
+ }
- ExtensionHost* host = Details<ExtensionHost>(details).ptr();
+ ExtensionHost* host = content::Details<ExtensionHost>(details).ptr();
// Mark the extension as terminated and Unload it. We want it to
// be in a consistent state: either fully working or not loaded
@@ -2828,7 +2830,8 @@ void ExtensionService::Observe(int type,
break;
}
case content::NOTIFICATION_RENDERER_PROCESS_CREATED: {
- RenderProcessHost* process = Source<RenderProcessHost>(source).ptr();
+ RenderProcessHost* process =
+ content::Source<RenderProcessHost>(source).ptr();
Profile* host_profile =
Profile::FromBrowserContext(process->browser_context());
if (!profile_->IsSameProfile(host_profile->GetOriginalProfile()))
@@ -2852,7 +2855,8 @@ void ExtensionService::Observe(int type,
break;
}
case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED: {
- RenderProcessHost* process = Source<RenderProcessHost>(source).ptr();
+ RenderProcessHost* process =
+ content::Source<RenderProcessHost>(source).ptr();
Profile* host_profile =
Profile::FromBrowserContext(process->browser_context());
if (!profile_->IsSameProfile(host_profile->GetOriginalProfile()))
@@ -2862,7 +2866,7 @@ void ExtensionService::Observe(int type,
break;
}
case chrome::NOTIFICATION_PREF_CHANGED: {
- std::string* pref_name = Details<std::string>(details).ptr();
+ std::string* pref_name = content::Details<std::string>(details).ptr();
if (*pref_name == prefs::kExtensionInstallAllowList ||
*pref_name == prefs::kExtensionInstallDenyList) {
CheckAdminBlacklist();
@@ -2873,7 +2877,7 @@ void ExtensionService::Observe(int type,
}
case chrome::NOTIFICATION_IMPORT_FINISHED: {
registrar_.Remove(this, chrome::NOTIFICATION_IMPORT_FINISHED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
InitEventRouters();
break;
}
@@ -2913,7 +2917,7 @@ void ExtensionService::SetBackgroundPageReady(const Extension* extension) {
extension_runtime_data_[extension->id()].background_page_ready = true;
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY,
- Source<const Extension>(extension),
+ content::Source<const Extension>(extension),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h
index b99831c..cd16db9 100644
--- a/chrome/browser/extensions/extension_service.h
+++ b/chrome/browser/extensions/extension_service.h
@@ -41,9 +41,9 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
#include "content/common/property_bag.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class AppNotificationManager;
class CrxInstaller;
@@ -117,7 +117,7 @@ class ExtensionServiceInterface : public SyncableService {
class ExtensionService
: public ExtensionServiceInterface,
public ExternalExtensionProviderInterface::VisitorInterface,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// Information about a registered component extension.
struct ComponentExtensionInfo {
@@ -533,10 +533,10 @@ class ExtensionService
// Displays the extension alert in the last-active browser window.
void ShowExtensionAlert(ExtensionGlobalError* global_error);
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Whether there are any apps installed. Component apps are not included.
bool HasApps() const;
@@ -762,7 +762,7 @@ class ExtensionService
typedef std::map<std::string, int> OrphanedDevTools;
OrphanedDevTools orphaned_dev_tools_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
PrefChangeRegistrar pref_change_registrar_;
// Keeps track of menu items added by extensions.
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index ff89e5e2..127737f 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -58,7 +58,7 @@
#include "content/browser/file_system/browser_file_system_helper.h"
#include "content/browser/in_process_webkit/dom_storage_context.h"
#include "content/browser/in_process_webkit/webkit_context.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "googleurl/src/gurl.h"
#include "net/base/cookie_monster.h"
@@ -481,7 +481,7 @@ void ExtensionServiceTestBase::SetUp() {
}
class ExtensionServiceTest
- : public ExtensionServiceTestBase, public NotificationObserver {
+ : public ExtensionServiceTestBase, public content::NotificationObserver {
public:
ExtensionServiceTest() : installed_(NULL) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
@@ -493,11 +493,12 @@ class ExtensionServiceTest
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_LOADED: {
- const Extension* extension = Details<const Extension>(details).ptr();
+ const Extension* extension =
+ content::Details<const Extension>(details).ptr();
loaded_.push_back(make_scoped_refptr(extension));
// The tests rely on the errors being in a certain order, which can vary
// depending on how filesystem iteration works.
@@ -507,7 +508,7 @@ class ExtensionServiceTest
case chrome::NOTIFICATION_EXTENSION_UNLOADED: {
const Extension* e =
- Details<UnloadedExtensionInfo>(details)->extension;
+ content::Details<UnloadedExtensionInfo>(details)->extension;
unloaded_id_ = e->id();
ExtensionList::iterator i =
std::find(loaded_.begin(), loaded_.end(), e);
@@ -519,7 +520,7 @@ class ExtensionServiceTest
break;
}
case chrome::NOTIFICATION_EXTENSION_INSTALLED:
- installed_ = Details<const Extension>(details).ptr();
+ installed_ = content::Details<const Extension>(details).ptr();
break;
default:
@@ -911,7 +912,7 @@ class ExtensionServiceTest
const Extension* installed_;
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
FilePath NormalizeSeparators(const FilePath& path) {
@@ -3462,7 +3463,7 @@ TEST_F(ExtensionServiceTest, LoadAndRelocalizeExtensions) {
EXPECT_EQ("no l10n", loaded_[2]->name());
}
-class ExtensionsReadyRecorder : public NotificationObserver {
+class ExtensionsReadyRecorder : public content::NotificationObserver {
public:
ExtensionsReadyRecorder() : ready_(false) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSIONS_READY,
@@ -3474,8 +3475,8 @@ class ExtensionsReadyRecorder : public NotificationObserver {
private:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSIONS_READY:
ready_ = true;
@@ -3485,7 +3486,7 @@ class ExtensionsReadyRecorder : public NotificationObserver {
}
}
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
bool ready_;
};
diff --git a/chrome/browser/extensions/extension_settings_frontend_unittest.cc b/chrome/browser/extensions/extension_settings_frontend_unittest.cc
index 06d774d..2e3f1ab 100644
--- a/chrome/browser/extensions/extension_settings_frontend_unittest.cc
+++ b/chrome/browser/extensions/extension_settings_frontend_unittest.cc
@@ -15,8 +15,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/testing_profile.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
-#include "content/common/notification_details.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 ab11330..147c313 100644
--- a/chrome/browser/extensions/extension_startup_browsertest.cc
+++ b/chrome/browser/extensions/extension_startup_browsertest.cc
@@ -18,7 +18,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_details.h"
+#include "content/public/browser/notification_details.h"
#include "net/base/net_util.h"
// This file contains high-level startup tests for the extensions system. We've
diff --git a/chrome/browser/extensions/extension_tab_helper.cc b/chrome/browser/extensions/extension_tab_helper.cc
index b4a7735..ad8c933 100644
--- a/chrome/browser/extensions/extension_tab_helper.cc
+++ b/chrome/browser/extensions/extension_tab_helper.cc
@@ -57,7 +57,7 @@ void ExtensionTabHelper::SetExtensionApp(const Extension* extension) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED,
- Source<ExtensionTabHelper>(this),
+ content::Source<ExtensionTabHelper>(this),
NotificationService::NoDetails());
}
@@ -105,7 +105,7 @@ void ExtensionTabHelper::DidNavigateMainFramePostCommit(
wrapper_->restore_tab_helper()->session_id().id());
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
- Source<ExtensionAction>(browser_action),
+ content::Source<ExtensionAction>(browser_action),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/extensions/extension_tab_id_map.cc b/chrome/browser/extensions/extension_tab_id_map.cc
index c3f638f..3f8286d 100644
--- a/chrome/browser/extensions/extension_tab_id_map.cc
+++ b/chrome/browser/extensions/extension_tab_id_map.cc
@@ -12,8 +12,8 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_process_host.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_observer.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_types.h"
@@ -24,18 +24,18 @@
// This class listens for notifications about new and closed tabs on the UI
// thread, and notifies the ExtensionTabIdMap on the IO thread. It should only
// ever be accessed on the UI thread.
-class ExtensionTabIdMap::TabObserver : public NotificationObserver {
+class ExtensionTabIdMap::TabObserver : public content::NotificationObserver {
public:
TabObserver();
~TabObserver();
private:
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
ExtensionTabIdMap::TabObserver::TabObserver() {
@@ -53,16 +53,16 @@ ExtensionTabIdMap::TabObserver::~TabObserver() {
}
void ExtensionTabIdMap::TabObserver::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB: {
- TabContents* contents = Source<TabContents>(source).ptr();
+ TabContents* contents = content::Source<TabContents>(source).ptr();
TabContentsWrapper* tab =
TabContentsWrapper::GetCurrentWrapperForContents(contents);
if (!tab)
break;
- RenderViewHost* host = Details<RenderViewHost>(details).ptr();
+ RenderViewHost* host = content::Details<RenderViewHost>(details).ptr();
// TODO(mpcmoplete): How can we tell if window_id is bogus? It may not
// have been set yet.
BrowserThread::PostTask(
@@ -76,7 +76,8 @@ void ExtensionTabIdMap::TabObserver::Observe(
break;
}
case content::NOTIFICATION_TAB_PARENTED: {
- TabContentsWrapper* tab = Source<TabContentsWrapper>(source).ptr();
+ TabContentsWrapper* tab =
+ content::Source<TabContentsWrapper>(source).ptr();
RenderViewHost* host = tab->render_view_host();
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
@@ -89,7 +90,7 @@ void ExtensionTabIdMap::TabObserver::Observe(
break;
}
case content::NOTIFICATION_RENDER_VIEW_HOST_DELETED: {
- RenderViewHost* host = Source<RenderViewHost>(source).ptr();
+ RenderViewHost* host = content::Source<RenderViewHost>(source).ptr();
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index f5a07bf..7cc8f14 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -1364,7 +1364,7 @@ bool CaptureVisibleTabFunction::RunImpl() {
wrapper->CaptureSnapshot();
registrar_.Add(this,
chrome::NOTIFICATION_TAB_SNAPSHOT_TAKEN,
- Source<TabContentsWrapper>(wrapper));
+ content::Source<TabContentsWrapper>(wrapper));
AddRef(); // Balanced in CaptureVisibleTabFunction::Observe().
return true;
@@ -1392,12 +1392,14 @@ bool CaptureVisibleTabFunction::CaptureSnapshotFromBackingStore(
// If a backing store was not available in CaptureVisibleTabFunction::RunImpl,
// than the renderer was asked for a snapshot. Listen for a notification
// that the snapshot is available.
-void CaptureVisibleTabFunction::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void CaptureVisibleTabFunction::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_TAB_SNAPSHOT_TAKEN);
- const SkBitmap *screen_capture = Details<const SkBitmap>(details).ptr();
+ const SkBitmap *screen_capture =
+ content::Details<const SkBitmap>(details).ptr();
const bool error = screen_capture->empty();
if (error) {
@@ -1503,20 +1505,23 @@ bool DetectTabLanguageFunction::RunImpl() {
// The tab contents does not know its language yet. Let's wait until it
// receives it, or until the tab is closed/navigates to some other page.
registrar_.Add(this, chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED,
- Source<TabContents>(contents->tab_contents()));
- registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING,
- Source<NavigationController>(&(contents->controller())));
- registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(&(contents->controller())));
+ content::Source<TabContents>(contents->tab_contents()));
+ registrar_.Add(
+ this, content::NOTIFICATION_TAB_CLOSING,
+ content::Source<NavigationController>(&(contents->controller())));
+ registrar_.Add(
+ this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
+ content::Source<NavigationController>(&(contents->controller())));
return true;
}
-void DetectTabLanguageFunction::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void DetectTabLanguageFunction::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
std::string language;
if (type == chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED)
- language = *Details<std::string>(details).ptr();
+ language = *content::Details<std::string>(details).ptr();
registrar_.RemoveAll();
diff --git a/chrome/browser/extensions/extension_tabs_module.h b/chrome/browser/extensions/extension_tabs_module.h
index 31ab2b5..6d26e6b 100644
--- a/chrome/browser/extensions/extension_tabs_module.h
+++ b/chrome/browser/extensions/extension_tabs_module.h
@@ -11,8 +11,8 @@
#include "base/compiler_specific.h"
#include "chrome/browser/extensions/extension_function.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class BackingStore;
class SkBitmap;
@@ -119,20 +119,20 @@ class RemoveTabsFunction : public SyncExtensionFunction {
DECLARE_EXTENSION_FUNCTION_NAME("tabs.remove")
};
class DetectTabLanguageFunction : public AsyncExtensionFunction,
- public NotificationObserver {
+ public content::NotificationObserver {
private:
virtual ~DetectTabLanguageFunction() {}
virtual bool RunImpl() OVERRIDE;
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
void GotLanguage(const std::string& language);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DECLARE_EXTENSION_FUNCTION_NAME("tabs.detectLanguage")
};
class CaptureVisibleTabFunction : public AsyncExtensionFunction,
- public NotificationObserver {
+ public content::NotificationObserver {
private:
enum ImageFormat {
FORMAT_JPEG,
@@ -146,11 +146,11 @@ class CaptureVisibleTabFunction : public AsyncExtensionFunction,
virtual bool RunImpl() OVERRIDE;
virtual bool CaptureSnapshotFromBackingStore(BackingStore* backing_store);
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
virtual void SendResultFromBitmap(const SkBitmap& screen_capture);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The format (JPEG vs PNG) of the resulting image. Set in RunImpl().
ImageFormat image_format_;
diff --git a/chrome/browser/extensions/extension_test_api.cc b/chrome/browser/extensions/extension_test_api.cc
index 693d111..a78707a 100644
--- a/chrome/browser/extensions/extension_test_api.cc
+++ b/chrome/browser/extensions/extension_test_api.cc
@@ -30,7 +30,7 @@ ExtensionTestPassFunction::~ExtensionTestPassFunction() {}
bool ExtensionTestPassFunction::RunImpl() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_TEST_PASSED,
- Source<Profile>(dispatcher()->profile()),
+ content::Source<Profile>(dispatcher()->profile()),
NotificationService::NoDetails());
return true;
}
@@ -42,8 +42,8 @@ bool ExtensionTestFailFunction::RunImpl() {
EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &message));
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_TEST_FAILED,
- Source<Profile>(dispatcher()->profile()),
- Details<std::string>(&message));
+ content::Source<Profile>(dispatcher()->profile()),
+ content::Details<std::string>(&message));
return true;
}
@@ -82,8 +82,8 @@ bool ExtensionTestSendMessageFunction::RunImpl() {
AddRef(); // balanced in Reply
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_TEST_MESSAGE,
- Source<ExtensionTestSendMessageFunction>(this),
- Details<std::string>(&message));
+ content::Source<ExtensionTestSendMessageFunction>(this),
+ content::Details<std::string>(&message));
return true;
}
ExtensionTestSendMessageFunction::~ExtensionTestSendMessageFunction() {}
diff --git a/chrome/browser/extensions/extension_test_message_listener.cc b/chrome/browser/extensions/extension_test_message_listener.cc
index dcb2f55..42df2b0 100644
--- a/chrome/browser/extensions/extension_test_message_listener.cc
+++ b/chrome/browser/extensions/extension_test_message_listener.cc
@@ -40,11 +40,11 @@ void ExtensionTestMessageListener::Reply(const std::string& message) {
void ExtensionTestMessageListener::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
- const std::string& content = *Details<std::string>(details).ptr();
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ const std::string& content = *content::Details<std::string>(details).ptr();
if (!satisfied_ && content == expected_message_) {
- function_ = Source<ExtensionTestSendMessageFunction>(source).ptr();
+ function_ = content::Source<ExtensionTestSendMessageFunction>(source).ptr();
satisfied_ = true;
registrar_.RemoveAll(); // Stop listening for more messages.
if (!will_reply_) {
diff --git a/chrome/browser/extensions/extension_test_message_listener.h b/chrome/browser/extensions/extension_test_message_listener.h
index 7878e7474..297105b 100644
--- a/chrome/browser/extensions/extension_test_message_listener.h
+++ b/chrome/browser/extensions/extension_test_message_listener.h
@@ -9,8 +9,8 @@
#include <string>
#include "base/compiler_specific.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class ExtensionTestSendMessageFunction;
@@ -43,7 +43,7 @@ class ExtensionTestSendMessageFunction;
// either make it a local variable inside your test body, or if it's a member
// variable of a ExtensionBrowserTest subclass, override the
// InProcessBrowserTest::CleanUpOnMainThread() method and clean it up there.
-class ExtensionTestMessageListener : public NotificationObserver {
+class ExtensionTestMessageListener : public content::NotificationObserver {
public:
// We immediately start listening for |expected_message|.
ExtensionTestMessageListener(const std::string& expected_message,
@@ -59,15 +59,15 @@ class ExtensionTestMessageListener : public NotificationObserver {
// WaitUntilSatisfied has returned true, and if will_reply is true.
void Reply(const std::string& message);
- // Implements the NotificationObserver interface.
+ // Implements the content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
bool was_satisfied() const { return satisfied_; }
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The message we're expecting.
std::string expected_message_;
diff --git a/chrome/browser/extensions/extension_toolbar_model.cc b/chrome/browser/extensions/extension_toolbar_model.cc
index b21b63c..ef2d276 100644
--- a/chrome/browser/extensions/extension_toolbar_model.cc
+++ b/chrome/browser/extensions/extension_toolbar_model.cc
@@ -20,14 +20,14 @@ ExtensionToolbarModel::ExtensionToolbarModel(ExtensionService* service)
DCHECK(service_);
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(service_->profile()));
+ content::Source<Profile>(service_->profile()));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(service_->profile()));
+ content::Source<Profile>(service_->profile()));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSIONS_READY,
- Source<Profile>(service_->profile()));
+ content::Source<Profile>(service_->profile()));
registrar_.Add(
this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED,
- Source<ExtensionPrefs>(service_->extension_prefs()));
+ content::Source<ExtensionPrefs>(service_->extension_prefs()));
visible_icon_count_ = prefs_->GetInteger(prefs::kExtensionToolbarSize);
}
@@ -80,9 +80,10 @@ void ExtensionToolbarModel::SetVisibleIconCount(int count) {
prefs_->ScheduleSavePersistentPrefs();
}
-void ExtensionToolbarModel::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ExtensionToolbarModel::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_EXTENSIONS_READY) {
InitializeExtensionList();
return;
@@ -93,9 +94,9 @@ void ExtensionToolbarModel::Observe(int type,
const Extension* extension = NULL;
if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) {
- extension = Details<UnloadedExtensionInfo>(details)->extension;
+ extension = content::Details<UnloadedExtensionInfo>(details)->extension;
} else {
- extension = Details<const Extension>(details).ptr();
+ extension = content::Details<const Extension>(details).ptr();
}
if (type == chrome::NOTIFICATION_EXTENSION_LOADED) {
// We don't want to add the same extension twice. It may have already been
diff --git a/chrome/browser/extensions/extension_toolbar_model.h b/chrome/browser/extensions/extension_toolbar_model.h
index 7c2a54b696..52be1bf 100644
--- a/chrome/browser/extensions/extension_toolbar_model.h
+++ b/chrome/browser/extensions/extension_toolbar_model.h
@@ -9,14 +9,14 @@
#include "base/compiler_specific.h"
#include "base/observer_list.h"
#include "chrome/common/extensions/extension.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class ExtensionService;
class PrefService;
// Model for the browser actions toolbar.
-class ExtensionToolbarModel : public NotificationObserver {
+class ExtensionToolbarModel : public content::NotificationObserver {
public:
explicit ExtensionToolbarModel(ExtensionService* service);
virtual ~ExtensionToolbarModel();
@@ -74,10 +74,10 @@ class ExtensionToolbarModel : public NotificationObserver {
int OriginalIndexToIncognito(int original_index);
private:
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// To be called after the extension service is ready; gets loaded extensions
// from the extension service and their saved order from the pref service
@@ -114,7 +114,7 @@ class ExtensionToolbarModel : public NotificationObserver {
// chevron).
int visible_icon_count_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_
diff --git a/chrome/browser/extensions/extension_updater.h b/chrome/browser/extensions/extension_updater.h
index e3a390d..f07d08d 100644
--- a/chrome/browser/extensions/extension_updater.h
+++ b/chrome/browser/extensions/extension_updater.h
@@ -166,7 +166,7 @@ class ManifestFetchesBuilder {
// ....
// updater->Stop();
class ExtensionUpdater : public URLFetcher::Delegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// Holds a pointer to the passed |service|, using it for querying installed
// extensions and installing updated ones. The |frequency_seconds| parameter
@@ -331,10 +331,10 @@ class ExtensionUpdater : public URLFetcher::Delegate,
// started.
bool MaybeInstallCRXFile();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Whether Start() has been called but not Stop().
bool alive_;
@@ -373,7 +373,7 @@ class ExtensionUpdater : public URLFetcher::Delegate,
std::set<std::string> in_progress_ids_;
// Observes CRX installs we initiate.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// True when a CrxInstaller is doing an install. Used in MaybeUpdateCrxFile()
// to keep more than one install from running at once.
diff --git a/chrome/browser/extensions/extension_warning_set.cc b/chrome/browser/extensions/extension_warning_set.cc
index c99f18a2..f84a5ca 100644
--- a/chrome/browser/extensions/extension_warning_set.cc
+++ b/chrome/browser/extensions/extension_warning_set.cc
@@ -128,7 +128,7 @@ void ExtensionWarningSet::SuppressBadgeForCurrentWarnings() {
void ExtensionWarningSet::NotifyWarningsChanged() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_WARNING_CHANGED,
- Source<Profile>(profile_),
+ content::Source<Profile>(profile_),
NotificationService::NoDetails());
}
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 b952511..5476f68 100644
--- a/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc
+++ b/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc
@@ -10,8 +10,8 @@
#include "chrome/browser/internal_auth.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
-#include "content/common/notification_details.h"
#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
#include "net/base/escape.h"
#if defined(OS_CHROMEOS)
@@ -26,8 +26,8 @@ WebSocketProxyPrivate::~WebSocketProxyPrivate() {
}
void WebSocketProxyPrivate::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
#if defined(OS_CHROMEOS)
DCHECK_EQ(chrome::NOTIFICATION_WEB_SOCKET_PROXY_STARTED, type);
#else
@@ -52,9 +52,9 @@ WebSocketProxyPrivateGetPassportForTCPFunction::
}
void WebSocketProxyPrivateGetURLForTCPFunction::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
- listening_port_ = *Details<int>(details).ptr();
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ listening_port_ = *content::Details<int>(details).ptr();
WebSocketProxyPrivate::Observe(type, source, details);
}
diff --git a/chrome/browser/extensions/extension_web_socket_proxy_private_api.h b/chrome/browser/extensions/extension_web_socket_proxy_private_api.h
index 7a75137..8f888cf 100644
--- a/chrome/browser/extensions/extension_web_socket_proxy_private_api.h
+++ b/chrome/browser/extensions/extension_web_socket_proxy_private_api.h
@@ -7,12 +7,12 @@
#pragma once
#include "base/timer.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
#include "chrome/browser/extensions/extension_function.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class WebSocketProxyPrivate
- : public AsyncExtensionFunction, public NotificationObserver {
+ : public AsyncExtensionFunction, public content::NotificationObserver {
public:
WebSocketProxyPrivate();
@@ -22,10 +22,10 @@ class WebSocketProxyPrivate
virtual void Finalize();
protected:
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Whether already finalized.
bool is_finalized_;
@@ -33,7 +33,7 @@ class WebSocketProxyPrivate
// Used to signal timeout (when waiting for proxy initial launch).
base::OneShotTimer<WebSocketProxyPrivate> timer_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Proxy listens incoming websocket connection on this port.
int listening_port_;
@@ -57,10 +57,10 @@ class WebSocketProxyPrivateGetURLForTCPFunction
// ExtensionFunction implementation.
virtual bool RunImpl() OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Finalizes async operation.
virtual void Finalize() OVERRIDE;
diff --git a/chrome/browser/extensions/extension_webnavigation_api.cc b/chrome/browser/extensions/extension_webnavigation_api.cc
index 52a80d3..0b453a7 100644
--- a/chrome/browser/extensions/extension_webnavigation_api.cc
+++ b/chrome/browser/extensions/extension_webnavigation_api.cc
@@ -364,7 +364,7 @@ void ExtensionWebNavigationEventRouter::Init() {
if (registrar_.IsEmpty()) {
registrar_.Add(this,
content::NOTIFICATION_RETARGETING,
- Source<content::BrowserContext>(profile_));
+ content::Source<content::BrowserContext>(profile_));
registrar_.Add(this,
content::NOTIFICATION_TAB_ADDED,
NotificationService::AllSources());
@@ -376,19 +376,20 @@ void ExtensionWebNavigationEventRouter::Init() {
void ExtensionWebNavigationEventRouter::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RETARGETING:
- Retargeting(Details<const content::RetargetingDetails>(details).ptr());
+ Retargeting(
+ content::Details<const content::RetargetingDetails>(details).ptr());
break;
case content::NOTIFICATION_TAB_ADDED:
- TabAdded(Details<TabContents>(details).ptr());
+ TabAdded(content::Details<TabContents>(details).ptr());
break;
case content::NOTIFICATION_TAB_CONTENTS_DESTROYED:
- TabDestroyed(Source<TabContents>(source).ptr());
+ TabDestroyed(content::Source<TabContents>(source).ptr());
break;
default:
diff --git a/chrome/browser/extensions/extension_webnavigation_api.h b/chrome/browser/extensions/extension_webnavigation_api.h
index 28bdcd6..1989fe0 100644
--- a/chrome/browser/extensions/extension_webnavigation_api.h
+++ b/chrome/browser/extensions/extension_webnavigation_api.h
@@ -17,8 +17,8 @@
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/profiles/profile.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
namespace content {
@@ -171,7 +171,7 @@ class ExtensionWebNavigationTabObserver : public TabContentsObserver {
// Observes navigation notifications and routes them as events to the extension
// system.
-class ExtensionWebNavigationEventRouter : public NotificationObserver {
+class ExtensionWebNavigationEventRouter : public content::NotificationObserver {
public:
explicit ExtensionWebNavigationEventRouter(Profile* profile);
virtual ~ExtensionWebNavigationEventRouter();
@@ -198,10 +198,10 @@ class ExtensionWebNavigationEventRouter : public NotificationObserver {
GURL target_url;
};
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Handler for the NOTIFICATION_RETARGETING event. The method takes the
// details of such an event and stores them for the later
@@ -221,7 +221,7 @@ class ExtensionWebNavigationEventRouter : public NotificationObserver {
std::map<TabContents*, PendingTabContents> pending_tab_contents_;
// Used for tracking registrations to navigation notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The profile that owns us via ExtensionService.
Profile* profile_;
diff --git a/chrome/browser/extensions/extension_webrequest_apitest.cc b/chrome/browser/extensions/extension_webrequest_apitest.cc
index c12f2da..c1c5d41 100644
--- a/chrome/browser/extensions/extension_webrequest_apitest.cc
+++ b/chrome/browser/extensions/extension_webrequest_apitest.cc
@@ -8,13 +8,13 @@
#include "chrome/browser/ui/login/login_prompt.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "net/base/mock_host_resolver.h"
namespace {
-class CancelLoginDialog : public NotificationObserver {
+class CancelLoginDialog : public content::NotificationObserver {
public:
CancelLoginDialog() {
registrar_.Add(this,
@@ -25,15 +25,15 @@ class CancelLoginDialog : public NotificationObserver {
virtual ~CancelLoginDialog() {}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
LoginHandler* handler =
- Details<LoginNotificationDetails>(details).ptr()->handler();
+ content::Details<LoginNotificationDetails>(details).ptr()->handler();
handler->CancelAuth();
}
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(CancelLoginDialog);
};
diff --git a/chrome/browser/extensions/extension_webstore_private_api.h b/chrome/browser/extensions/extension_webstore_private_api.h
index 1200603..8f6bff6 100644
--- a/chrome/browser/extensions/extension_webstore_private_api.h
+++ b/chrome/browser/extensions/extension_webstore_private_api.h
@@ -13,8 +13,8 @@
#include "chrome/browser/extensions/webstore_install_helper.h"
#include "chrome/browser/extensions/webstore_installer.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class ProfileSyncService;
diff --git a/chrome/browser/extensions/extension_webstore_private_apitest.cc b/chrome/browser/extensions/extension_webstore_private_apitest.cc
index 1190560..beaa097 100644
--- a/chrome/browser/extensions/extension_webstore_private_apitest.cc
+++ b/chrome/browser/extensions/extension_webstore_private_apitest.cc
@@ -14,8 +14,8 @@
#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_observer.h"
-#include "content/common/notification_registrar.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"
diff --git a/chrome/browser/extensions/external_policy_extension_loader.cc b/chrome/browser/extensions/external_policy_extension_loader.cc
index 69cc317..88872b9 100644
--- a/chrome/browser/extensions/external_policy_extension_loader.cc
+++ b/chrome/browser/extensions/external_policy_extension_loader.cc
@@ -42,7 +42,7 @@ ExternalPolicyExtensionLoader::ExternalPolicyExtensionLoader(
pref_change_registrar_.Add(prefs::kExtensionInstallForceList, this);
notification_registrar_.Add(this,
chrome::NOTIFICATION_PROFILE_DESTROYED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
void ExternalPolicyExtensionLoader::StartLoading() {
@@ -74,13 +74,13 @@ void ExternalPolicyExtensionLoader::StartLoading() {
void ExternalPolicyExtensionLoader::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (profile_ == NULL) return;
switch (type) {
case chrome::NOTIFICATION_PREF_CHANGED: {
- if (Source<PrefService>(source).ptr() == profile_->GetPrefs()) {
- std::string* pref_name = Details<std::string>(details).ptr();
+ if (content::Source<PrefService>(source).ptr() == profile_->GetPrefs()) {
+ std::string* pref_name = content::Details<std::string>(details).ptr();
if (*pref_name == prefs::kExtensionInstallForceList) {
StartLoading();
} else {
@@ -90,7 +90,7 @@ void ExternalPolicyExtensionLoader::Observe(
break;
}
case chrome::NOTIFICATION_PROFILE_DESTROYED: {
- if (Source<Profile>(source).ptr() == profile_) {
+ if (content::Source<Profile>(source).ptr() == profile_) {
notification_registrar_.RemoveAll();
pref_change_registrar_.RemoveAll();
profile_ = NULL;
diff --git a/chrome/browser/extensions/external_policy_extension_loader.h b/chrome/browser/extensions/external_policy_extension_loader.h
index ecfc7e4..c928d70 100644
--- a/chrome/browser/extensions/external_policy_extension_loader.h
+++ b/chrome/browser/extensions/external_policy_extension_loader.h
@@ -10,8 +10,8 @@
#include "base/compiler_specific.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class MockExternalPolicyExtensionProviderVisitor;
class Profile;
@@ -21,14 +21,14 @@ class Profile;
// registered.
class ExternalPolicyExtensionLoader
: public ExternalExtensionLoader,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit ExternalPolicyExtensionLoader(Profile* profile);
- // NotificationObserver implementation
+ // content::NotificationObserver implementation
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
protected:
virtual void StartLoading() OVERRIDE;
@@ -39,7 +39,7 @@ class ExternalPolicyExtensionLoader
virtual ~ExternalPolicyExtensionLoader() {}
PrefChangeRegistrar pref_change_registrar_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
Profile* profile_;
diff --git a/chrome/browser/extensions/image_loading_tracker.cc b/chrome/browser/extensions/image_loading_tracker.cc
index 213c630..92965b2 100644
--- a/chrome/browser/extensions/image_loading_tracker.cc
+++ b/chrome/browser/extensions/image_loading_tracker.cc
@@ -181,12 +181,12 @@ void ImageLoadingTracker::OnImageLoaded(
}
void ImageLoadingTracker::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_EXTENSION_UNLOADED);
const Extension* extension =
- Details<UnloadedExtensionInfo>(details)->extension;
+ content::Details<UnloadedExtensionInfo>(details)->extension;
// Remove all entries in the load_map_ referencing the extension. This ensures
// we don't attempt to cache the image when the load completes.
diff --git a/chrome/browser/extensions/image_loading_tracker.h b/chrome/browser/extensions/image_loading_tracker.h
index df6a3b0..acc2258 100644
--- a/chrome/browser/extensions/image_loading_tracker.h
+++ b/chrome/browser/extensions/image_loading_tracker.h
@@ -10,8 +10,8 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class Extension;
class ExtensionResource;
@@ -36,7 +36,7 @@ namespace gfx {
// Observer is notified immediately from the call to LoadImage. In other words,
// by the time LoadImage returns the observer has been notified.
//
-class ImageLoadingTracker : public NotificationObserver {
+class ImageLoadingTracker : public content::NotificationObserver {
public:
enum CacheParam {
CACHE,
@@ -85,11 +85,11 @@ class ImageLoadingTracker : public NotificationObserver {
void OnImageLoaded(SkBitmap* image, const ExtensionResource& resource,
const gfx::Size& original_size, int id);
- // NotificationObserver method. If an extension is uninstalled while we're
- // waiting for the image we remove the entry from load_map_.
+ // content::NotificationObserver method. If an extension is uninstalled while
+ // we're waiting for the image we remove the entry from load_map_.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// The view that is waiting for the image to load.
Observer* observer_;
@@ -105,7 +105,7 @@ class ImageLoadingTracker : public NotificationObserver {
// deleted while fetching the image the entry is removed from the map.
LoadMap load_map_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(ImageLoadingTracker);
};
diff --git a/chrome/browser/extensions/image_loading_tracker_unittest.cc b/chrome/browser/extensions/image_loading_tracker_unittest.cc
index 1f022f1..b848204 100644
--- a/chrome/browser/extensions/image_loading_tracker_unittest.cc
+++ b/chrome/browser/extensions/image_loading_tracker_unittest.cc
@@ -165,7 +165,7 @@ TEST_F(ImageLoadingTrackerTest, DeleteExtensionWhileWaitingForCache) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UNLOADED,
NotificationService::AllSources(),
- Details<UnloadedExtensionInfo>(&details));
+ content::Details<UnloadedExtensionInfo>(&details));
// Chuck the extension, that way if anyone tries to access it we should crash
// or get valgrind errors.
diff --git a/chrome/browser/extensions/isolated_app_browsertest.cc b/chrome/browser/extensions/isolated_app_browsertest.cc
index 3c6dd6a..541a0ce 100644
--- a/chrome/browser/extensions/isolated_app_browsertest.cc
+++ b/chrome/browser/extensions/isolated_app_browsertest.cc
@@ -117,7 +117,7 @@ IN_PROC_BROWSER_TEST_F(IsolatedAppTest, CookieIsolation) {
ui_test_utils::CrashTab(tab1);
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
diff --git a/chrome/browser/extensions/network_delay_listener.cc b/chrome/browser/extensions/network_delay_listener.cc
index 09873d9..f35a1fe 100644
--- a/chrome/browser/extensions/network_delay_listener.cc
+++ b/chrome/browser/extensions/network_delay_listener.cc
@@ -111,16 +111,18 @@ void NetworkDelayListener::Cleanup() {
Release();
}
-void NetworkDelayListener::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void NetworkDelayListener::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
switch (type) {
case chrome::NOTIFICATION_EXTENSION_LOADED: {
- const Extension* extension = Details<const Extension>(details).ptr();
+ const Extension* extension =
+ content::Details<const Extension>(details).ptr();
ExtensionService* service =
- Source<Profile>(source).ptr()->GetExtensionService();
+ content::Source<Profile>(source).ptr()->GetExtensionService();
// We only wait for background pages to load. If the extension has no
// background page, ignore it.
if (service->extension_prefs()->DelaysNetworkRequests(extension->id()) &&
@@ -134,9 +136,9 @@ void NetworkDelayListener::Observe(int type,
}
case chrome::NOTIFICATION_EXTENSION_UNLOADED: {
const Extension* extension =
- Details<UnloadedExtensionInfo>(details)->extension;
+ content::Details<UnloadedExtensionInfo>(details)->extension;
ExtensionService* service =
- Source<Profile>(source).ptr()->GetExtensionService();
+ content::Source<Profile>(source).ptr()->GetExtensionService();
if (service->extension_prefs()->DelaysNetworkRequests(extension->id())) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
@@ -146,14 +148,14 @@ void NetworkDelayListener::Observe(int type,
break;
}
case chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING: {
- const ExtensionHost* eh = Details<ExtensionHost>(details).ptr();
+ const ExtensionHost* eh = content::Details<ExtensionHost>(details).ptr();
if (eh->extension_host_type() !=
chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE)
return;
const Extension* extension = eh->extension();
ExtensionService* service =
- Source<Profile>(source).ptr()->GetExtensionService();
+ content::Source<Profile>(source).ptr()->GetExtensionService();
if (service->extension_prefs()->DelaysNetworkRequests(extension->id())) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
diff --git a/chrome/browser/extensions/network_delay_listener.h b/chrome/browser/extensions/network_delay_listener.h
index 9df06d1..d2207cb 100644
--- a/chrome/browser/extensions/network_delay_listener.h
+++ b/chrome/browser/extensions/network_delay_listener.h
@@ -14,8 +14,8 @@
#include "base/perftimer.h"
#include "base/time.h"
#include "content/browser/renderer_host/resource_queue.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
namespace net {
class URLRequest;
@@ -33,7 +33,7 @@ struct GlobalRequestID;
class NetworkDelayListener
: public base::RefCountedThreadSafe<NetworkDelayListener>,
public ResourceQueueDelegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
NetworkDelayListener();
@@ -96,12 +96,12 @@ class NetworkDelayListener
// --- UI thread:
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(NetworkDelayListener);
};
diff --git a/chrome/browser/extensions/network_delay_listener_unittest.cc b/chrome/browser/extensions/network_delay_listener_unittest.cc
index fb6f1f2..cfae394 100644
--- a/chrome/browser/extensions/network_delay_listener_unittest.cc
+++ b/chrome/browser/extensions/network_delay_listener_unittest.cc
@@ -136,8 +136,8 @@ class NetworkDelayListenerTest
chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE));
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
- Source<Profile>(profile_.get()),
- Details<ExtensionHost>(background_host.get()));
+ content::Source<Profile>(profile_.get()),
+ content::Details<ExtensionHost>(background_host.get()));
MessageLoop::current()->RunAllPending();
}
@@ -166,8 +166,8 @@ TEST_F(NetworkDelayListenerTest, DelayAndLoad) {
new TestExtensionHost(extension1_, chrome::VIEW_TYPE_EXTENSION_DIALOG));
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
- Source<Profile>(profile_.get()),
- Details<ExtensionHost>(dialog_host.get()));
+ content::Source<Profile>(profile_.get()),
+ content::Details<ExtensionHost>(dialog_host.get()));
MessageLoop::current()->RunAllPending();
SendExtensionLoadedNotification(extension1_);
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 f18f911..33c5737 100644
--- a/chrome/browser/extensions/speech_input/extension_speech_input_api.cc
+++ b/chrome/browser/extensions/speech_input/extension_speech_input_api.cc
@@ -25,7 +25,7 @@ SpeechInputAsyncFunction::SpeechInputAsyncFunction(
expecting_transition_(false),
failed_(false) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_SPEECH_INPUT_FAILED,
- Source<Profile>(profile()));
+ content::Source<Profile>(profile()));
}
SpeechInputAsyncFunction::~SpeechInputAsyncFunction() {
@@ -49,7 +49,7 @@ void SpeechInputAsyncFunction::Run() {
// Register before RunImpl to ensure it's received if generated.
if (state_before_call == start_state_) {
registrar_.Add(this, transition_notification_,
- Source<Profile>(profile()));
+ content::Source<Profile>(profile()));
AddRef(); // Balanced in Observe().
}
@@ -76,14 +76,16 @@ void SpeechInputAsyncFunction::Run() {
SendResponse(true);
}
-void SpeechInputAsyncFunction::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
- DCHECK_EQ(profile(), Source<Profile>(source).ptr());
+void SpeechInputAsyncFunction::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ DCHECK_EQ(profile(), content::Source<Profile>(source).ptr());
if (type == chrome::NOTIFICATION_EXTENSION_SPEECH_INPUT_FAILED) {
ExtensionSpeechInputManager::ExtensionError* error_details =
- Details<ExtensionSpeechInputManager::ExtensionError>(details).ptr();
+ content::Details<ExtensionSpeechInputManager::ExtensionError>(
+ details).ptr();
if (error_details->extension_id_ != extension_id())
return;
@@ -91,7 +93,7 @@ void SpeechInputAsyncFunction::Observe(int type,
failed_ = true;
} else {
DCHECK_EQ(type, transition_notification_);
- if (*Details<std::string>(details).ptr() != extension_id())
+ if (*content::Details<std::string>(details).ptr() != extension_id())
return;
DCHECK(expecting_transition_);
}
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 bf09bb6..fffbc1b 100644
--- a/chrome/browser/extensions/speech_input/extension_speech_input_api.h
+++ b/chrome/browser/extensions/speech_input/extension_speech_input_api.h
@@ -14,7 +14,7 @@ class ExtensionSpeechInputManager;
// Handles asynchronous operations such as starting or stopping speech
// recognition in the framework of the extension API state machine.
class SpeechInputAsyncFunction : public AsyncExtensionFunction,
- public NotificationObserver {
+ public content::NotificationObserver {
protected:
SpeechInputAsyncFunction(int start_state, int transition_state,
int end_state, int transition_notification);
@@ -24,10 +24,10 @@ class SpeechInputAsyncFunction : public AsyncExtensionFunction,
virtual bool RunImpl() = 0;
private:
- // NotificationObserver.
+ // content::NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// To be defined on construction by derived classes.
int start_state_;
@@ -35,7 +35,7 @@ class SpeechInputAsyncFunction : public AsyncExtensionFunction,
int end_state_;
int transition_notification_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
bool expecting_transition_;
bool failed_;
};
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 a26bde87..b67f276 100644
--- a/chrome/browser/extensions/speech_input/extension_speech_input_manager.cc
+++ b/chrome/browser/extensions/speech_input/extension_speech_input_manager.cc
@@ -118,7 +118,7 @@ ExtensionSpeechInputManager::ExtensionSpeechInputManager(Profile* profile)
state_(kIdle),
speech_interface_(NULL) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
ExtensionSpeechInputManager::~ExtensionSpeechInputManager() {
@@ -138,12 +138,14 @@ void ExtensionSpeechInputManager::InitializeFactory() {
}
void ExtensionSpeechInputManager::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
- if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED)
- ExtensionUnloaded(Details<UnloadedExtensionInfo>(details)->extension->id());
- else
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) {
+ ExtensionUnloaded(
+ content::Details<UnloadedExtensionInfo>(details)->extension->id());
+ } else {
NOTREACHED();
+ }
}
void ExtensionSpeechInputManager::ShutdownOnUIThread() {
@@ -272,8 +274,8 @@ void ExtensionSpeechInputManager::DidStartReceivingAudioOnUIThread() {
VLOG(1) << "Sending start notification";
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_SPEECH_INPUT_RECORDING_STARTED,
- Source<Profile>(profile_),
- Details<std::string>(&extension_id_in_use_));
+ content::Source<Profile>(profile_),
+ content::Details<std::string>(&extension_id_in_use_));
}
void ExtensionSpeechInputManager::OnRecognizerError(
@@ -405,8 +407,8 @@ void ExtensionSpeechInputManager::DispatchError(
ExtensionError details(extension_id, error);
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_SPEECH_INPUT_FAILED,
- Source<Profile>(profile_),
- Details<ExtensionError>(&details));
+ content::Source<Profile>(profile_),
+ content::Details<ExtensionError>(&details));
}
// Used for errors that are also reported via the onError event.
@@ -604,6 +606,7 @@ void ExtensionSpeechInputManager::StopSucceededOnUIThread() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_SPEECH_INPUT_RECORDING_STOPPED,
- Source<Profile>(profile_), // Guarded by the state_ == kShutdown check.
- Details<std::string>(&extension_id));
+ // Guarded by the state_ == kShutdown check.
+ content::Source<Profile>(profile_),
+ content::Details<std::string>(&extension_id));
}
diff --git a/chrome/browser/extensions/speech_input/extension_speech_input_manager.h b/chrome/browser/extensions/speech_input/extension_speech_input_manager.h
index c7b196b..1bda889 100644
--- a/chrome/browser/extensions/speech_input/extension_speech_input_manager.h
+++ b/chrome/browser/extensions/speech_input/extension_speech_input_manager.h
@@ -9,14 +9,12 @@
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "content/browser/speech/speech_recognizer.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
#include "content/common/speech_input_result.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include <string>
class Extension;
-class NotificationDetails;
-class NotificationSource;
class Profile;
namespace net {
@@ -56,7 +54,7 @@ class ExtensionSpeechInterface {
class ExtensionSpeechInputManager
: public base::RefCountedThreadSafe<ExtensionSpeechInputManager>,
public speech_input::SpeechRecognizerDelegate,
- public NotificationObserver,
+ public content::NotificationObserver,
private ExtensionSpeechInterface {
public:
enum State {
@@ -105,10 +103,10 @@ class ExtensionSpeechInputManager
// Called by internal ProfileKeyedService class.
void ShutdownOnUIThread();
- // Methods from NotificationObserver.
+ // Methods from content::NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Methods from SpeechRecognizerDelegate.
virtual void SetRecognitionResult(
@@ -188,7 +186,7 @@ class ExtensionSpeechInputManager
std::string extension_id_in_use_;
// Used in the UI thread.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
ExtensionSpeechInterface* speech_interface_;
};
diff --git a/chrome/browser/extensions/theme_installed_infobar_delegate.cc b/chrome/browser/extensions/theme_installed_infobar_delegate.cc
index 9254d1f..e9832c6 100644
--- a/chrome/browser/extensions/theme_installed_infobar_delegate.cc
+++ b/chrome/browser/extensions/theme_installed_infobar_delegate.cc
@@ -35,7 +35,7 @@ ThemeInstalledInfoBarDelegate::ThemeInstalledInfoBarDelegate(
previous_using_native_theme_(previous_using_native_theme) {
theme_service_->OnInfobarDisplayed();
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
}
bool ThemeInstalledInfoBarDelegate::MatchesTheme(const Extension* theme) const {
@@ -99,8 +99,8 @@ string16 ThemeInstalledInfoBarDelegate::GetButtonLabel(
void ThemeInstalledInfoBarDelegate::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(chrome::NOTIFICATION_BROWSER_THEME_CHANGED, type);
// If the new theme is different from what this info bar is associated with,
// close this info bar since it is no longer relevant.
diff --git a/chrome/browser/extensions/theme_installed_infobar_delegate.h b/chrome/browser/extensions/theme_installed_infobar_delegate.h
index eb1ec58..82d606c 100644
--- a/chrome/browser/extensions/theme_installed_infobar_delegate.h
+++ b/chrome/browser/extensions/theme_installed_infobar_delegate.h
@@ -8,8 +8,8 @@
#include "base/compiler_specific.h"
#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class Extension;
class ExtensionService;
@@ -19,7 +19,7 @@ class ThemeService;
// When a user installs a theme, we display it immediately, but provide an
// infobar allowing them to cancel.
class ThemeInstalledInfoBarDelegate : public ConfirmInfoBarDelegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
ThemeInstalledInfoBarDelegate(InfoBarTabHelper* infobar_helper,
ExtensionService* extension_service,
@@ -50,10 +50,10 @@ class ThemeInstalledInfoBarDelegate : public ConfirmInfoBarDelegate,
virtual int GetButtons() const OVERRIDE;
virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
ExtensionService* extension_service_;
ThemeService* theme_service_;
@@ -69,7 +69,7 @@ class ThemeInstalledInfoBarDelegate : public ConfirmInfoBarDelegate,
bool previous_using_native_theme_;
// Registers and unregisters us for notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
#endif // CHROME_BROWSER_EXTENSIONS_THEME_INSTALLED_INFOBAR_DELEGATE_H_
diff --git a/chrome/browser/extensions/user_script_listener.cc b/chrome/browser/extensions/user_script_listener.cc
index 267c0b3..ff0a036c 100644
--- a/chrome/browser/extensions/user_script_listener.cc
+++ b/chrome/browser/extensions/user_script_listener.cc
@@ -166,14 +166,15 @@ void UserScriptListener::CollectURLPatterns(const Extension* extension,
}
void UserScriptListener::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
switch (type) {
case chrome::NOTIFICATION_EXTENSION_LOADED: {
- Profile* profile = Source<Profile>(source).ptr();
- const Extension* extension = Details<const Extension>(details).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
+ const Extension* extension =
+ content::Details<const Extension>(details).ptr();
if (extension->content_scripts().empty())
return; // no new patterns from this extension.
@@ -188,9 +189,9 @@ void UserScriptListener::Observe(int type,
}
case chrome::NOTIFICATION_EXTENSION_UNLOADED: {
- Profile* profile = Source<Profile>(source).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
const Extension* unloaded_extension =
- Details<UnloadedExtensionInfo>(details)->extension;
+ content::Details<UnloadedExtensionInfo>(details)->extension;
if (unloaded_extension->content_scripts().empty())
return; // no patterns to delete for this extension.
@@ -209,14 +210,14 @@ void UserScriptListener::Observe(int type,
}
case chrome::NOTIFICATION_USER_SCRIPTS_UPDATED: {
- Profile* profile = Source<Profile>(source).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, base::Bind(
&UserScriptListener::UserScriptsReady, this, profile));
break;
}
case chrome::NOTIFICATION_PROFILE_DESTROYED: {
- Profile* profile = Source<Profile>(source).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, base::Bind(
&UserScriptListener::ProfileDestroyed, this, profile));
break;
diff --git a/chrome/browser/extensions/user_script_listener.h b/chrome/browser/extensions/user_script_listener.h
index 1d33c74..8efb34b 100644
--- a/chrome/browser/extensions/user_script_listener.h
+++ b/chrome/browser/extensions/user_script_listener.h
@@ -11,8 +11,8 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "content/browser/renderer_host/resource_queue.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
namespace net {
class URLRequest;
@@ -33,7 +33,7 @@ struct GlobalRequestID;
class UserScriptListener
: public base::RefCountedThreadSafe<UserScriptListener>,
public ResourceQueueDelegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
UserScriptListener();
@@ -89,12 +89,12 @@ class UserScriptListener
// return it.
void CollectURLPatterns(const Extension* extension, URLPatterns* patterns);
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(UserScriptListener);
};
diff --git a/chrome/browser/extensions/user_script_listener_unittest.cc b/chrome/browser/extensions/user_script_listener_unittest.cc
index df569cc..faf744b 100644
--- a/chrome/browser/extensions/user_script_listener_unittest.cc
+++ b/chrome/browser/extensions/user_script_listener_unittest.cc
@@ -159,7 +159,7 @@ TEST_F(UserScriptListenerTest, DelayAndUpdate) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_USER_SCRIPTS_UPDATED,
- Source<Profile>(profile_.get()),
+ content::Source<Profile>(profile_.get()),
NotificationService::NoDetails());
MessageLoop::current()->RunAllPending();
EXPECT_EQ(kTestData, delegate.data_received());
@@ -182,7 +182,7 @@ TEST_F(UserScriptListenerTest, DelayAndUnload) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_USER_SCRIPTS_UPDATED,
- Source<Profile>(profile_.get()),
+ content::Source<Profile>(profile_.get()),
NotificationService::NoDetails());
MessageLoop::current()->RunAllPending();
EXPECT_EQ(kTestData, delegate.data_received());
@@ -228,8 +228,8 @@ TEST_F(UserScriptListenerTest, MultiProfile) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(&profile2),
- Details<Extension>(extension.get()));
+ content::Source<Profile>(&profile2),
+ content::Details<Extension>(extension.get()));
TestDelegate delegate;
scoped_ptr<TestURLRequest> request(StartTestRequest(&delegate, kMatchingUrl));
@@ -239,7 +239,7 @@ TEST_F(UserScriptListenerTest, MultiProfile) {
// be blocked waiting for profile2.
NotificationService::current()->Notify(
chrome::NOTIFICATION_USER_SCRIPTS_UPDATED,
- Source<Profile>(profile_.get()),
+ content::Source<Profile>(profile_.get()),
NotificationService::NoDetails());
MessageLoop::current()->RunAllPending();
ASSERT_FALSE(request->is_pending());
@@ -248,7 +248,7 @@ TEST_F(UserScriptListenerTest, MultiProfile) {
// After profile2 is ready, the request should proceed.
NotificationService::current()->Notify(
chrome::NOTIFICATION_USER_SCRIPTS_UPDATED,
- Source<Profile>(&profile2),
+ content::Source<Profile>(&profile2),
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 6caeccf..f3c5be1 100644
--- a/chrome/browser/extensions/user_script_master.cc
+++ b/chrome/browser/extensions/user_script_master.cc
@@ -289,11 +289,11 @@ UserScriptMaster::UserScriptMaster(Profile* profile)
pending_load_(false),
profile_(profile) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSIONS_READY,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED,
NotificationService::AllBrowserContextsAndSources());
}
@@ -325,14 +325,14 @@ void UserScriptMaster::NewScriptsAvailable(base::SharedMemory* handle) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_USER_SCRIPTS_UPDATED,
- Source<Profile>(profile_),
- Details<base::SharedMemory>(handle));
+ content::Source<Profile>(profile_),
+ content::Details<base::SharedMemory>(handle));
}
}
void UserScriptMaster::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
bool should_start_load = false;
switch (type) {
case chrome::NOTIFICATION_EXTENSIONS_READY:
@@ -341,7 +341,8 @@ void UserScriptMaster::Observe(int type,
break;
case chrome::NOTIFICATION_EXTENSION_LOADED: {
// Add any content scripts inside the extension.
- const Extension* extension = Details<const Extension>(details).ptr();
+ const Extension* extension =
+ content::Details<const Extension>(details).ptr();
extensions_info_[extension->id()] =
ExtensionSet::ExtensionPathAndDefaultLocale(
extension->path(), extension->default_locale());
@@ -360,7 +361,7 @@ void UserScriptMaster::Observe(int type,
case chrome::NOTIFICATION_EXTENSION_UNLOADED: {
// Remove any content scripts.
const Extension* extension =
- Details<UnloadedExtensionInfo>(details)->extension;
+ content::Details<UnloadedExtensionInfo>(details)->extension;
extensions_info_.erase(extension->id());
UserScriptList new_user_scripts;
for (UserScriptList::iterator iter = user_scripts_.begin();
@@ -377,7 +378,8 @@ void UserScriptMaster::Observe(int type,
break;
}
case content::NOTIFICATION_RENDERER_PROCESS_CREATED: {
- RenderProcessHost* process = Source<RenderProcessHost>(source).ptr();
+ RenderProcessHost* process =
+ content::Source<RenderProcessHost>(source).ptr();
Profile* profile = Profile::FromBrowserContext(
process->browser_context());
if (!profile_->IsSameProfile(profile))
diff --git a/chrome/browser/extensions/user_script_master.h b/chrome/browser/extensions/user_script_master.h
index 2ec773b..c33fb27 100644
--- a/chrome/browser/extensions/user_script_master.h
+++ b/chrome/browser/extensions/user_script_master.h
@@ -19,8 +19,8 @@
#include "chrome/common/extensions/extension_set.h"
#include "chrome/common/extensions/user_script.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
namespace base {
class StringPiece;
@@ -35,7 +35,7 @@ typedef std::map<std::string, ExtensionSet::ExtensionPathAndDefaultLocale>
// Manages a segment of shared memory that contains the user scripts the user
// has installed. Lives on the UI thread.
class UserScriptMaster : public base::RefCountedThreadSafe<UserScriptMaster>,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit UserScriptMaster(Profile* profile);
@@ -129,17 +129,17 @@ class UserScriptMaster : public base::RefCountedThreadSafe<UserScriptMaster>,
};
private:
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Sends the renderer process a new set of user scripts.
void SendUpdate(RenderProcessHost* process,
base::SharedMemory* shared_memory);
// Manages our notification registrations.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// We hang on to our pointer to know if we've already got one running.
scoped_refptr<ScriptReloader> script_reloader_;
diff --git a/chrome/browser/extensions/user_script_master_unittest.cc b/chrome/browser/extensions/user_script_master_unittest.cc
index 9d2abcc..dfd2eee 100644
--- a/chrome/browser/extensions/user_script_master_unittest.cc
+++ b/chrome/browser/extensions/user_script_master_unittest.cc
@@ -15,7 +15,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/testing_profile.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -32,7 +32,7 @@ static void AddPattern(URLPatternSet* extent, const std::string& pattern) {
// in there, etc.
class UserScriptMasterTest : public testing::Test,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
UserScriptMasterTest()
: message_loop_(MessageLoop::TYPE_UI),
@@ -60,11 +60,11 @@ class UserScriptMasterTest : public testing::Test,
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_USER_SCRIPTS_UPDATED);
- shared_memory_ = Details<base::SharedMemory>(details).ptr();
+ shared_memory_ = content::Details<base::SharedMemory>(details).ptr();
if (MessageLoop::current() == &message_loop_)
MessageLoop::current()->Quit();
}
@@ -72,7 +72,7 @@ class UserScriptMasterTest : public testing::Test,
// Directory containing user scripts.
ScopedTempDir temp_dir_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// MessageLoop used in tests.
MessageLoop message_loop_;
diff --git a/chrome/browser/extensions/webstore_inline_install_browsertest.cc b/chrome/browser/extensions/webstore_inline_install_browsertest.cc
index ac58795..a58363a 100644
--- a/chrome/browser/extensions/webstore_inline_install_browsertest.cc
+++ b/chrome/browser/extensions/webstore_inline_install_browsertest.cc
@@ -83,7 +83,7 @@ IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallTest, Install) {
ui_test_utils::WindowedNotificationObserver load_signal(
chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(browser()->profile()));
+ content::Source<Profile>(browser()->profile()));
ui_test_utils::NavigateToURL(
browser(), GenerateTestServerUrl(kAppDomain, "install.html"));
diff --git a/chrome/browser/extensions/webstore_installer.h b/chrome/browser/extensions/webstore_installer.h
index cc06493..4c81089 100644
--- a/chrome/browser/extensions/webstore_installer.h
+++ b/chrome/browser/extensions/webstore_installer.h
@@ -10,14 +10,14 @@
#include <vector>
#include "base/compiler_specific.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class GURL;
class Profile;
// Downloads and installs extensions from the web store.
-class WebstoreInstaller : public NotificationObserver {
+class WebstoreInstaller : public content::NotificationObserver {
public:
enum Flag {
FLAG_NONE = 0,
@@ -43,10 +43,10 @@ class WebstoreInstaller : public NotificationObserver {
// Note: the delegate should stay alive until being called back.
void InstallExtension(const std::string& id, Delegate* delegate, int flags);
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
struct PendingInstall;
@@ -71,7 +71,7 @@ class WebstoreInstaller : public NotificationObserver {
// PendingInstall.
void ReportSuccess(const std::string& id);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
Profile* profile_;
std::vector<PendingInstall> pending_installs_;
};
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc
index a1c896c..be79271 100644
--- a/chrome/browser/external_tab_container_win.cc
+++ b/chrome/browser/external_tab_container_win.cc
@@ -210,13 +210,13 @@ bool ExternalTabContainer::Init(Profile* profile,
NavigationController* controller = &tab_contents_->controller();
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(controller));
+ content::Source<NavigationController>(controller));
registrar_.Add(this, content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR,
- Source<NavigationController>(controller));
+ content::Source<NavigationController>(controller));
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(controller));
+ content::Source<NavigationController>(controller));
registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB,
- Source<TabContents>(tab_contents_->tab_contents()));
+ content::Source<TabContents>(tab_contents_->tab_contents()));
registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_DELETED,
NotificationService::AllSources());
@@ -261,8 +261,8 @@ void ExternalTabContainer::Uninitialize() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTERNAL_TAB_CLOSED,
- Source<NavigationController>(&tab_contents_->controller()),
- Details<ExternalTabContainer>(this));
+ content::Source<NavigationController>(&tab_contents_->controller()),
+ content::Details<ExternalTabContainer>(this));
tab_contents_.reset(NULL);
}
@@ -816,8 +816,8 @@ void ExternalTabContainer::OnForwardMessageToExternalHost(
// ExternalTabContainer, NotificationObserver implementation:
void ExternalTabContainer::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (!automation_)
return;
@@ -827,7 +827,7 @@ void ExternalTabContainer::Observe(int type,
switch (type) {
case content::NOTIFICATION_LOAD_STOP: {
const LoadNotificationDetails* load =
- Details<LoadNotificationDetails>(details).ptr();
+ content::Details<LoadNotificationDetails>(details).ptr();
if (load != NULL &&
content::PageTransitionIsMainFrame(load->origin())) {
TRACE_EVENT_END_ETW("ExternalTabContainer::Navigate", 0,
@@ -844,7 +844,7 @@ void ExternalTabContainer::Observe(int type,
}
const content::LoadCommittedDetails* commit =
- Details<content::LoadCommittedDetails>(details).ptr();
+ content::Details<content::LoadCommittedDetails>(details).ptr();
if (commit->http_status_code >= kHttpClientErrorStart &&
commit->http_status_code <= kHttpServerErrorEnd) {
@@ -867,7 +867,7 @@ void ExternalTabContainer::Observe(int type,
}
case content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR: {
const ProvisionalLoadDetails* load_details =
- Details<ProvisionalLoadDetails>(details).ptr();
+ content::Details<ProvisionalLoadDetails>(details).ptr();
automation_->Send(new AutomationMsg_NavigationFailed(
tab_handle_, load_details->error_code(), load_details->url()));
@@ -876,14 +876,14 @@ void ExternalTabContainer::Observe(int type,
}
case content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB: {
if (load_requests_via_automation_) {
- RenderViewHost* rvh = Details<RenderViewHost>(details).ptr();
+ RenderViewHost* rvh = content::Details<RenderViewHost>(details).ptr();
RegisterRenderViewHostForAutomation(rvh, false);
}
break;
}
case content::NOTIFICATION_RENDER_VIEW_HOST_DELETED: {
if (load_requests_via_automation_) {
- RenderViewHost* rvh = Source<RenderViewHost>(source).ptr();
+ RenderViewHost* rvh = content::Source<RenderViewHost>(source).ptr();
UnregisterRenderViewHost(rvh);
}
break;
diff --git a/chrome/browser/external_tab_container_win.h b/chrome/browser/external_tab_container_win.h
index 275c4eb..038b2fb9 100644
--- a/chrome/browser/external_tab_container_win.h
+++ b/chrome/browser/external_tab_container_win.h
@@ -22,8 +22,8 @@
#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/navigation_types.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "views/accelerator.h"
#include "views/widget/native_widget_win.h"
@@ -45,7 +45,7 @@ class ViewProp;
// TabContents as well as an implementation of TabContentsDelegate.
class ExternalTabContainer : public TabContentsDelegate,
public TabContentsObserver,
- public NotificationObserver,
+ public content::NotificationObserver,
public views::NativeWidgetWin,
public base::RefCounted<ExternalTabContainer>,
public views::AcceleratorTarget,
@@ -197,10 +197,10 @@ class ExternalTabContainer : public TabContentsDelegate,
const std::string& origin,
const std::string& target);
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Returns the ExternalTabContainer instance associated with the cookie
// passed in. It also erases the corresponding reference from the map.
@@ -273,7 +273,7 @@ class ExternalTabContainer : public TabContentsDelegate,
scoped_ptr<TabContentsWrapper> tab_contents_;
scoped_refptr<AutomationProvider> automation_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// A view to handle focus cycling
TabContentsContainer* tab_contents_container_;
@@ -369,8 +369,8 @@ class TemporaryPopupExternalTabContainer : public ExternalTabContainer {
return false;
}
- virtual void Observe(int type, const NotificationSource& source,
- const NotificationDetails& details) {}
+ virtual void Observe(int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {}
// Deprecated. Please use the two-argument variant.
// TODO(adriansc): Remove method once refactoring changed all call sites.
diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc
index a7bf45d..1740379 100644
--- a/chrome/browser/favicon/favicon_tab_helper.cc
+++ b/chrome/browser/favicon/favicon_tab_helper.cc
@@ -140,7 +140,7 @@ void FaviconTabHelper::StartDownload(int id, const GURL& url, int image_size) {
void FaviconTabHelper::NotifyFaviconUpdated() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_FAVICON_UPDATED,
- Source<TabContents>(tab_contents()),
+ content::Source<TabContents>(tab_contents()),
NotificationService::NoDetails());
tab_contents()->NotifyNavigationStateChanged(TabContents::INVALIDATE_TAB);
}
diff --git a/chrome/browser/file_select_helper.cc b/chrome/browser/file_select_helper.cc
index fc0a8b3..f5962bb 100644
--- a/chrome/browser/file_select_helper.cc
+++ b/chrome/browser/file_select_helper.cc
@@ -20,9 +20,9 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.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"
#include "grit/generated_resources.h"
#include "net/base/mime_util.h"
@@ -276,10 +276,10 @@ void FileSelectHelper::RunFileChooser(
notification_registrar_.RemoveAll();
notification_registrar_.Add(
this, content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
- Source<RenderWidgetHost>(render_view_host_));
+ content::Source<RenderWidgetHost>(render_view_host_));
notification_registrar_.Add(
this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents_));
+ content::Source<TabContents>(tab_contents_));
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
@@ -380,17 +380,18 @@ void FileSelectHelper::EnumerateDirectoryEnd() {
}
void FileSelectHelper::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED: {
- DCHECK(Source<RenderWidgetHost>(source).ptr() == render_view_host_);
+ DCHECK(content::Source<RenderWidgetHost>(source).ptr() ==
+ render_view_host_);
render_view_host_ = NULL;
break;
}
case content::NOTIFICATION_TAB_CONTENTS_DESTROYED: {
- DCHECK(Source<TabContents>(source).ptr() == tab_contents_);
+ DCHECK(content::Source<TabContents>(source).ptr() == tab_contents_);
tab_contents_ = NULL;
break;
}
diff --git a/chrome/browser/file_select_helper.h b/chrome/browser/file_select_helper.h
index 12d6e1a..eb31f0c 100644
--- a/chrome/browser/file_select_helper.h
+++ b/chrome/browser/file_select_helper.h
@@ -12,8 +12,8 @@
#include "base/compiler_specific.h"
#include "chrome/browser/ui/shell_dialogs.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "net/base/directory_lister.h"
class Profile;
@@ -27,7 +27,7 @@ struct ViewHostMsg_RunFileChooser_Params;
class FileSelectHelper
: public base::RefCountedThreadSafe<FileSelectHelper>,
public SelectFileDialog::Listener,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit FileSelectHelper(Profile* profile);
@@ -85,10 +85,10 @@ class FileSelectHelper
void* params) OVERRIDE;
virtual void FileSelectionCanceled(void* params) OVERRIDE;
- // NotificationObserver overrides.
+ // content::NotificationObserver overrides.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Kicks off a new directory enumeration.
void StartNewEnumeration(const FilePath& path,
@@ -133,7 +133,7 @@ class FileSelectHelper
std::map<int, ActiveDirectoryEnumeration*> directory_enumerations_;
// Registrar for notifications regarding our RenderViewHost.
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
DISALLOW_COPY_AND_ASSIGN(FileSelectHelper);
};
diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc
index 3b05e48..29b05b8 100644
--- a/chrome/browser/first_run/first_run_win.cc
+++ b/chrome/browser/first_run/first_run_win.cc
@@ -50,7 +50,7 @@ namespace {
// Helper class that performs delayed first-run tasks that need more of the
// chrome infrastructure to be up and running before they can be attempted.
-class FirstRunDelayedTasks : public NotificationObserver {
+class FirstRunDelayedTasks : public content::NotificationObserver {
public:
enum Tasks {
NO_TASK,
@@ -67,11 +67,13 @@ class FirstRunDelayedTasks : public NotificationObserver {
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
// After processing the notification we always delete ourselves.
- if (type == chrome::NOTIFICATION_EXTENSIONS_READY)
- DoExtensionWork(Source<Profile>(source).ptr()->GetExtensionService());
+ if (type == chrome::NOTIFICATION_EXTENSIONS_READY) {
+ DoExtensionWork(
+ content::Source<Profile>(source).ptr()->GetExtensionService());
+ }
delete this;
return;
}
@@ -90,7 +92,7 @@ class FirstRunDelayedTasks : public NotificationObserver {
return;
}
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
// Creates the desktop shortcut to chrome for the current user. Returns
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
index 5996886..07b55ba 100644
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
@@ -24,7 +24,7 @@
#include "content/browser/tab_contents/test_tab_contents.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/common/geolocation_messages.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -33,15 +33,15 @@
namespace {
// We need to track which infobars were closed.
-class ClosedDelegateTracker : public NotificationObserver {
+class ClosedDelegateTracker : public content::NotificationObserver {
public:
ClosedDelegateTracker();
virtual ~ClosedDelegateTracker();
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
size_t size() const {
return removed_infobar_delegates_.size();
@@ -51,7 +51,7 @@ class ClosedDelegateTracker : public NotificationObserver {
void Clear();
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
std::set<InfoBarDelegate*> removed_infobar_delegates_;
};
@@ -63,12 +63,13 @@ ClosedDelegateTracker::ClosedDelegateTracker() {
ClosedDelegateTracker::~ClosedDelegateTracker() {
}
-void ClosedDelegateTracker::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ClosedDelegateTracker::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED);
removed_infobar_delegates_.insert(
- Details<InfoBarRemovedDetails>(details)->first);
+ content::Details<InfoBarRemovedDetails>(details)->first);
}
bool ClosedDelegateTracker::Contains(InfoBarDelegate* delegate) const {
diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc
index 86e0823..9abdc36 100644
--- a/chrome/browser/geolocation/geolocation_browsertest.cc
+++ b/chrome/browser/geolocation/geolocation_browsertest.cc
@@ -30,8 +30,8 @@
#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_details.h"
#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
#include "net/base/net_util.h"
#include "net/test/test_server.h"
@@ -41,7 +41,7 @@ namespace {
// Note: NavigateToURLBlockUntilNavigationsComplete doesn't seem to work for
// multiple embedded iframes, as notifications seem to be 'batched'. Instead, we
// load and wait one single frame here by calling a javascript function.
-class IFrameLoader : public NotificationObserver {
+class IFrameLoader : public content::NotificationObserver {
public:
IFrameLoader(Browser* browser, int iframe_id, const GURL& url)
: navigation_completed_(false),
@@ -49,7 +49,7 @@ class IFrameLoader : public NotificationObserver {
NavigationController* controller =
&browser->GetSelectedTabContents()->controller();
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(controller));
+ content::Source<NavigationController>(controller));
registrar_.Add(this, chrome::NOTIFICATION_DOM_OPERATION_RESPONSE,
NotificationService::AllSources());
std::string script = base::StringPrintf(
@@ -76,12 +76,12 @@ class IFrameLoader : public NotificationObserver {
GURL iframe_url() const { return iframe_url_; }
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_LOAD_STOP) {
navigation_completed_ = true;
} else if (type == chrome::NOTIFICATION_DOM_OPERATION_RESPONSE) {
- Details<DomOperationNotificationDetails> dom_op_details(details);
+ content::Details<DomOperationNotificationDetails> dom_op_details(details);
javascript_response_ = dom_op_details->json();
javascript_completed_ = true;
}
@@ -90,7 +90,7 @@ class IFrameLoader : public NotificationObserver {
}
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// If true the navigation has completed.
bool navigation_completed_;
@@ -106,7 +106,7 @@ class IFrameLoader : public NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(IFrameLoader);
};
-class GeolocationNotificationObserver : public NotificationObserver {
+class GeolocationNotificationObserver : public content::NotificationObserver {
public:
// If |wait_for_infobar| is true, AddWatchAndWaitForNotification will block
// until the infobar has been displayed; otherwise it will block until the
@@ -150,16 +150,16 @@ class GeolocationNotificationObserver : public NotificationObserver {
}
}
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED) {
- infobar_ = Details<InfoBarAddedDetails>(details).ptr();
+ infobar_ = content::Details<InfoBarAddedDetails>(details).ptr();
ASSERT_TRUE(infobar_->GetIcon());
ASSERT_TRUE(infobar_->AsConfirmInfoBarDelegate());
} else if (type == chrome::NOTIFICATION_DOM_OPERATION_RESPONSE) {
- Details<DomOperationNotificationDetails> dom_op_details(details);
+ content::Details<DomOperationNotificationDetails> dom_op_details(details);
javascript_response_ = dom_op_details->json();
LOG(WARNING) << "javascript_response " << javascript_response_;
} else if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED ||
@@ -180,7 +180,7 @@ class GeolocationNotificationObserver : public NotificationObserver {
MessageLoopForUI::current()->Quit();
}
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
bool wait_for_infobar_;
InfoBarDelegate* infobar_;
bool navigation_started_;
@@ -324,7 +324,8 @@ class GeolocationBrowserTest : public InProcessBrowserTest {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab_contents_wrapper->controller()));
+ content::Source<NavigationController>(
+ &tab_contents_wrapper->controller()));
if (allowed)
infobar_->AsConfirmInfoBarDelegate()->Accept();
else
@@ -506,7 +507,7 @@ IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest,
Geoposition fresh_position = GeopositionFromLatLong(3.17, 4.23);
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&current_browser_->GetSelectedTabContents()->controller()));
NotifyGeoposition(fresh_position);
observer.Wait();
@@ -543,7 +544,7 @@ IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest,
Geoposition cached_position = GeopositionFromLatLong(5.67, 8.09);
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&current_browser_->GetSelectedTabContents()->controller()));
NotifyGeoposition(cached_position);
observer.Wait();
@@ -651,7 +652,7 @@ IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest, TwoWatchesInOneFrame) {
// its way through to the first watcher.
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&current_browser_->GetSelectedTabContents()->controller()));
NotifyGeoposition(final_position);
observer.Wait();
diff --git a/chrome/browser/google/google_url_tracker.cc b/chrome/browser/google/google_url_tracker.cc
index ee46e47..92df0ca 100644
--- a/chrome/browser/google/google_url_tracker.cc
+++ b/chrome/browser/google/google_url_tracker.cc
@@ -311,12 +311,12 @@ void GoogleURLTracker::RedoSearch() {
}
void GoogleURLTracker::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_NAV_ENTRY_PENDING: {
NavigationController* controller =
- Source<NavigationController>(source).ptr();
+ content::Source<NavigationController>(source).ptr();
OnNavigationPending(source, controller->pending_entry()->url());
break;
}
@@ -324,7 +324,7 @@ void GoogleURLTracker::Observe(int type,
case content::NOTIFICATION_NAV_ENTRY_COMMITTED:
case content::NOTIFICATION_TAB_CLOSED:
OnNavigationCommittedOrTabClosed(
- Source<NavigationController>(source).ptr()->tab_contents(),
+ content::Source<NavigationController>(source).ptr()->tab_contents(),
type);
break;
@@ -347,18 +347,19 @@ void GoogleURLTracker::SearchCommitted() {
}
}
-void GoogleURLTracker::OnNavigationPending(const NotificationSource& source,
- const GURL& pending_url) {
- controller_ = Source<NavigationController>(source).ptr();
+void GoogleURLTracker::OnNavigationPending(
+ const content::NotificationSource& source,
+ const GURL& pending_url) {
+ controller_ = content::Source<NavigationController>(source).ptr();
search_url_ = pending_url;
registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_PENDING,
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,
- Source<NavigationController>(controller_));
+ content::Source<NavigationController>(controller_));
registrar_.Add(this, content::NOTIFICATION_TAB_CLOSED,
- Source<NavigationController>(controller_));
+ content::Source<NavigationController>(controller_));
}
void GoogleURLTracker::OnNavigationCommittedOrTabClosed(
diff --git a/chrome/browser/google/google_url_tracker.h b/chrome/browser/google/google_url_tracker.h
index f784326..9f5c3f7 100644
--- a/chrome/browser/google/google_url_tracker.h
+++ b/chrome/browser/google/google_url_tracker.h
@@ -13,8 +13,8 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "content/common/net/url_fetcher.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
#include "net/base/network_change_notifier.h"
@@ -37,7 +37,7 @@ class TemplateURL;
// performed (ever) unless at least one consumer registers interest by calling
// RequestServerCheck().
class GoogleURLTracker : public URLFetcher::Delegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public net::NetworkChangeNotifier::IPAddressObserver {
public:
// Only the main browser process loop should call this, when setting up
@@ -114,22 +114,22 @@ class GoogleURLTracker : public URLFetcher::Delegate,
const net::ResponseCookies& cookies,
const std::string& data);
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// NetworkChangeNotifier::IPAddressObserver
virtual void OnIPAddressChanged();
void SearchCommitted();
- void OnNavigationPending(const NotificationSource& source,
+ void OnNavigationPending(const content::NotificationSource& source,
const GURL& pending_url);
void OnNavigationCommittedOrTabClosed(TabContents* tab_contents,
int type);
void ShowGoogleURLInfoBarIfNecessary(TabContents* tab_contents);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
InfobarCreator infobar_creator_;
// TODO(ukai): GoogleURLTracker should track google domain (e.g. google.co.uk)
// rather than URL (e.g. http://www.google.co.uk/), so that user could
diff --git a/chrome/browser/google/google_url_tracker_unittest.cc b/chrome/browser/google/google_url_tracker_unittest.cc
index 07561fd..d83015e 100644
--- a/chrome/browser/google/google_url_tracker_unittest.cc
+++ b/chrome/browser/google/google_url_tracker_unittest.cc
@@ -26,14 +26,14 @@
namespace {
-class TestNotificationObserver : public NotificationObserver {
+class TestNotificationObserver : public content::NotificationObserver {
public:
TestNotificationObserver();
virtual ~TestNotificationObserver();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
bool notified() const { return notified_; }
void clear_notified() { notified_ = false; }
@@ -47,9 +47,10 @@ TestNotificationObserver::TestNotificationObserver() : notified_(false) {
TestNotificationObserver::~TestNotificationObserver() {
}
-void TestNotificationObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void TestNotificationObserver::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
notified_ = true;
}
@@ -137,7 +138,7 @@ class GoogleURLTrackerTest : public testing::Test {
ScopedTestingLocalState local_state_;
TestURLFetcherFactory fetcher_factory_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
GoogleURLTrackerTest::GoogleURLTrackerTest()
diff --git a/chrome/browser/history/history.cc b/chrome/browser/history/history.cc
index 75b1891..2aea96b 100644
--- a/chrome/browser/history/history.cc
+++ b/chrome/browser/history/history.cc
@@ -98,9 +98,9 @@ class HistoryService::BackendDelegate : public HistoryBackend::Delegate {
history::HistoryDetails* details) OVERRIDE {
// Send the notification on the history thread.
if (NotificationService::current()) {
- Details<history::HistoryDetails> det(details);
+ content::Details<history::HistoryDetails> det(details);
NotificationService::current()->Notify(type,
- Source<Profile>(profile_),
+ content::Source<Profile>(profile_),
det);
}
// Send the notification to the history service on the main thread.
@@ -153,9 +153,9 @@ HistoryService::HistoryService(Profile* profile)
needs_top_sites_migration_(false) {
DCHECK(profile_);
registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URLS_DELETED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_TEMPLATE_URL_REMOVED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
HistoryService::~HistoryService() {
@@ -634,8 +634,8 @@ HistoryService::Handle HistoryService::QueryMostVisitedURLs(
}
void HistoryService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (!thread_)
return;
@@ -652,7 +652,7 @@ void HistoryService::Observe(int type,
// isn't. Therefore, we update the delete URLs after the fact.
if (!profile_)
return; // No profile, probably unit testing.
- Details<history::URLsDeletedDetails> deleted_details(details);
+ content::Details<history::URLsDeletedDetails> deleted_details(details);
VisitedLinkMaster* visited_links = profile_->GetVisitedLinkMaster();
if (!visited_links)
return; // Nobody to update.
@@ -664,7 +664,8 @@ void HistoryService::Observe(int type,
}
case chrome::NOTIFICATION_TEMPLATE_URL_REMOVED:
- DeleteAllSearchTermsForKeyword(*(Details<TemplateURLID>(details).ptr()));
+ DeleteAllSearchTermsForKeyword(
+ *(content::Details<TemplateURLID>(details).ptr()));
break;
default:
@@ -784,12 +785,12 @@ void HistoryService::BroadcastNotifications(
// The source of all of our notifications is the profile. Note that this
// pointer is NULL in unit tests.
- Source<Profile> source(profile_);
+ content::Source<Profile> source(profile_);
// The details object just contains the pointer to the object that the
// backend has allocated for us. The receiver of the notification will cast
// this to the proper type.
- Details<history::HistoryDetails> det(details_deleted);
+ content::Details<history::HistoryDetails> det(details_deleted);
NotificationService::current()->Notify(type, source, det);
}
@@ -821,9 +822,10 @@ void HistoryService::OnDBLoaded(int backend_id) {
return;
}
backend_loaded_ = true;
- NotificationService::current()->Notify(chrome::NOTIFICATION_HISTORY_LOADED,
- Source<Profile>(profile_),
- Details<HistoryService>(this));
+ NotificationService::current()->Notify(
+ chrome::NOTIFICATION_HISTORY_LOADED,
+ content::Source<Profile>(profile_),
+ content::Details<HistoryService>(this));
if (thread_ && profile_) {
// We don't want to force creation of TopSites.
history::TopSites* ts = profile_->GetTopSitesWithoutCreating();
diff --git a/chrome/browser/history/history.h b/chrome/browser/history/history.h
index 8bf58c1..c6f257bb 100644
--- a/chrome/browser/history/history.h
+++ b/chrome/browser/history/history.h
@@ -21,8 +21,8 @@
#include "chrome/browser/search_engines/template_url_id.h"
#include "chrome/common/ref_counted_util.h"
#include "content/browser/cancelable_request.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/common/page_transition_types.h"
#include "sql/init_status.h"
@@ -98,7 +98,7 @@ class HistoryDBTask : public base::RefCountedThreadSafe<HistoryDBTask> {
// This service is thread safe. Each request callback is invoked in the
// thread that made the request.
class HistoryService : public CancelableRequestProvider,
- public NotificationObserver,
+ public content::NotificationObserver,
public base::RefCountedThreadSafe<HistoryService> {
public:
// Miscellaneous commonly-used types.
@@ -605,10 +605,10 @@ class HistoryService : public CancelableRequestProvider,
friend class RedirectRequest;
friend class TestingProfile;
- // Implementation of NotificationObserver.
+ // Implementation of content::NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Low-level Init(). Same as the public version, but adds a |no_db| parameter
// that is only set by unittests which causes the backend to not init its DB.
@@ -831,7 +831,7 @@ class HistoryService : public CancelableRequestProvider,
a, b, c, d));
}
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Some void primitives require some internal processing in the main thread
// when done. We use this internal consumer for this purpose.
diff --git a/chrome/browser/history/history_backend_unittest.cc b/chrome/browser/history/history_backend_unittest.cc
index 2443d8c1..e72dbfd 100644
--- a/chrome/browser/history/history_backend_unittest.cc
+++ b/chrome/browser/history/history_backend_unittest.cc
@@ -23,8 +23,8 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/thumbnail_score.h"
#include "chrome/tools/profiles/thumbnail-inl.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/codec/jpeg_codec.h"
@@ -178,8 +178,8 @@ class HistoryBackendTest : public testing::Test {
void BroadcastNotifications(int type,
HistoryDetails* details) {
// Send the notifications directly to the in-memory database.
- Details<HistoryDetails> det(details);
- mem_backend_->Observe(type, Source<HistoryBackendTest>(NULL), det);
+ content::Details<HistoryDetails> det(details);
+ mem_backend_->Observe(type, content::Source<HistoryBackendTest>(NULL), det);
// The backend passes ownership of the details pointer to us.
delete details;
diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc
index 37d0645..9c63dcb 100644
--- a/chrome/browser/history/history_tab_helper.cc
+++ b/chrome/browser/history/history_tab_helper.cc
@@ -21,7 +21,7 @@ HistoryTabHelper::HistoryTabHelper(TabContents* tab_contents)
: TabContentsObserver(tab_contents),
received_page_title_(false) {
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_TITLE_UPDATED,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
}
HistoryTabHelper::~HistoryTabHelper() {
@@ -106,10 +106,11 @@ void HistoryTabHelper::DidNavigateAnyFramePostCommit(
}
void HistoryTabHelper::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == content::NOTIFICATION_TAB_CONTENTS_TITLE_UPDATED);
- TitleUpdatedDetails* title = Details<TitleUpdatedDetails>(details).ptr();
+ TitleUpdatedDetails* title =
+ content::Details<TitleUpdatedDetails>(details).ptr();
if (received_page_title_)
return;
diff --git a/chrome/browser/history/history_tab_helper.h b/chrome/browser/history/history_tab_helper.h
index 763e1c0..4db7a0e 100644
--- a/chrome/browser/history/history_tab_helper.h
+++ b/chrome/browser/history/history_tab_helper.h
@@ -7,8 +7,8 @@
#pragma once
#include "content/browser/tab_contents/tab_contents_observer.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class HistoryService;
class SkBitmap;
@@ -19,7 +19,7 @@ class HistoryAddPageArgs;
}
class HistoryTabHelper : public TabContentsObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit HistoryTabHelper(TabContents* tab_contents);
virtual ~HistoryTabHelper();
@@ -50,10 +50,10 @@ class HistoryTabHelper : public TabContentsObserver,
const content::LoadCommittedDetails& details,
const ViewHostMsg_FrameNavigate_Params& params);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
void OnPageContents(const GURL& url,
int32 page_id,
@@ -71,7 +71,7 @@ class HistoryTabHelper : public TabContentsObserver,
// messages.
bool received_page_title_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(HistoryTabHelper);
};
diff --git a/chrome/browser/history/history_unittest.cc b/chrome/browser/history/history_unittest.cc
index 684eed5..ceb9608 100644
--- a/chrome/browser/history/history_unittest.cc
+++ b/chrome/browser/history/history_unittest.cc
@@ -48,8 +48,8 @@
#include "chrome/tools/profiles/thumbnail-inl.h"
#include "content/browser/download/download_item.h"
#include "content/browser/download/download_persistent_store_info.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "sql/connection.h"
#include "sql/statement.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -304,9 +304,9 @@ void BackendDelegate::BroadcastNotifications(int type,
HistoryDetails* details) {
// Currently, just send the notifications directly to the in-memory database.
// We may want do do something more fancy in the future.
- Details<HistoryDetails> det(details);
+ content::Details<HistoryDetails> det(details);
history_test_->in_mem_backend_->Observe(type,
- Source<HistoryTest>(NULL), det);
+ content::Source<HistoryTest>(NULL), det);
// The backend passes ownership of the details pointer to us.
delete details;
diff --git a/chrome/browser/history/in_memory_history_backend.h b/chrome/browser/history/in_memory_history_backend.h
index 13bf030..5eb8c18e 100644
--- a/chrome/browser/history/in_memory_history_backend.h
+++ b/chrome/browser/history/in_memory_history_backend.h
@@ -19,8 +19,8 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class FilePath;
class GURL;
@@ -36,7 +36,7 @@ class URLDatabase;
struct URLsDeletedDetails;
struct URLsModifiedDetails;
-class InMemoryHistoryBackend : public NotificationObserver {
+class InMemoryHistoryBackend : public content::NotificationObserver {
public:
InMemoryHistoryBackend();
virtual ~InMemoryHistoryBackend();
@@ -67,8 +67,8 @@ class InMemoryHistoryBackend : public NotificationObserver {
// Notification callback.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Return the quick history index.
history::InMemoryURLIndex* InMemoryIndex() const { return index_.get(); }
@@ -88,7 +88,7 @@ class InMemoryHistoryBackend : public NotificationObserver {
// Returns true if there is a keyword associated with the specified url.
bool HasKeyword(const GURL& url);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
scoped_ptr<InMemoryDatabase> db_;
diff --git a/chrome/browser/history/shortcuts_backend.h b/chrome/browser/history/shortcuts_backend.h
index 67bf64e..00191c2 100644
--- a/chrome/browser/history/shortcuts_backend.h
+++ b/chrome/browser/history/shortcuts_backend.h
@@ -19,8 +19,8 @@
#include "base/synchronization/lock.h"
#include "chrome/browser/autocomplete/shortcuts_provider_shortcut.h"
#include "chrome/browser/history/shortcuts_database.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
class Profile;
@@ -30,7 +30,7 @@ namespace history {
// This class manages the shortcut provider backend - access to database on the
// db thread, etc.
class ShortcutsBackend : public base::RefCountedThreadSafe<ShortcutsBackend>,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// |profile| is necessary for profile notifications only and can be NULL in
// unit-tests. |db_folder_path| could be an empty path only in unit-tests as
@@ -97,10 +97,10 @@ class ShortcutsBackend : public base::RefCountedThreadSafe<ShortcutsBackend>,
// Finishes initialization on UI thread, notifies all observers.
void InitCompleted();
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
enum CurrentState {
NOT_INITIALIZED, // Backend created but not initialized.
@@ -122,7 +122,7 @@ class ShortcutsBackend : public base::RefCountedThreadSafe<ShortcutsBackend>,
// This is a helper map for quick access to a shortcut by guid.
shortcuts_provider::GuidToShortcutsIteratorMap guid_map_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
// For some unit-test only.
bool no_db_access_;
diff --git a/chrome/browser/history/top_sites.cc b/chrome/browser/history/top_sites.cc
index 46b2b57..b5d2d12 100644
--- a/chrome/browser/history/top_sites.cc
+++ b/chrome/browser/history/top_sites.cc
@@ -150,7 +150,7 @@ TopSites::TopSites(Profile* profile)
if (NotificationService::current()) {
registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URLS_DELETED,
- Source<Profile>(profile_));
+ 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,
@@ -802,13 +802,13 @@ void TopSites::ProcessPendingCallbacks(
}
void TopSites::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (!loaded_)
return;
if (type == chrome::NOTIFICATION_HISTORY_URLS_DELETED) {
- Details<history::URLsDeletedDetails> deleted_details(details);
+ content::Details<history::URLsDeletedDetails> deleted_details(details);
if (deleted_details->all_history) {
SetTopSites(MostVisitedURLList());
backend_->ResetDatabase();
@@ -835,12 +835,12 @@ void TopSites::Observe(int type,
StartQueryForMostVisited();
} else if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
NavigationController* controller =
- Source<NavigationController>(source).ptr();
+ content::Source<NavigationController>(source).ptr();
Profile* profile = Profile::FromBrowserContext(
controller->tab_contents()->browser_context());
if (profile == profile_ && !IsFull()) {
content::LoadCommittedDetails* load_details =
- Details<content::LoadCommittedDetails>(details).ptr();
+ content::Details<content::LoadCommittedDetails>(details).ptr();
if (!load_details)
return;
const GURL& url = load_details->entry->url();
@@ -933,8 +933,8 @@ void TopSites::MoveStateToLoaded() {
ProcessPendingCallbacks(pending_callbacks, filtered_urls);
NotificationService::current()->Notify(chrome::NOTIFICATION_TOP_SITES_LOADED,
- Source<Profile>(profile_),
- Details<TopSites>(this));
+ content::Source<Profile>(profile_),
+ content::Details<TopSites>(this));
}
void TopSites::ResetThreadSafeCache() {
@@ -953,7 +953,7 @@ void TopSites::ResetThreadSafeImageCache() {
void TopSites::NotifyTopSitesChanged() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_TOP_SITES_CHANGED,
- Source<TopSites>(this),
+ content::Source<TopSites>(this),
NotificationService::NoDetails());
}
@@ -1027,8 +1027,8 @@ void TopSites::OnTopSitesAvailableFromHistory(
// Used only in testing.
NotificationService::current()->Notify(
chrome::NOTIFICATION_TOP_SITES_UPDATED,
- Source<TopSites>(this),
- Details<CancelableRequestProvider::Handle>(&handle));
+ content::Source<TopSites>(this),
+ content::Details<CancelableRequestProvider::Handle>(&handle));
}
} // namespace history
diff --git a/chrome/browser/history/top_sites.h b/chrome/browser/history/top_sites.h
index 4f441b8..b0fe903 100644
--- a/chrome/browser/history/top_sites.h
+++ b/chrome/browser/history/top_sites.h
@@ -50,7 +50,7 @@ class TopSitesTest;
// db using TopSitesBackend.
class TopSites
: public base::RefCountedThreadSafe<TopSites>,
- public NotificationObserver,
+ public content::NotificationObserver,
public CancelableRequestProvider {
public:
explicit TopSites(Profile* profile);
@@ -278,10 +278,10 @@ class TopSites
const PendingCallbackSet& pending_callbacks,
const MostVisitedURLList& urls);
- // Implementation of NotificationObserver.
+ // Implementation of content::NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Resets top_sites_ and updates the db (in the background). All mutations to
// top_sites_ *must* go through this.
@@ -344,7 +344,7 @@ class TopSites
// The time we started |timer_| at. Only valid if |timer_| is running.
base::TimeTicks timer_start_time_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The number of URLs changed on the last update.
size_t last_num_urls_changed_;
diff --git a/chrome/browser/history/top_sites_unittest.cc b/chrome/browser/history/top_sites_unittest.cc
index 36bcf36..e82d406 100644
--- a/chrome/browser/history/top_sites_unittest.cc
+++ b/chrome/browser/history/top_sites_unittest.cc
@@ -1387,7 +1387,7 @@ TEST_F(TopSitesUnloadTest, UnloadWithMigration) {
// Create top sites and unload history.
ui_test_utils::WindowedNotificationObserver observer(
chrome::NOTIFICATION_TOP_SITES_LOADED,
- Source<Profile>(profile()));
+ content::Source<Profile>(profile()));
profile()->CreateTopSites();
profile()->GetHistoryService(Profile::EXPLICIT_ACCESS)->UnloadBackend();
profile()->BlockUntilHistoryProcessesPendingRequests();
diff --git a/chrome/browser/importer/importer_host.h b/chrome/browser/importer/importer_host.h
index 17c04c2..18235eb 100644
--- a/chrome/browser/importer/importer_host.h
+++ b/chrome/browser/importer/importer_host.h
@@ -14,8 +14,8 @@
#include "chrome/browser/bookmarks/base_bookmark_model_observer.h"
#include "chrome/browser/importer/importer_data_types.h"
#include "chrome/browser/importer/profile_writer.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/native_widget_types.h"
class FirefoxProfileLock;
@@ -31,7 +31,7 @@ class ImporterProgressObserver;
// the import process is done, ImporterHost deletes itself.
class ImporterHost : public base::RefCountedThreadSafe<ImporterHost>,
public BaseBookmarkModelObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
ImporterHost();
@@ -111,7 +111,7 @@ class ImporterHost : public base::RefCountedThreadSafe<ImporterHost>,
bool is_source_readable_;
// Receives notification when the TemplateURLService has loaded.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Writes data from the importer back to the profile.
scoped_refptr<ProfileWriter> writer_;
@@ -133,11 +133,11 @@ class ImporterHost : public base::RefCountedThreadSafe<ImporterHost>,
virtual void BookmarkModelBeingDeleted(BookmarkModel* model) OVERRIDE;
virtual void BookmarkModelChanged() OVERRIDE;
- // NotificationObserver:
+ // content::NotificationObserver:
// Called when TemplateURLService has been loaded.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// The task is the process of importing settings from other browsers.
base::Closure task_;
diff --git a/chrome/browser/infobars/infobar_container.h b/chrome/browser/infobars/infobar_container.h
index ff63fa5..bbc8978 100644
--- a/chrome/browser/infobars/infobar_container.h
+++ b/chrome/browser/infobars/infobar_container.h
@@ -9,8 +9,8 @@
#include <vector>
#include "base/compiler_specific.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "third_party/skia/include/core/SkColor.h"
class InfoBar;
@@ -24,7 +24,7 @@ class InfoBarTabHelper;
//
// Platforms need to subclass this to implement a few platform-specific
// functions, which are pure virtual here.
-class InfoBarContainer : public NotificationObserver {
+class InfoBarContainer : public content::NotificationObserver {
public:
class Delegate {
public:
@@ -95,10 +95,10 @@ class InfoBarContainer : public NotificationObserver {
private:
typedef std::vector<InfoBar*> InfoBars;
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Hides an InfoBar for the specified delegate, in response to a notification
// from the selected InfoBarTabHelper. The InfoBar's disappearance will be
@@ -122,7 +122,7 @@ class InfoBarContainer : public NotificationObserver {
void UpdateInfoBarArrowTargetHeights();
int ArrowTargetHeightForInfoBar(size_t infobar_index) const;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
Delegate* delegate_;
InfoBarTabHelper* tab_helper_;
InfoBars infobars_;
diff --git a/chrome/browser/infobars/infobar_tab_helper.cc b/chrome/browser/infobars/infobar_tab_helper.cc
index 12dbb27..02ef2eb 100644
--- a/chrome/browser/infobars/infobar_tab_helper.cc
+++ b/chrome/browser/infobars/infobar_tab_helper.cc
@@ -46,15 +46,16 @@ void InfoBarTabHelper::AddInfoBar(InfoBarDelegate* delegate) {
infobars_.push_back(delegate);
NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED,
- Source<InfoBarTabHelper>(this),
- Details<InfoBarAddedDetails>(delegate));
+ content::Source<InfoBarTabHelper>(this),
+ content::Details<InfoBarAddedDetails>(delegate));
// Add ourselves as an observer for navigations the first time a delegate is
// added. We use this notification to expire InfoBars that need to expire on
// page transitions.
if (infobars_.size() == 1) {
- registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(&tab_contents()->controller()));
+ registrar_.Add(
+ this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
+ content::Source<NavigationController>(&tab_contents()->controller()));
}
}
@@ -82,8 +83,8 @@ void InfoBarTabHelper::ReplaceInfoBar(InfoBarDelegate* old_delegate,
InfoBarReplacedDetails replaced_details(old_delegate, new_delegate);
NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REPLACED,
- Source<InfoBarTabHelper>(this),
- Details<InfoBarReplacedDetails>(&replaced_details));
+ content::Source<InfoBarTabHelper>(this),
+ content::Details<InfoBarReplacedDetails>(&replaced_details));
infobars_.erase(infobars_.begin() + i + 1);
}
@@ -111,14 +112,14 @@ void InfoBarTabHelper::RemoveInfoBarInternal(InfoBarDelegate* delegate,
InfoBarRemovedDetails removed_details(infobar, animate);
NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
- Source<InfoBarTabHelper>(this),
- Details<InfoBarRemovedDetails>(&removed_details));
+ content::Source<InfoBarTabHelper>(this),
+ content::Details<InfoBarRemovedDetails>(&removed_details));
infobars_.erase(infobars_.begin() + i);
// Remove ourselves as an observer if we are tracking no more InfoBars.
if (infobars_.empty()) {
registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(&tab_contents()->controller()));
+ content::Source<NavigationController>(&tab_contents()->controller()));
}
}
@@ -171,15 +172,15 @@ bool InfoBarTabHelper::OnMessageReceived(const IPC::Message& message) {
}
void InfoBarTabHelper::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_NAV_ENTRY_COMMITTED: {
DCHECK(&tab_contents()->controller() ==
- Source<NavigationController>(source).ptr());
+ content::Source<NavigationController>(source).ptr());
content::LoadCommittedDetails& committed_details =
- *(Details<content::LoadCommittedDetails>(details).ptr());
+ *(content::Details<content::LoadCommittedDetails>(details).ptr());
// NOTE: It is not safe to change the following code to count upwards or
// use iterators, as the RemoveInfoBar() call synchronously modifies our
diff --git a/chrome/browser/infobars/infobar_tab_helper.h b/chrome/browser/infobars/infobar_tab_helper.h
index 5fec0b6..d1332f0 100644
--- a/chrome/browser/infobars/infobar_tab_helper.h
+++ b/chrome/browser/infobars/infobar_tab_helper.h
@@ -8,14 +8,14 @@
#include "base/basictypes.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
class InfoBarDelegate;
class TabContents;
// Per-tab info bar manager.
class InfoBarTabHelper : public TabContentsObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit InfoBarTabHelper(TabContents* tab_contents);
virtual ~InfoBarTabHelper();
@@ -53,10 +53,10 @@ class InfoBarTabHelper : public TabContentsObserver,
virtual void RenderViewGone() OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- // NotificationObserver overrides:
+ // content::NotificationObserver overrides:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Helper functions for infobars:
TabContents* tab_contents() {
@@ -75,7 +75,7 @@ class InfoBarTabHelper : public TabContentsObserver,
std::vector<InfoBarDelegate*> infobars_;
bool infobars_enabled_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(InfoBarTabHelper);
};
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index 377969f..70c8fc3 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -188,7 +188,7 @@ bool InstantController::Update(TabContentsWrapper* tab_contents,
NotificationService::current()->Notify(
chrome::NOTIFICATION_INSTANT_CONTROLLER_UPDATED,
- Source<InstantController>(this),
+ content::Source<InstantController>(this),
NotificationService::NoDetails());
return true;
}
@@ -473,7 +473,7 @@ void InstantController::UpdateIsDisplayable() {
delegate_->ShowInstant(loader_->preview_contents());
NotificationService::current()->Notify(
chrome::NOTIFICATION_INSTANT_CONTROLLER_SHOWN,
- Source<InstantController>(this),
+ content::Source<InstantController>(this),
NotificationService::NoDetails());
}
}
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
index af74814..a593e02a 100644
--- a/chrome/browser/instant/instant_loader.cc
+++ b/chrome/browser/instant/instant_loader.cc
@@ -39,12 +39,12 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
#include "content/common/renderer_preferences.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 "net/http/http_util.h"
#include "ui/base/l10n/l10n_util.h"
@@ -86,7 +86,7 @@ const char* const InstantLoader::kInstantHeaderValue = "instant";
// FrameLoadObserver is responsible for determining if the page supports
// instant after it has loaded.
-class InstantLoader::FrameLoadObserver : public NotificationObserver {
+class InstantLoader::FrameLoadObserver : public content::NotificationObserver {
public:
FrameLoadObserver(InstantLoader* loader,
TabContents* tab_contents,
@@ -98,7 +98,7 @@ class InstantLoader::FrameLoadObserver : public NotificationObserver {
verbatim_(verbatim),
unique_id_(tab_contents_->controller().pending_entry()->unique_id()) {
registrar_.Add(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
- Source<TabContents>(tab_contents_));
+ content::Source<TabContents>(tab_contents_));
}
// Sets the text to send to the page.
@@ -107,10 +107,10 @@ class InstantLoader::FrameLoadObserver : public NotificationObserver {
// Sets whether verbatim results are obtained rather than predictive.
void set_verbatim(bool verbatim) { verbatim_ = verbatim; }
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
InstantLoader* loader_;
@@ -128,18 +128,18 @@ class InstantLoader::FrameLoadObserver : public NotificationObserver {
const int unique_id_;
// Registers and unregisters us for notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(FrameLoadObserver);
};
void InstantLoader::FrameLoadObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME: {
- int page_id = *(Details<int>(details).ptr());
+ int page_id = *(content::Details<int>(details).ptr());
NavigationEntry* active_entry =
tab_contents_->controller().GetActiveEntry();
if (!active_entry || active_entry->page_id() != page_id ||
@@ -166,7 +166,7 @@ class InstantLoader::TabContentsDelegateImpl
: public TabContentsDelegate,
public TabContentsWrapperDelegate,
public ConstrainedWindowTabHelperDelegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public TabContentsObserver {
public:
explicit TabContentsDelegateImpl(InstantLoader* loader);
@@ -196,8 +196,8 @@ class InstantLoader::TabContentsDelegateImpl
// NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// TabContentsDelegate:
virtual void NavigationStateChanged(const TabContents* source,
@@ -252,7 +252,7 @@ class InstantLoader::TabContentsDelegateImpl
InstantLoader* loader_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// If we are registered for paint notifications on a RenderWidgetHost this
// will contain a pointer to it.
@@ -287,9 +287,10 @@ InstantLoader::TabContentsDelegateImpl::TabContentsDelegateImpl(
user_typed_before_load_(false) {
DCHECK(loader->preview_contents());
registrar_.Add(this, content::NOTIFICATION_INTERSTITIAL_ATTACHED,
- Source<TabContents>(loader->preview_contents()->tab_contents()));
+ content::Source<TabContents>(loader->preview_contents()->tab_contents()));
registrar_.Add(this, content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR,
- Source<NavigationController>(&loader->preview_contents()->controller()));
+ content::Source<NavigationController>(
+ &loader->preview_contents()->controller()));
}
void InstantLoader::TabContentsDelegateImpl::PrepareForNewLoad() {
@@ -370,8 +371,8 @@ void InstantLoader::TabContentsDelegateImpl::RegisterForPaintNotifications(
RenderWidgetHost* render_widget_host) {
DCHECK(registered_render_widget_host_ == NULL);
registered_render_widget_host_ = render_widget_host;
- Source<RenderWidgetHost> source =
- Source<RenderWidgetHost>(registered_render_widget_host_);
+ content::Source<RenderWidgetHost> source =
+ content::Source<RenderWidgetHost>(registered_render_widget_host_);
registrar_.Add(this, content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT,
source);
registrar_.Add(this, content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
@@ -380,8 +381,8 @@ void InstantLoader::TabContentsDelegateImpl::RegisterForPaintNotifications(
void InstantLoader::TabContentsDelegateImpl::UnregisterForPaintNotifications() {
if (registered_render_widget_host_) {
- Source<RenderWidgetHost> source =
- Source<RenderWidgetHost>(registered_render_widget_host_);
+ content::Source<RenderWidgetHost> source =
+ content::Source<RenderWidgetHost>(registered_render_widget_host_);
registrar_.Remove(this, content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT,
source);
registrar_.Remove(this, content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
@@ -392,11 +393,12 @@ void InstantLoader::TabContentsDelegateImpl::UnregisterForPaintNotifications() {
void InstantLoader::TabContentsDelegateImpl::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR:
- if (Details<ProvisionalLoadDetails>(details)->url() == loader_->url_) {
+ if (content::Details<ProvisionalLoadDetails>(details)->url() ==
+ loader_->url_) {
// This typically happens with downloads (which are disabled with
// instant active). To ensure the download happens when the user presses
// enter we set needs_reload_ to true, which triggers a reload.
@@ -563,7 +565,7 @@ void InstantLoader::TabContentsDelegateImpl::OnInstantSupportDetermined(
page_id != source->controller().GetActiveEntry()->page_id())
return;
- Details<const bool> details(&result);
+ content::Details<const bool> details(&result);
NotificationService::current()->Notify(
chrome::NOTIFICATION_INSTANT_SUPPORT_DETERMINED,
NotificationService::AllSources(),
@@ -767,7 +769,8 @@ TabContentsWrapper* InstantLoader::ReleasePreviewContents(
registrar_.Remove(
this,
content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
- Source<NavigationController>(&preview_contents_->controller()));
+ content::Source<NavigationController>(
+ &preview_contents_->controller()));
#endif
}
preview_contents_->tab_contents()->set_delegate(NULL);
@@ -808,8 +811,8 @@ bool InstantLoader::IsNavigationPending() const {
}
void InstantLoader::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
#if defined(OS_MACOSX)
if (type == content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED) {
if (preview_contents_->tab_contents()->GetRenderWidgetHostView()) {
@@ -821,7 +824,7 @@ void InstantLoader::Observe(int type,
#endif
if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
content::LoadCommittedDetails* load_details =
- Details<content::LoadCommittedDetails>(details).ptr();
+ content::Details<content::LoadCommittedDetails>(details).ptr();
if (load_details->is_main_frame) {
if (load_details->http_status_code == kHostBlacklistStatusCode) {
delegate_->AddToBlacklist(this, load_details->entry->url());
@@ -982,13 +985,14 @@ void InstantLoader::ReplacePreviewContents(TabContentsWrapper* old_tc,
old_tc->set_delegate(NULL);
#if defined(OS_MACOSX)
- registrar_.Remove(this,
- content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
- Source<NavigationController>(&old_tc->controller()));
+ registrar_.Remove(
+ this,
+ content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
+ content::Source<NavigationController>(&old_tc->controller()));
#endif
registrar_.Remove(this,
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(&old_tc->controller()));
+ content::Source<NavigationController>(&old_tc->controller()));
// We prerendered so we should be ready to show. If we're ready, swap in
// immediately, otherwise show the preview as normal.
@@ -1024,13 +1028,13 @@ void InstantLoader::SetupPreviewContents(TabContentsWrapper* tab_contents) {
registrar_.Add(
this,
content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
- Source<NavigationController>(&preview_contents_->controller()));
+ content::Source<NavigationController>(&preview_contents_->controller()));
#endif
registrar_.Add(
this,
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(&preview_contents_->controller()));
+ content::Source<NavigationController>(&preview_contents_->controller()));
gfx::Rect tab_bounds;
tab_contents->view()->GetContainerBounds(&tab_bounds);
diff --git a/chrome/browser/instant/instant_loader.h b/chrome/browser/instant/instant_loader.h
index d19ed71..a1fe6c1 100644
--- a/chrome/browser/instant/instant_loader.h
+++ b/chrome/browser/instant/instant_loader.h
@@ -13,8 +13,8 @@
#include "chrome/browser/instant/instant_commit_type.h"
#include "chrome/browser/search_engines/template_url_id.h"
#include "chrome/common/instant_types.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/common/page_transition_types.h"
#include "googleurl/src/gurl.h"
#include "ui/gfx/rect.h"
@@ -35,7 +35,7 @@ class TemplateURL;
//
// If the TemplateURLID supplied to the constructor is zero, then the url is
// loaded as is.
-class InstantLoader : public NotificationObserver {
+class InstantLoader : public content::NotificationObserver {
public:
// Header and value set on loads that originate from instant.
static const char* const kInstantHeader;
@@ -82,10 +82,10 @@ class InstantLoader : public NotificationObserver {
// pending NavigationEntry.
bool IsNavigationPending() const;
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// The preview TabContents; may be null.
TabContentsWrapper* preview_contents() const {
@@ -231,7 +231,7 @@ class InstantLoader : public NotificationObserver {
base::OneShotTimer<InstantLoader> update_bounds_timer_;
// Used to get notifications about renderers coming and going.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Last value of verbatim passed to |Update|.
bool verbatim_;
diff --git a/chrome/browser/intranet_redirect_detector.h b/chrome/browser/intranet_redirect_detector.h
index 7111eb5..108d521 100644
--- a/chrome/browser/intranet_redirect_detector.h
+++ b/chrome/browser/intranet_redirect_detector.h
@@ -10,9 +10,9 @@
#include <string>
#include <vector>
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
#include "content/common/net/url_fetcher.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
#include "net/base/host_resolver_proc.h"
#include "net/base/network_change_notifier.h"
diff --git a/chrome/browser/jumplist_win.cc b/chrome/browser/jumplist_win.cc
index 8ab2eb3..5f22169 100644
--- a/chrome/browser/jumplist_win.cc
+++ b/chrome/browser/jumplist_win.cc
@@ -524,19 +524,19 @@ bool JumpList::AddObserver(Profile* profile) {
// Register for notification when TopSites changes so that we can update
// ourself.
registrar_.Add(this, chrome::NOTIFICATION_TOP_SITES_CHANGED,
- Source<history::TopSites>(top_sites));
+ content::Source<history::TopSites>(top_sites));
// Register for notification when profile is destroyed to ensure that all
// observers are detatched at that time.
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
tab_restore_service->AddObserver(this);
return true;
}
void JumpList::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_TOP_SITES_CHANGED: {
// Most visited urls changed, query again.
@@ -565,10 +565,12 @@ void JumpList::RemoveObserver() {
TabRestoreServiceFactory::GetForProfile(profile_);
if (tab_restore_service)
tab_restore_service->RemoveObserver(this);
- registrar_.Remove(this, chrome::NOTIFICATION_TOP_SITES_CHANGED,
- Source<history::TopSites>(profile_->GetTopSites()));
- registrar_.Remove(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
- Source<Profile>(profile_));
+ registrar_.Remove(
+ this, chrome::NOTIFICATION_TOP_SITES_CHANGED,
+ content::Source<history::TopSites>(profile_->GetTopSites()));
+ registrar_.Remove(
+ this, chrome::NOTIFICATION_PROFILE_DESTROYED,
+ content::Source<Profile>(profile_));
}
profile_ = NULL;
}
diff --git a/chrome/browser/jumplist_win.h b/chrome/browser/jumplist_win.h
index 22f49ad..7f02788 100644
--- a/chrome/browser/jumplist_win.h
+++ b/chrome/browser/jumplist_win.h
@@ -102,15 +102,15 @@ typedef std::vector<scoped_refptr<ShellLinkItem> > ShellLinkItemList;
// update it in a UI thread. To solve this problem, this class posts to a
// runnable method when it actually updates a JumpList.
class JumpList : public TabRestoreServiceObserver,
- public NotificationObserver,
+ public content::NotificationObserver,
public base::RefCountedThreadSafe<JumpList> {
public:
JumpList();
// NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Registers (or unregisters) this object as an observer.
// When the TabRestoreService object notifies the tab status is changed, this
@@ -204,7 +204,7 @@ class JumpList : public TabRestoreServiceObserver,
// The Profile object is used to listen for events
Profile* profile_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// App id to associate with the jump list.
std::wstring app_id_;
diff --git a/chrome/browser/memory_purger.cc b/chrome/browser/memory_purger.cc
index de667d1..6d3f561 100644
--- a/chrome/browser/memory_purger.cc
+++ b/chrome/browser/memory_purger.cc
@@ -65,7 +65,7 @@ void PurgeMemoryIOHelper::PurgeMemoryOnIOThread() {
// The appcache and safe browsing services listen for this notification.
NotificationService::current()->Notify(
content::NOTIFICATION_PURGE_MEMORY,
- Source<void>(NULL),
+ content::Source<void>(NULL),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index 2d21539..674c4af 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -455,43 +455,44 @@ bool MetricsService::reporting_active() const {
}
// static
-void MetricsService::SetUpNotifications(NotificationRegistrar* registrar,
- NotificationObserver* observer) {
- registrar->Add(observer, chrome::NOTIFICATION_BROWSER_OPENED,
- NotificationService::AllBrowserContextsAndSources());
- registrar->Add(observer, chrome::NOTIFICATION_BROWSER_CLOSED,
- NotificationService::AllSources());
- registrar->Add(observer, content::NOTIFICATION_USER_ACTION,
- NotificationService::AllSources());
- registrar->Add(observer, content::NOTIFICATION_TAB_PARENTED,
- NotificationService::AllSources());
- registrar->Add(observer, content::NOTIFICATION_TAB_CLOSING,
- NotificationService::AllSources());
- registrar->Add(observer, content::NOTIFICATION_LOAD_START,
- NotificationService::AllSources());
- registrar->Add(observer, content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
- registrar->Add(observer, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- NotificationService::AllSources());
- registrar->Add(observer, content::NOTIFICATION_RENDERER_PROCESS_HANG,
- NotificationService::AllSources());
- registrar->Add(observer, content::NOTIFICATION_CHILD_PROCESS_HOST_CONNECTED,
- NotificationService::AllSources());
- registrar->Add(observer, content::NOTIFICATION_CHILD_INSTANCE_CREATED,
- NotificationService::AllSources());
- registrar->Add(observer, content::NOTIFICATION_CHILD_PROCESS_CRASHED,
- NotificationService::AllSources());
- registrar->Add(observer, chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED,
- NotificationService::AllSources());
- registrar->Add(observer, chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
- NotificationService::AllSources());
- registrar->Add(observer, chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
- NotificationService::AllBrowserContextsAndSources());
+void MetricsService::SetUpNotifications(
+ content::NotificationRegistrar* registrar,
+ content::NotificationObserver* observer) {
+ registrar->Add(observer, chrome::NOTIFICATION_BROWSER_OPENED,
+ NotificationService::AllBrowserContextsAndSources());
+ registrar->Add(observer, chrome::NOTIFICATION_BROWSER_CLOSED,
+ NotificationService::AllSources());
+ registrar->Add(observer, content::NOTIFICATION_USER_ACTION,
+ NotificationService::AllSources());
+ registrar->Add(observer, content::NOTIFICATION_TAB_PARENTED,
+ NotificationService::AllSources());
+ registrar->Add(observer, content::NOTIFICATION_TAB_CLOSING,
+ NotificationService::AllSources());
+ registrar->Add(observer, content::NOTIFICATION_LOAD_START,
+ NotificationService::AllSources());
+ registrar->Add(observer, content::NOTIFICATION_LOAD_STOP,
+ NotificationService::AllSources());
+ registrar->Add(observer, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
+ NotificationService::AllSources());
+ registrar->Add(observer, content::NOTIFICATION_RENDERER_PROCESS_HANG,
+ NotificationService::AllSources());
+ registrar->Add(observer, content::NOTIFICATION_CHILD_PROCESS_HOST_CONNECTED,
+ NotificationService::AllSources());
+ registrar->Add(observer, content::NOTIFICATION_CHILD_INSTANCE_CREATED,
+ NotificationService::AllSources());
+ registrar->Add(observer, content::NOTIFICATION_CHILD_PROCESS_CRASHED,
+ NotificationService::AllSources());
+ registrar->Add(observer, chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED,
+ NotificationService::AllSources());
+ registrar->Add(observer, chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
+ NotificationService::AllSources());
+ registrar->Add(observer, chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
+ NotificationService::AllBrowserContextsAndSources());
}
void MetricsService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(log_manager_.current_log());
DCHECK(IsSingleThreaded());
@@ -501,7 +502,7 @@ void MetricsService::Observe(int type,
switch (type) {
case content::NOTIFICATION_USER_ACTION:
log_manager_.current_log()->RecordUserAction(
- *Details<const char*>(details).ptr());
+ *content::Details<const char*>(details).ptr());
break;
case chrome::NOTIFICATION_BROWSER_OPENED:
@@ -524,8 +525,10 @@ void MetricsService::Observe(int type,
case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: {
RenderProcessHost::RendererClosedDetails* process_details =
- Details<RenderProcessHost::RendererClosedDetails>(details).ptr();
- RenderProcessHost* host = Source<RenderProcessHost>(source).ptr();
+ content::Details<RenderProcessHost::RendererClosedDetails>(
+ details).ptr();
+ RenderProcessHost* host =
+ content::Source<RenderProcessHost>(source).ptr();
LogRendererCrash(
host, process_details->status, process_details->was_alive);
}
@@ -542,19 +545,19 @@ void MetricsService::Observe(int type,
break;
case chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED:
- LogKeywords(Source<TemplateURLService>(source).ptr());
+ LogKeywords(content::Source<TemplateURLService>(source).ptr());
break;
case chrome::NOTIFICATION_OMNIBOX_OPENED_URL: {
MetricsLog* current_log = log_manager_.current_log()->AsMetricsLog();
DCHECK(current_log);
current_log->RecordOmniboxOpenedURL(
- *Details<AutocompleteLog>(details).ptr());
+ *content::Details<AutocompleteLog>(details).ptr());
break;
}
case chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED: {
- Profile* p = Source<Profile>(source).ptr();
+ Profile* p = content::Source<Profile>(source).ptr();
if (p)
LogBookmarks(p->GetBookmarkModel());
break;
@@ -1154,9 +1157,10 @@ void MetricsService::LogBadResponseCode() {
}
}
-void MetricsService::LogWindowChange(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void MetricsService::LogWindowChange(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
int controller_id = -1;
uintptr_t window_or_tab = source.map_key();
MetricsLog::WindowEventType window_type;
@@ -1193,9 +1197,10 @@ void MetricsService::LogWindowChange(int type,
log_manager_.current_log()->RecordWindowEvent(window_type, controller_id, 0);
}
-void MetricsService::LogLoadComplete(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void MetricsService::LogLoadComplete(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (details == NotificationService::NoDetails())
return;
@@ -1204,7 +1209,7 @@ void MetricsService::LogLoadComplete(int type,
UMA_HISTOGRAM_COUNTS("UMA.LogLoadComplete called", 1);
return;
- const Details<LoadNotificationDetails> load_details(details);
+ const content::Details<LoadNotificationDetails> load_details(details);
int controller_id = window_map_[details.map_key()];
log_manager_.current_log()->RecordLoadEvent(controller_id,
load_details->url(),
@@ -1328,9 +1333,9 @@ void MetricsService::LogChromeOSCrash(const std::string &crash_type) {
void MetricsService::LogChildProcessChange(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
- Details<ChildProcessInfo> child_details(details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ content::Details<ChildProcessInfo> child_details(details);
const string16& child_name = child_details->name();
if (child_process_stats_buffer_.find(child_name) ==
@@ -1490,9 +1495,10 @@ void MetricsService::RecordPluginChanges(PrefService* pref) {
child_process_stats_buffer_.clear();
}
-bool MetricsService::CanLogNotification(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+bool MetricsService::CanLogNotification(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
// We simply don't log anything to UMA if there is a single incognito
// session visible. The problem is that we always notify using the orginal
// profile in order to simplify notification processing.
diff --git a/chrome/browser/metrics/metrics_service.h b/chrome/browser/metrics/metrics_service.h
index c5a0b76..fc91621 100644
--- a/chrome/browser/metrics/metrics_service.h
+++ b/chrome/browser/metrics/metrics_service.h
@@ -19,9 +19,9 @@
#include "base/process_util.h"
#include "chrome/browser/io_thread.h"
#include "chrome/common/metrics_helpers.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
#include "content/common/net/url_fetcher.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/external_metrics.h"
@@ -51,7 +51,7 @@ struct WebPluginInfo;
}
-class MetricsService : public NotificationObserver,
+class MetricsService : public content::NotificationObserver,
public URLFetcher::Delegate,
public MetricsServiceBase {
public:
@@ -77,13 +77,13 @@ class MetricsService : public NotificationObserver,
// Set up notifications which indicate that a user is performing work. This is
// useful to allow some features to sleep, until the machine becomes active,
// such as precluding UMA uploads unless there was recent activity.
- static void SetUpNotifications(NotificationRegistrar* registrar,
- NotificationObserver* observer);
+ static void SetUpNotifications(content::NotificationRegistrar* registrar,
+ content::NotificationObserver* observer);
- // Implementation of NotificationObserver
+ // Implementation of content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Invoked when we get a WM_SESSIONEND. This places a value in prefs that is
// reset when RecordCompletedSessionEnd is invoked.
@@ -244,8 +244,8 @@ class MetricsService : public NotificationObserver,
// Records a window-related notification.
void LogWindowChange(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Reads, increments and then sets the specified integer preference.
void IncrementPrefValue(const char* path);
@@ -279,8 +279,8 @@ class MetricsService : public NotificationObserver,
// in-object buffer because these notifications are sent on page load, and we
// don't want to slow that down.
void LogChildProcessChange(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Logs keywords specific metrics. Keyword metrics are recorded in the
// profile specific metrics.
@@ -299,18 +299,18 @@ class MetricsService : public NotificationObserver,
// Records a page load notification.
void LogLoadComplete(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Checks whether a notification can be logged.
bool CanLogNotification(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Sets the value of the specified path in prefs and schedules a save.
void RecordBooleanPrefValue(const char* path, bool value);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Indicate whether recording and reporting are currently happening.
// These should not be set directly, but by calling SetRecording and
diff --git a/chrome/browser/metrics/thread_watcher.cc b/chrome/browser/metrics/thread_watcher.cc
index 8fe98bc..0812fab 100644
--- a/chrome/browser/metrics/thread_watcher.cc
+++ b/chrome/browser/metrics/thread_watcher.cc
@@ -595,9 +595,10 @@ void ThreadWatcherObserver::RemoveNotifications() {
delete g_thread_watcher_observer_;
}
-void ThreadWatcherObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ThreadWatcherObserver::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
// There is some user activity, see if thread watchers are to be awakened.
base::TimeTicks now = base::TimeTicks::Now();
if ((now - last_wakeup_time_) < wakeup_interval_)
diff --git a/chrome/browser/metrics/thread_watcher.h b/chrome/browser/metrics/thread_watcher.h
index 703713a..2364275 100644
--- a/chrome/browser/metrics/thread_watcher.h
+++ b/chrome/browser/metrics/thread_watcher.h
@@ -60,8 +60,8 @@
#include "base/threading/watchdog.h"
#include "base/time.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class CustomThreadWatcher;
class StartupTimeBomb;
@@ -409,7 +409,7 @@ class ThreadWatcherList {
// This class ensures that the thread watching is actively taking place. Only
// one instance of this class exists.
-class ThreadWatcherObserver : public NotificationObserver {
+class ThreadWatcherObserver : public content::NotificationObserver {
public:
// Registers |g_thread_watcher_observer_| as the Notifications observer.
// |wakeup_interval| specifies how often to wake up thread watchers. This
@@ -429,18 +429,18 @@ class ThreadWatcherObserver : public NotificationObserver {
// This ensures all thread watchers are active because there is some user
// activity. It will wake up all thread watchers every |wakeup_interval_|
- // seconds. This is the implementation of NotificationObserver. When a
- // matching notification is posted to the notification service, this method is
- // called.
+ // seconds. This is the implementation of content::NotificationObserver. When
+ // a matching notification is posted to the notification service, this method
+ // is called.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// The singleton of this class.
static ThreadWatcherObserver* g_thread_watcher_observer_;
// The registrar that holds ints to be observed.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// This is the last time when woke all thread watchers up.
base::TimeTicks last_wakeup_time_;
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc
index 5124580..78ca969 100644
--- a/chrome/browser/net/chrome_url_request_context.cc
+++ b/chrome/browser/net/chrome_url_request_context.cc
@@ -256,16 +256,16 @@ void ChromeURLRequestContextGetter::CleanupOnUIThread() {
registrar_.RemoveAll();
}
-// NotificationObserver implementation.
+// content::NotificationObserver implementation.
void ChromeURLRequestContextGetter::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (chrome::NOTIFICATION_PREF_CHANGED == type) {
- std::string* pref_name_in = Details<std::string>(details).ptr();
- PrefService* prefs = Source<PrefService>(source).ptr();
+ std::string* pref_name_in = content::Details<std::string>(details).ptr();
+ PrefService* prefs = content::Source<PrefService>(source).ptr();
DCHECK(pref_name_in && prefs);
if (*pref_name_in == prefs::kAcceptLanguages) {
std::string accept_language =
diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h
index b8d5a16..aa469f5 100644
--- a/chrome/browser/net/chrome_url_request_context.h
+++ b/chrome/browser/net/chrome_url_request_context.h
@@ -11,8 +11,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
@@ -90,7 +90,7 @@ class ChromeURLRequestContext : public net::URLRequestContext {
// Most methods are expected to be called on the UI thread, except for
// the destructor and GetURLRequestContext().
class ChromeURLRequestContextGetter : public net::URLRequestContextGetter,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// Constructs a ChromeURLRequestContextGetter that will use |factory| to
// create the ChromeURLRequestContext. If |profile| is non-NULL, then the
@@ -159,10 +159,10 @@ class ChromeURLRequestContextGetter : public net::URLRequestContextGetter,
// thread before the instance is deleted on the IO thread.
void CleanupOnUIThread();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// Must be called on the IO thread.
diff --git a/chrome/browser/net/gaia/gaia_oauth_fetcher.cc b/chrome/browser/net/gaia/gaia_oauth_fetcher.cc
index 1ab44ce..828ca7f 100644
--- a/chrome/browser/net/gaia/gaia_oauth_fetcher.cc
+++ b/chrome/browser/net/gaia/gaia_oauth_fetcher.cc
@@ -22,8 +22,8 @@
#include "chrome/common/net/gaia/google_service_auth_error.h"
#include "chrome/common/net/gaia/oauth_request_signer.h"
#include "chrome/common/net/http_return.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "grit/chromium_strings.h"
#include "net/base/load_flags.h"
#include "net/url_request/url_request_context_getter.h"
@@ -309,7 +309,7 @@ void GaiaOAuthFetcher::StartGetOAuthToken() {
fetch_pending_ = true;
registrar_.Add(this,
chrome::NOTIFICATION_COOKIE_CHANGED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
Browser* browser = BrowserList::GetLastActiveWithProfile(profile_);
DCHECK(browser);
@@ -324,7 +324,7 @@ void GaiaOAuthFetcher::StartGetOAuthToken() {
DCHECK(popup_ && popup_ != browser);
registrar_.Add(this,
chrome::NOTIFICATION_BROWSER_CLOSING,
- Source<Browser>(popup_));
+ content::Source<Browser>(popup_));
}
void GaiaOAuthFetcher::StartOAuthLogin(
@@ -481,17 +481,17 @@ GoogleServiceAuthError GaiaOAuthFetcher::GenerateAuthError(
}
void GaiaOAuthFetcher::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_COOKIE_CHANGED: {
- OnCookieChanged(Source<Profile>(source).ptr(),
- Details<ChromeCookieDetails>(details).ptr());
+ OnCookieChanged(content::Source<Profile>(source).ptr(),
+ content::Details<ChromeCookieDetails>(details).ptr());
break;
}
case chrome::NOTIFICATION_BROWSER_CLOSING: {
- OnBrowserClosing(Source<Browser>(source).ptr(),
- *(Details<bool>(details)).ptr());
+ OnBrowserClosing(content::Source<Browser>(source).ptr(),
+ *(content::Details<bool>(details)).ptr());
break;
}
default: {
diff --git a/chrome/browser/net/gaia/gaia_oauth_fetcher.h b/chrome/browser/net/gaia/gaia_oauth_fetcher.h
index c77f670..77830b2 100644
--- a/chrome/browser/net/gaia/gaia_oauth_fetcher.h
+++ b/chrome/browser/net/gaia/gaia_oauth_fetcher.h
@@ -12,8 +12,8 @@
#include "chrome/browser/net/chrome_cookie_notification_details.h"
#include "chrome/browser/net/gaia/gaia_oauth_consumer.h"
#include "content/common/net/url_fetcher.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
struct ChromeCookieDetails;
@@ -39,7 +39,7 @@ class Profile;
// This class can handle one request at a time, and all calls through an
// instance should be serialized.
class GaiaOAuthFetcher : public URLFetcher::Delegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// Defines steps of OAuth process performed by this class.
typedef enum {
@@ -115,10 +115,10 @@ class GaiaOAuthFetcher : public URLFetcher::Delegate,
// StartOAuthWrapBridge).
virtual void StartOAuthRevokeWrapToken(const std::string& token);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Called when a cookie, e. g. oauth_token, changes
virtual void OnCookieChanged(Profile* profile,
@@ -243,7 +243,7 @@ class GaiaOAuthFetcher : public URLFetcher::Delegate,
net::URLRequestContextGetter* const getter_;
Profile* profile_;
Browser* popup_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// While a fetch is going on:
scoped_ptr<URLFetcher> fetcher_;
diff --git a/chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc b/chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc
index 259e788..48f160c 100644
--- a/chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc
+++ b/chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc
@@ -125,8 +125,8 @@ TEST(GaiaOAuthFetcherTest, GetOAuthToken) {
oauth_fetcher.Observe(
chrome::NOTIFICATION_COOKIE_CHANGED,
- Source<Profile>(&profile),
- Details<ChromeCookieDetails>(cookie_details.get()));
+ content::Source<Profile>(&profile),
+ content::Details<ChromeCookieDetails>(cookie_details.get()));
}
#endif // 0 // Suppressing for now
diff --git a/chrome/browser/net/gaia/token_service.cc b/chrome/browser/net/gaia/token_service.cc
index 0ad60c9..6e546d3 100644
--- a/chrome/browser/net/gaia/token_service.cc
+++ b/chrome/browser/net/gaia/token_service.cc
@@ -13,7 +13,7 @@
#include "chrome/common/net/gaia/gaia_constants.h"
#include "content/browser/browser_thread.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "net/url_request/url_request_context_getter.h"
// Unfortunately kNumServices must be defined in the .h.
@@ -81,7 +81,7 @@ void TokenService::Initialize(const char* const source,
registrar_.Add(this,
chrome::NOTIFICATION_TOKEN_UPDATED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
}
void TokenService::ResetCredentialsInMemory() {
@@ -230,8 +230,8 @@ void TokenService::FireTokenAvailableNotification(
TokenAvailableDetails details(service, auth_token);
NotificationService::current()->Notify(
chrome::NOTIFICATION_TOKEN_AVAILABLE,
- Source<TokenService>(this),
- Details<const TokenAvailableDetails>(&details));
+ content::Source<TokenService>(this),
+ content::Details<const TokenAvailableDetails>(&details));
}
void TokenService::FireTokenRequestFailedNotification(
@@ -241,8 +241,8 @@ void TokenService::FireTokenRequestFailedNotification(
TokenRequestFailedDetails details(service, error);
NotificationService::current()->Notify(
chrome::NOTIFICATION_TOKEN_REQUEST_FAILED,
- Source<TokenService>(this),
- Details<const TokenRequestFailedDetails>(&details));
+ content::Source<TokenService>(this),
+ content::Details<const TokenRequestFailedDetails>(&details));
}
void TokenService::IssueAuthTokenForTest(const std::string& service,
@@ -317,7 +317,7 @@ void TokenService::OnWebDataServiceRequestDone(WebDataService::Handle h,
NotificationService::current()->Notify(
chrome::NOTIFICATION_TOKEN_LOADING_FINISHED,
- Source<TokenService>(this),
+ content::Source<TokenService>(this),
NotificationService::NoDetails());
}
@@ -408,10 +408,10 @@ void TokenService::LoadTokensIntoMemory(
}
void TokenService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(type, chrome::NOTIFICATION_TOKEN_UPDATED);
TokenAvailableDetails* tok_details =
- Details<TokenAvailableDetails>(details).ptr();
+ content::Details<TokenAvailableDetails>(details).ptr();
OnIssueAuthTokenSuccess(tok_details->service(), tok_details->token());
}
diff --git a/chrome/browser/net/gaia/token_service.h b/chrome/browser/net/gaia/token_service.h
index 39967ad..f7662e5 100644
--- a/chrome/browser/net/gaia/token_service.h
+++ b/chrome/browser/net/gaia/token_service.h
@@ -47,8 +47,8 @@
#include "chrome/common/net/gaia/gaia_auth_consumer.h"
#include "chrome/common/net/gaia/gaia_auth_fetcher.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class Profile;
@@ -61,7 +61,7 @@ class URLRequestContextGetter;
class TokenService : public GaiaAuthConsumer,
public GaiaOAuthConsumer,
public WebDataServiceConsumer,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
TokenService();
virtual ~TokenService();
@@ -179,10 +179,10 @@ class TokenService : public GaiaAuthConsumer,
virtual void OnWebDataServiceRequestDone(WebDataService::Handle h,
const WDTypedResult* result);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
@@ -245,7 +245,7 @@ class TokenService : public GaiaAuthConsumer,
// Map from service to token.
std::map<std::string, std::string> token_map_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryBasic);
FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryAdvanced);
diff --git a/chrome/browser/net/gaia/token_service_unittest.cc b/chrome/browser/net/gaia/token_service_unittest.cc
index 72994c6..396873f 100644
--- a/chrome/browser/net/gaia/token_service_unittest.cc
+++ b/chrome/browser/net/gaia/token_service_unittest.cc
@@ -19,12 +19,13 @@ TokenAvailableTracker::TokenAvailableTracker() {}
TokenAvailableTracker::~TokenAvailableTracker() {}
-void TokenAvailableTracker::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void TokenAvailableTracker::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
TestNotificationTracker::Observe(type, source, details);
if (type == chrome::NOTIFICATION_TOKEN_AVAILABLE) {
- Details<const TokenService::TokenAvailableDetails> full = details;
+ content::Details<const TokenService::TokenAvailableDetails> full = details;
details_ = *full.ptr();
}
}
@@ -34,11 +35,12 @@ TokenFailedTracker::TokenFailedTracker() {}
TokenFailedTracker::~TokenFailedTracker() {}
void TokenFailedTracker::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
TestNotificationTracker::Observe(type, source, details);
if (type == chrome::NOTIFICATION_TOKEN_REQUEST_FAILED) {
- Details<const TokenService::TokenRequestFailedDetails> full = details;
+ content::Details<const TokenService::TokenRequestFailedDetails> full =
+ details;
details_ = *full.ptr();
}
}
@@ -68,9 +70,9 @@ void TokenServiceTestHarness::SetUp() {
WaitForDBLoadCompletion();
success_tracker_.ListenFor(chrome::NOTIFICATION_TOKEN_AVAILABLE,
- Source<TokenService>(&service_));
+ content::Source<TokenService>(&service_));
failure_tracker_.ListenFor(chrome::NOTIFICATION_TOKEN_REQUEST_FAILED,
- Source<TokenService>(&service_));
+ content::Source<TokenService>(&service_));
service_.Initialize("test", profile_.get());
}
diff --git a/chrome/browser/net/gaia/token_service_unittest.h b/chrome/browser/net/gaia/token_service_unittest.h
index ffb9396..689d3b5 100644
--- a/chrome/browser/net/gaia/token_service_unittest.h
+++ b/chrome/browser/net/gaia/token_service_unittest.h
@@ -14,8 +14,8 @@
#include "chrome/common/net/gaia/gaia_auth_consumer.h"
#include "chrome/test/base/signaling_task.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/test/test_notification_tracker.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -33,8 +33,8 @@ class TokenAvailableTracker : public TestNotificationTracker {
private:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
TokenService::TokenAvailableDetails details_;
};
@@ -50,8 +50,8 @@ class TokenFailedTracker : public TestNotificationTracker {
private:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
TokenService::TokenRequestFailedDetails details_;
};
diff --git a/chrome/browser/net/http_server_properties_manager.cc b/chrome/browser/net/http_server_properties_manager.cc
index 48c2adc..995456e 100644
--- a/chrome/browser/net/http_server_properties_manager.cc
+++ b/chrome/browser/net/http_server_properties_manager.cc
@@ -10,8 +10,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
namespace chrome_browser_net {
@@ -421,14 +421,15 @@ void HttpServerPropertiesManager::StartAlternateProtocolPrefsUpdateTimerOnIO(
&HttpServerPropertiesManager::UpdateAlternateProtocolPrefsFromCache);
}
-void HttpServerPropertiesManager::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void HttpServerPropertiesManager::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(type == chrome::NOTIFICATION_PREF_CHANGED);
- PrefService* prefs = Source<PrefService>(source).ptr();
+ PrefService* prefs = content::Source<PrefService>(source).ptr();
DCHECK(prefs == pref_service_);
- std::string* pref_name = Details<std::string>(details).ptr();
+ std::string* pref_name = content::Details<std::string>(details).ptr();
if (*pref_name == prefs::kSpdyServers) {
if (!setting_spdy_servers_)
ScheduleUpdateSpdyCacheOnUI();
diff --git a/chrome/browser/net/http_server_properties_manager.h b/chrome/browser/net/http_server_properties_manager.h
index b7d6bf0..a505de5 100644
--- a/chrome/browser/net/http_server_properties_manager.h
+++ b/chrome/browser/net/http_server_properties_manager.h
@@ -16,13 +16,11 @@
#include "base/timer.h"
#include "base/values.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "net/base/host_port_pair.h"
#include "net/http/http_server_properties.h"
#include "net/http/http_server_properties_impl.h"
-class NotificationDetails;
-class NotificationSource;
class PrefService;
namespace chrome_browser_net {
@@ -51,7 +49,7 @@ namespace chrome_browser_net {
// the actual update starts, and grab a WeakPtr.
class HttpServerPropertiesManager
: public net::HttpServerProperties,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// Create an instance of the HttpServerPropertiesManager. The lifetime of the
// PrefService objects must be longer than that of the
@@ -190,8 +188,8 @@ class HttpServerPropertiesManager
private:
// Callback for preference changes.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// ---------
// UI thread
diff --git a/chrome/browser/net/net_pref_observer.cc b/chrome/browser/net/net_pref_observer.cc
index 8d59995..c4d1d6a 100644
--- a/chrome/browser/net/net_pref_observer.cc
+++ b/chrome/browser/net/net_pref_observer.cc
@@ -12,7 +12,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_details.h"
+#include "content/public/browser/notification_details.h"
#include "net/http/http_stream_factory.h"
#include "net/url_request/url_request_throttler_manager.h"
@@ -49,11 +49,11 @@ NetPrefObserver::~NetPrefObserver() {
}
void NetPrefObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(type, chrome::NOTIFICATION_PREF_CHANGED);
- std::string* pref_name = Details<std::string>(details).ptr();
+ std::string* pref_name = content::Details<std::string>(details).ptr();
ApplySettings(pref_name);
}
diff --git a/chrome/browser/net/net_pref_observer.h b/chrome/browser/net/net_pref_observer.h
index 4d2ca47..8e15ce4 100644
--- a/chrome/browser/net/net_pref_observer.h
+++ b/chrome/browser/net/net_pref_observer.h
@@ -10,7 +10,7 @@
#include "base/basictypes.h"
#include "chrome/browser/prefs/pref_member.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
class Profile;
@@ -25,7 +25,7 @@ class PrerenderManager;
// Monitors network-related preferences for changes and applies them.
// The supplied PrefService must outlive this NetPrefObserver.
// Must be used only on the UI thread.
-class NetPrefObserver : public NotificationObserver {
+class NetPrefObserver : public content::NotificationObserver {
public:
// |prefs| must be non-NULL and |*prefs| must outlive this.
// |prerender_manager| may be NULL. If not, |*prerender_manager| must
@@ -35,10 +35,10 @@ class NetPrefObserver : public NotificationObserver {
chrome_browser_net::Predictor* predictor);
virtual ~NetPrefObserver();
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
static void RegisterPrefs(PrefService* prefs);
diff --git a/chrome/browser/net/pref_proxy_config_service.cc b/chrome/browser/net/pref_proxy_config_service.cc
index c726285..3305e6c 100644
--- a/chrome/browser/net/pref_proxy_config_service.cc
+++ b/chrome/browser/net/pref_proxy_config_service.cc
@@ -11,8 +11,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
PrefProxyConfigTracker::PrefProxyConfigTracker(PrefService* pref_service)
: pref_service_(pref_service) {
@@ -52,12 +52,13 @@ void PrefProxyConfigTracker::RemoveObserver(
observers_.RemoveObserver(observer);
}
-void PrefProxyConfigTracker::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void PrefProxyConfigTracker::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (type == chrome::NOTIFICATION_PREF_CHANGED &&
- Source<PrefService>(source).ptr() == pref_service_) {
+ content::Source<PrefService>(source).ptr() == pref_service_) {
net::ProxyConfig new_config;
ConfigState config_state = ReadPrefConfig(&new_config);
BrowserThread::PostTask(
diff --git a/chrome/browser/net/pref_proxy_config_service.h b/chrome/browser/net/pref_proxy_config_service.h
index a7678b7..3f9ee75 100644
--- a/chrome/browser/net/pref_proxy_config_service.h
+++ b/chrome/browser/net/pref_proxy_config_service.h
@@ -11,7 +11,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "chrome/browser/prefs/proxy_config_dictionary.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "net/proxy/proxy_config.h"
#include "net/proxy/proxy_config_service.h"
@@ -23,7 +23,7 @@ class PrefSetObserver;
// PrefProxyConfigService to use.
class PrefProxyConfigTracker
: public base::RefCountedThreadSafe<PrefProxyConfigTracker>,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// Observer interface used to send out notifications on the IO thread about
// changes to the proxy configuration.
@@ -62,10 +62,10 @@ class PrefProxyConfigTracker
friend class base::RefCountedThreadSafe<PrefProxyConfigTracker>;
virtual ~PrefProxyConfigTracker();
- // NotificationObserver implementation:
+ // content::NotificationObserver implementation:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Install a new configuration. This is invoked on the IO thread to update
// the internal state after handling a pref change on the UI thread.
diff --git a/chrome/browser/net/ssl_config_service_manager_pref.cc b/chrome/browser/net/ssl_config_service_manager_pref.cc
index 48a6d27..8c538ba 100644
--- a/chrome/browser/net/ssl_config_service_manager_pref.cc
+++ b/chrome/browser/net/ssl_config_service_manager_pref.cc
@@ -17,8 +17,8 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "net/base/ssl_cipher_suite_names.h"
#include "net/base/ssl_config_service.h"
@@ -108,7 +108,7 @@ void SSLConfigServicePref::SetNewSSLConfig(
// The manager for holding and updating an SSLConfigServicePref instance.
class SSLConfigServiceManagerPref
: public SSLConfigServiceManager,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit SSLConfigServiceManagerPref(PrefService* local_state);
virtual ~SSLConfigServiceManagerPref() {}
@@ -122,8 +122,8 @@ class SSLConfigServiceManagerPref
// Callback for preference changes. This will post the changes to the IO
// thread with SetNewSSLConfig.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Store SSL config settings in |config|, directly from the preferences. Must
// only be called from UI thread.
@@ -174,13 +174,14 @@ net::SSLConfigService* SSLConfigServiceManagerPref::Get() {
return ssl_config_service_;
}
-void SSLConfigServiceManagerPref::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void SSLConfigServiceManagerPref::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- std::string* pref_name_in = Details<std::string>(details).ptr();
- PrefService* prefs = Source<PrefService>(source).ptr();
+ std::string* pref_name_in = content::Details<std::string>(details).ptr();
+ PrefService* prefs = content::Source<PrefService>(source).ptr();
DCHECK(pref_name_in && prefs);
if (*pref_name_in == prefs::kCipherSuiteBlacklist)
OnDisabledCipherSuitesChange(prefs);
diff --git a/chrome/browser/notifications/balloon_host.cc b/chrome/browser/notifications/balloon_host.cc
index 1c4ef20..87115ed 100644
--- a/chrome/browser/notifications/balloon_host.cc
+++ b/chrome/browser/notifications/balloon_host.cc
@@ -18,9 +18,9 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/site_instance.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
#include "content/common/renderer_preferences.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/common/bindings_policy.h"
#include "ipc/ipc_message.h"
#include "webkit/glue/webpreferences.h"
@@ -93,7 +93,7 @@ void BalloonHost::RenderViewReady(RenderViewHost* render_view_host) {
should_notify_on_disconnect_ = true;
NotificationService::current()->Notify(
chrome::NOTIFICATION_NOTIFY_BALLOON_CONNECTED,
- Source<BalloonHost>(this), NotificationService::NoDetails());
+ content::Source<BalloonHost>(this), NotificationService::NoDetails());
}
void BalloonHost::RenderViewGone(RenderViewHost* render_view_host,
@@ -209,7 +209,7 @@ void BalloonHost::NotifyDisconnect() {
should_notify_on_disconnect_ = false;
NotificationService::current()->Notify(
chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
- Source<BalloonHost>(this), NotificationService::NoDetails());
+ content::Source<BalloonHost>(this), NotificationService::NoDetails());
}
bool BalloonHost::IsRenderViewReady() const {
diff --git a/chrome/browser/notifications/balloon_host.h b/chrome/browser/notifications/balloon_host.h
index fc2488d..3ad69f3 100644
--- a/chrome/browser/notifications/balloon_host.h
+++ b/chrome/browser/notifications/balloon_host.h
@@ -14,8 +14,7 @@
#include "chrome/browser/extensions/extension_function_dispatcher.h"
#include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
class Balloon;
class Browser;
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc
index 3f77f43..7002017 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -226,10 +226,10 @@ DesktopNotificationService::~DesktopNotificationService() {
void DesktopNotificationService::StartObserving() {
if (!profile_->IsOffTheRecord()) {
notification_registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
notification_registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
void DesktopNotificationService::StopObserving() {
@@ -258,14 +258,15 @@ void DesktopNotificationService::DenyPermission(const GURL& origin) {
CONTENT_SETTING_BLOCK);
}
-void DesktopNotificationService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void DesktopNotificationService::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) {
// Remove all notifications currently shown or queued by the extension
// which was unloaded.
const Extension* extension =
- Details<UnloadedExtensionInfo>(details)->extension;
+ content::Details<UnloadedExtensionInfo>(details)->extension;
if (extension)
ui_manager_->CancelAllBySourceOrigin(extension->url());
} else if (type == chrome::NOTIFICATION_PROFILE_DESTROYED) {
@@ -420,7 +421,7 @@ string16 DesktopNotificationService::DisplayNameForOrigin(
void DesktopNotificationService::NotifySettingsChange() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_DESKTOP_NOTIFICATION_SETTINGS_CHANGED,
- Source<DesktopNotificationService>(this),
+ content::Source<DesktopNotificationService>(this),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/notifications/desktop_notification_service.h b/chrome/browser/notifications/desktop_notification_service.h
index 93b3a4c..e441d7e 100644
--- a/chrome/browser/notifications/desktop_notification_service.h
+++ b/chrome/browser/notifications/desktop_notification_service.h
@@ -17,8 +17,8 @@
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/profiles/profile_keyed_service.h"
#include "chrome/common/content_settings.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresenter.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
@@ -35,7 +35,7 @@ struct DesktopNotificationHostMsg_Show_Params;
// The DesktopNotificationService is an object, owned by the Profile,
// which provides the creation of desktop "toasts" to web pages and workers.
-class DesktopNotificationService : public NotificationObserver,
+class DesktopNotificationService : public content::NotificationObserver,
public ProfileKeyedService {
public:
enum DesktopNotificationSource {
@@ -77,10 +77,10 @@ class DesktopNotificationService : public NotificationObserver,
void GrantPermission(const GURL& origin);
void DenyPermission(const GURL& origin);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Creates a data:xxxx URL which contains the full HTML for a notification
// using supplied icon, title, and text, run through a template which contains
@@ -145,7 +145,7 @@ class DesktopNotificationService : public NotificationObserver,
// UI for desktop toasts.
NotificationUIManager* ui_manager_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService);
};
diff --git a/chrome/browser/notifications/notification_ui_manager.cc b/chrome/browser/notifications/notification_ui_manager.cc
index 77e799c..b35d49a7 100644
--- a/chrome/browser/notifications/notification_ui_manager.cc
+++ b/chrome/browser/notifications/notification_ui_manager.cc
@@ -240,13 +240,14 @@ void NotificationUIManager::GetQueuedNotificationsForTesting(
}
}
-void NotificationUIManager::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void NotificationUIManager::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_APP_TERMINATING) {
CancelAll();
} else if (type == chrome::NOTIFICATION_PREF_CHANGED) {
- std::string* name = Details<std::string>(details).ptr();
+ std::string* name = content::Details<std::string>(details).ptr();
if (*name == prefs::kDesktopNotificationPosition)
balloon_collection_->SetPositionPreference(
static_cast<BalloonCollection::PositionPreference>(
diff --git a/chrome/browser/notifications/notification_ui_manager.h b/chrome/browser/notifications/notification_ui_manager.h
index 9dc3a3f..a64c852 100644
--- a/chrome/browser/notifications/notification_ui_manager.h
+++ b/chrome/browser/notifications/notification_ui_manager.h
@@ -15,8 +15,8 @@
#include "chrome/browser/notifications/balloon.h"
#include "chrome/browser/notifications/balloon_collection.h"
#include "chrome/browser/prefs/pref_member.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class Notification;
class PrefService;
@@ -28,7 +28,7 @@ class SiteInstance;
// It maintains a queue of pending notifications when space becomes constrained.
class NotificationUIManager
: public BalloonCollection::BalloonSpaceChangeListener,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
virtual ~NotificationUIManager();
@@ -87,10 +87,10 @@ class NotificationUIManager
private:
explicit NotificationUIManager(PrefService* local_state);
- // NotificationObserver override.
+ // content::NotificationObserver override.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Attempts to display notifications from the show_queue if the user
// is active.
@@ -117,7 +117,7 @@ class NotificationUIManager
NotificationDeque show_queue_;
// Registrar for the other kind of notifications (event signaling).
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Prefs listener for the position preference.
IntegerPrefMember position_pref_;
diff --git a/chrome/browser/omnibox_search_hint.cc b/chrome/browser/omnibox_search_hint.cc
index 02ab9e9..22ff1b5 100644
--- a/chrome/browser/omnibox_search_hint.cc
+++ b/chrome/browser/omnibox_search_hint.cc
@@ -28,8 +28,8 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/navigation_details.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources_standard.h"
@@ -150,9 +150,10 @@ bool HintInfoBar::Accept() {
OmniboxSearchHint::OmniboxSearchHint(TabContentsWrapper* tab) : tab_(tab) {
NavigationController* controller = &(tab->controller());
- notification_registrar_.Add(this,
- content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(controller));
+ notification_registrar_.Add(
+ this,
+ content::NOTIFICATION_NAV_ENTRY_COMMITTED,
+ content::Source<NavigationController>(controller));
// Fill the search_engine_urls_ map, used for faster look-up (overkill?).
for (size_t i = 0; i < arraysize(kSearchEngineURLs); ++i)
search_engine_urls_[kSearchEngineURLs[i]] = 1;
@@ -160,15 +161,15 @@ OmniboxSearchHint::OmniboxSearchHint(TabContentsWrapper* tab) : tab_(tab) {
// Listen for omnibox to figure-out when the user searches from the omnibox.
notification_registrar_.Add(this,
chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
- Source<Profile>(tab->profile()));
+ content::Source<Profile>(tab->profile()));
}
OmniboxSearchHint::~OmniboxSearchHint() {
}
void OmniboxSearchHint::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
NavigationEntry* entry = tab_->controller().GetActiveEntry();
if (search_engine_urls_.find(entry->url().spec()) ==
@@ -186,7 +187,7 @@ void OmniboxSearchHint::Observe(int type,
if (search_url->GetHost() == entry->url().host())
ShowInfoBar();
} else if (type == chrome::NOTIFICATION_OMNIBOX_OPENED_URL) {
- AutocompleteLog* log = Details<AutocompleteLog>(details).ptr();
+ AutocompleteLog* log = content::Details<AutocompleteLog>(details).ptr();
AutocompleteMatch::Type type =
log->result.match_at(log->selected_index).type;
if (type == AutocompleteMatch::SEARCH_WHAT_YOU_TYPED ||
diff --git a/chrome/browser/omnibox_search_hint.h b/chrome/browser/omnibox_search_hint.h
index 1a43436..5753736 100644
--- a/chrome/browser/omnibox_search_hint.h
+++ b/chrome/browser/omnibox_search_hint.h
@@ -9,8 +9,8 @@
#include <map>
#include <string>
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class Profile;
class TabContentsWrapper;
@@ -20,15 +20,15 @@ class TabContentsWrapper;
// It is displayed when the user visits a known search engine URL and has not
// searched from the omnibox before, or has not previously dismissed a similar
// info-bar.
-class OmniboxSearchHint : public NotificationObserver {
+class OmniboxSearchHint : public content::NotificationObserver {
public:
explicit OmniboxSearchHint(TabContentsWrapper* tab);
virtual ~OmniboxSearchHint();
- // NotificationObserver method:
+ // content::NotificationObserver method:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Focus the location bar and displays a message instructing that search
// queries can be typed directly in there.
@@ -46,7 +46,7 @@ class OmniboxSearchHint : public NotificationObserver {
private:
void ShowInfoBar();
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
// The tab we are associated with.
TabContentsWrapper* tab_;
diff --git a/chrome/browser/oom_priority_manager.cc b/chrome/browser/oom_priority_manager.cc
index f4c3d51..74a5e1a 100644
--- a/chrome/browser/oom_priority_manager.cc
+++ b/chrome/browser/oom_priority_manager.cc
@@ -184,22 +184,23 @@ void OomPriorityManager::OnFocusTabScoreAdjustmentTimeout() {
this, &OomPriorityManager::AdjustFocusedTabScoreOnFileThread));
}
-void OomPriorityManager::Observe(int type, const NotificationSource& source,
- const NotificationDetails& details) {
+void OomPriorityManager::Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
base::ProcessHandle handle = 0;
base::AutoLock pid_to_oom_score_autolock(pid_to_oom_score_lock_);
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_CLOSED:
case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED: {
- handle = Source<RenderProcessHost>(source)->GetHandle();
+ handle = content::Source<RenderProcessHost>(source)->GetHandle();
pid_to_oom_score_.erase(handle);
break;
}
case content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED: {
bool visible = *Details<bool>(details).ptr();
if (visible) {
- focused_tab_pid_ =
- Source<RenderWidgetHost>(source).ptr()->process()->GetHandle();
+ focused_tab_pid_ = content::Source<RenderWidgetHost>(source).ptr()->
+ process()->GetHandle();
// If the currently focused tab already has a lower score, do not
// set it. This can happen in case the newly focused tab is script
diff --git a/chrome/browser/oom_priority_manager.h b/chrome/browser/oom_priority_manager.h
index ba202af..2dbd3a1 100644
--- a/chrome/browser/oom_priority_manager.h
+++ b/chrome/browser/oom_priority_manager.h
@@ -16,8 +16,8 @@
#include "base/task.h"
#include "base/time.h"
#include "base/timer.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class TabContents;
@@ -32,7 +32,7 @@ namespace browser {
//
// The algorithm used favors killing tabs that are not selected, not pinned,
// and have been idle for longest, in that order of priority.
-class OomPriorityManager : public NotificationObserver {
+class OomPriorityManager : public content::NotificationObserver {
public:
OomPriorityManager();
virtual ~OomPriorityManager();
@@ -81,12 +81,12 @@ class OomPriorityManager : public NotificationObserver {
static bool CompareTabStats(TabStats first, TabStats second);
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
base::RepeatingTimer<OomPriorityManager> timer_;
base::OneShotTimer<OomPriorityManager> focus_tab_score_adjust_timer_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// This lock is for pid_to_oom_score_ and focus_tab_pid_.
base::Lock pid_to_oom_score_lock_;
diff --git a/chrome/browser/password_manager/password_store_default.cc b/chrome/browser/password_manager/password_store_default.cc
index 0ebf601..e35ce20 100644
--- a/chrome/browser/password_manager/password_store_default.cc
+++ b/chrome/browser/password_manager/password_store_default.cc
@@ -132,8 +132,8 @@ void PasswordStoreDefault::AddLoginImpl(const PasswordForm& form) {
changes.push_back(PasswordStoreChange(PasswordStoreChange::ADD, form));
NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
- Source<PasswordStore>(this),
- Details<PasswordStoreChangeList>(&changes));
+ content::Source<PasswordStore>(this),
+ content::Details<PasswordStoreChangeList>(&changes));
}
}
@@ -143,8 +143,8 @@ void PasswordStoreDefault::UpdateLoginImpl(const PasswordForm& form) {
changes.push_back(PasswordStoreChange(PasswordStoreChange::UPDATE, form));
NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
- Source<PasswordStore>(this),
- Details<PasswordStoreChangeList>(&changes));
+ content::Source<PasswordStore>(this),
+ content::Details<PasswordStoreChangeList>(&changes));
}
}
@@ -154,8 +154,8 @@ void PasswordStoreDefault::RemoveLoginImpl(const PasswordForm& form) {
changes.push_back(PasswordStoreChange(PasswordStoreChange::REMOVE, form));
NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
- Source<PasswordStore>(this),
- Details<PasswordStoreChangeList>(&changes));
+ content::Source<PasswordStore>(this),
+ content::Details<PasswordStoreChangeList>(&changes));
}
}
@@ -172,8 +172,8 @@ void PasswordStoreDefault::RemoveLoginsCreatedBetweenImpl(
}
NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
- Source<PasswordStore>(this),
- Details<PasswordStoreChangeList>(&changes));
+ content::Source<PasswordStore>(this),
+ content::Details<PasswordStoreChangeList>(&changes));
}
}
STLDeleteElements(&forms);
diff --git a/chrome/browser/password_manager/password_store_default_unittest.cc b/chrome/browser/password_manager/password_store_default_unittest.cc
index db6b8b0..bb89510 100644
--- a/chrome/browser/password_manager/password_store_default_unittest.cc
+++ b/chrome/browser/password_manager/password_store_default_unittest.cc
@@ -19,10 +19,10 @@
#include "chrome/common/pref_names.h"
#include "chrome/test/base/signaling_task.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_observer_mock.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_registrar.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"
@@ -74,7 +74,7 @@ class DBThreadObserverHelper :
registrar_.RemoveAll();
}
- NotificationObserverMock& observer() {
+ content::NotificationObserverMock& observer() {
return observer_;
}
@@ -85,13 +85,13 @@ class DBThreadObserverHelper :
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
registrar_.Add(&observer_,
chrome::NOTIFICATION_LOGINS_CHANGED,
- Source<PasswordStore>(password_store));
+ content::Source<PasswordStore>(password_store));
done_event_.Signal();
}
WaitableEvent done_event_;
- NotificationRegistrar registrar_;
- NotificationObserverMock observer_;
+ content::NotificationRegistrar registrar_;
+ content::NotificationObserverMock observer_;
};
} // anonymous namespace
@@ -463,11 +463,11 @@ TEST_F(PasswordStoreDefaultTest, Notifications) {
};
EXPECT_CALL(helper->observer(),
- Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
- Source<PasswordStore>(store),
- Property(&Details<const PasswordStoreChangeList>::ptr,
- Pointee(ElementsAreArray(
- expected_add_changes)))));
+ Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
+ content::Source<PasswordStore>(store),
+ Property(&content::Details<const PasswordStoreChangeList>::ptr,
+ Pointee(ElementsAreArray(
+ expected_add_changes)))));
// Adding a login should trigger a notification.
store->AddLogin(*form);
@@ -487,11 +487,11 @@ TEST_F(PasswordStoreDefaultTest, Notifications) {
};
EXPECT_CALL(helper->observer(),
- Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
- Source<PasswordStore>(store),
- Property(&Details<const PasswordStoreChangeList>::ptr,
- Pointee(ElementsAreArray(
- expected_update_changes)))));
+ Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
+ content::Source<PasswordStore>(store),
+ Property(&content::Details<const PasswordStoreChangeList>::ptr,
+ Pointee(ElementsAreArray(
+ expected_update_changes)))));
// Updating the login with the new password should trigger a notification.
store->UpdateLogin(*form);
@@ -506,11 +506,11 @@ TEST_F(PasswordStoreDefaultTest, Notifications) {
};
EXPECT_CALL(helper->observer(),
- Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
- Source<PasswordStore>(store),
- Property(&Details<const PasswordStoreChangeList>::ptr,
- Pointee(ElementsAreArray(
- expected_delete_changes)))));
+ Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
+ content::Source<PasswordStore>(store),
+ Property(&content::Details<const PasswordStoreChangeList>::ptr,
+ Pointee(ElementsAreArray(
+ expected_delete_changes)))));
// Deleting the login should trigger a notification.
store->RemoveLogin(*form);
diff --git a/chrome/browser/password_manager/password_store_mac.cc b/chrome/browser/password_manager/password_store_mac.cc
index 6c963be..b641790 100644
--- a/chrome/browser/password_manager/password_store_mac.cc
+++ b/chrome/browser/password_manager/password_store_mac.cc
@@ -777,8 +777,8 @@ void PasswordStoreMac::AddLoginImpl(const PasswordForm& form) {
changes.push_back(PasswordStoreChange(PasswordStoreChange::ADD, form));
NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
- Source<PasswordStore>(this),
- Details<PasswordStoreChangeList>(&changes));
+ content::Source<PasswordStore>(this),
+ content::Details<PasswordStoreChangeList>(&changes));
}
}
}
@@ -812,7 +812,7 @@ void PasswordStoreMac::UpdateLoginImpl(const PasswordForm& form) {
if (!changes.empty()) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
- Source<PasswordStore>(this),
+ content::Source<PasswordStore>(this),
Details<PasswordStoreChangeList>(&changes));
}
}
@@ -843,7 +843,7 @@ void PasswordStoreMac::RemoveLoginImpl(const PasswordForm& form) {
changes.push_back(PasswordStoreChange(PasswordStoreChange::REMOVE, form));
NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
- Source<PasswordStore>(this),
+ content::Source<PasswordStore>(this),
Details<PasswordStoreChangeList>(&changes));
}
}
@@ -877,7 +877,7 @@ void PasswordStoreMac::RemoveLoginsCreatedBetweenImpl(
}
NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
- Source<PasswordStore>(this),
+ content::Source<PasswordStore>(this),
Details<PasswordStoreChangeList>(&changes));
}
}
diff --git a/chrome/browser/password_manager/password_store_x.cc b/chrome/browser/password_manager/password_store_x.cc
index b873e7c..f0e2319 100644
--- a/chrome/browser/password_manager/password_store_x.cc
+++ b/chrome/browser/password_manager/password_store_x.cc
@@ -39,8 +39,8 @@ void PasswordStoreX::AddLoginImpl(const PasswordForm& form) {
changes.push_back(PasswordStoreChange(PasswordStoreChange::ADD, form));
NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
- Source<PasswordStore>(this),
- Details<PasswordStoreChangeList>(&changes));
+ content::Source<PasswordStore>(this),
+ content::Details<PasswordStoreChangeList>(&changes));
allow_fallback_ = false;
} else if (allow_default_store()) {
PasswordStoreDefault::AddLoginImpl(form);
@@ -54,8 +54,8 @@ void PasswordStoreX::UpdateLoginImpl(const PasswordForm& form) {
changes.push_back(PasswordStoreChange(PasswordStoreChange::UPDATE, form));
NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
- Source<PasswordStore>(this),
- Details<PasswordStoreChangeList>(&changes));
+ content::Source<PasswordStore>(this),
+ content::Details<PasswordStoreChangeList>(&changes));
allow_fallback_ = false;
} else if (allow_default_store()) {
PasswordStoreDefault::UpdateLoginImpl(form);
@@ -69,8 +69,8 @@ void PasswordStoreX::RemoveLoginImpl(const PasswordForm& form) {
changes.push_back(PasswordStoreChange(PasswordStoreChange::REMOVE, form));
NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
- Source<PasswordStore>(this),
- Details<PasswordStoreChangeList>(&changes));
+ content::Source<PasswordStore>(this),
+ content::Details<PasswordStoreChangeList>(&changes));
allow_fallback_ = false;
} else if (allow_default_store()) {
PasswordStoreDefault::RemoveLoginImpl(form);
@@ -93,8 +93,8 @@ void PasswordStoreX::RemoveLoginsCreatedBetweenImpl(
}
NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGINS_CHANGED,
- Source<PasswordStore>(this),
- Details<PasswordStoreChangeList>(&changes));
+ content::Source<PasswordStore>(this),
+ content::Details<PasswordStoreChangeList>(&changes));
allow_fallback_ = false;
} else if (allow_default_store()) {
PasswordStoreDefault::RemoveLoginsCreatedBetweenImpl(delete_begin,
diff --git a/chrome/browser/password_manager/password_store_x_unittest.cc b/chrome/browser/password_manager/password_store_x_unittest.cc
index 495f8d5..64c7d32 100644
--- a/chrome/browser/password_manager/password_store_x_unittest.cc
+++ b/chrome/browser/password_manager/password_store_x_unittest.cc
@@ -24,10 +24,10 @@
#include "chrome/test/base/signaling_task.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_observer_mock.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_registrar.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"
@@ -80,7 +80,7 @@ class DBThreadObserverHelper
registrar_.RemoveAll();
}
- NotificationObserverMock& observer() {
+ content::NotificationObserverMock& observer() {
return observer_;
}
@@ -91,13 +91,13 @@ class DBThreadObserverHelper
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
registrar_.Add(&observer_,
chrome::NOTIFICATION_LOGINS_CHANGED,
- Source<PasswordStore>(password_store));
+ content::Source<PasswordStore>(password_store));
done_event_.Signal();
}
WaitableEvent done_event_;
- NotificationRegistrar registrar_;
- NotificationObserverMock observer_;
+ content::NotificationRegistrar registrar_;
+ content::NotificationObserverMock observer_;
};
class FailingBackend : public PasswordStoreX::NativeBackend {
@@ -550,7 +550,7 @@ TEST_P(PasswordStoreXTest, Notifications) {
EXPECT_CALL(helper->observer(),
Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
- Source<PasswordStore>(store),
+ content::Source<PasswordStore>(store),
Property(&Details<const PasswordStoreChangeList>::ptr,
Pointee(ElementsAreArray(
expected_add_changes)))));
@@ -574,7 +574,7 @@ TEST_P(PasswordStoreXTest, Notifications) {
EXPECT_CALL(helper->observer(),
Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
- Source<PasswordStore>(store),
+ content::Source<PasswordStore>(store),
Property(&Details<const PasswordStoreChangeList>::ptr,
Pointee(ElementsAreArray(
expected_update_changes)))));
@@ -593,7 +593,7 @@ TEST_P(PasswordStoreXTest, Notifications) {
EXPECT_CALL(helper->observer(),
Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
- Source<PasswordStore>(store),
+ content::Source<PasswordStore>(store),
Property(&Details<const PasswordStoreChangeList>::ptr,
Pointee(ElementsAreArray(
expected_delete_changes)))));
diff --git a/chrome/browser/pdf_browsertest.cc b/chrome/browser/pdf_browsertest.cc
index b0f92af..11bfca7 100644
--- a/chrome/browser/pdf_browsertest.cc
+++ b/chrome/browser/pdf_browsertest.cc
@@ -17,7 +17,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/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "net/test/test_server.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/gfx/codec/png_codec.h"
@@ -30,7 +30,7 @@ static const int kBrowserWidth = 1000;
static const int kBrowserHeight = 600;
class PDFBrowserTest : public InProcessBrowserTest,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
PDFBrowserTest()
: snapshot_different_(true),
@@ -80,9 +80,10 @@ class PDFBrowserTest : public InProcessBrowserTest,
expected_filename_ = expected_filename;
TabContentsWrapper* wrapper = browser()->GetSelectedTabContentsWrapper();
wrapper->CaptureSnapshot();
- ui_test_utils::RegisterAndWait(this,
- chrome::NOTIFICATION_TAB_SNAPSHOT_TAKEN,
- Source<TabContentsWrapper>(wrapper));
+ ui_test_utils::RegisterAndWait(
+ this,
+ chrome::NOTIFICATION_TAB_SNAPSHOT_TAKEN,
+ content::Source<TabContentsWrapper>(wrapper));
ASSERT_FALSE(snapshot_different_) << "Rendering didn't match, see result "
"at " << snapshot_filename_.value().c_str();
}
@@ -105,10 +106,10 @@ class PDFBrowserTest : public InProcessBrowserTest,
}
private:
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_TAB_SNAPSHOT_TAKEN) {
MessageLoopForUI::current()->Quit();
FilePath reference = ui_test_utils::GetTestFilePath(
@@ -127,7 +128,7 @@ class PDFBrowserTest : public InProcessBrowserTest,
gfx::PNGCodec::FORMAT_BGRA, &decoded, &w, &h));
int32* ref_pixels = reinterpret_cast<int32*>(&decoded[0]);
- const SkBitmap* bitmap = Details<const SkBitmap>(details).ptr();
+ const SkBitmap* bitmap = content::Details<const SkBitmap>(details).ptr();
int32* pixels = static_cast<int32*>(bitmap->getPixels());
// Get the background color, and use it to figure out the x-offsets in
@@ -274,10 +275,10 @@ IN_PROC_BROWSER_TEST_F(PDFBrowserTest, FLAKY_SLOW_Loading) {
NavigationController* controller =
&(browser()->GetSelectedTabContents()->controller());
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
registrar.Add(this,
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(controller));
+ content::Source<NavigationController>(controller));
std::string base_url = std::string("files/");
file_util::FileEnumerator file_enumerator(
@@ -338,7 +339,7 @@ IN_PROC_BROWSER_TEST_F(PDFBrowserTest, MAYBE_OnLoadAndReload) {
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContents()->controller()));
ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
browser()->GetSelectedTabContents()->render_view_host(),
diff --git a/chrome/browser/plugin_data_remover_helper.cc b/chrome/browser/plugin_data_remover_helper.cc
index cd0e137..8bc80e1 100644
--- a/chrome/browser/plugin_data_remover_helper.cc
+++ b/chrome/browser/plugin_data_remover_helper.cc
@@ -25,17 +25,18 @@ PluginDataRemoverHelper::~PluginDataRemoverHelper() {
void PluginDataRemoverHelper::Init(const char* pref_name,
Profile* profile,
- NotificationObserver* observer) {
+ content::NotificationObserver* observer) {
pref_.Init(pref_name, profile->GetPrefs(), observer);
profile_ = profile;
registrar_.Add(this, chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
StartUpdate();
}
-void PluginDataRemoverHelper::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void PluginDataRemoverHelper::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED) {
StartUpdate();
} else {
diff --git a/chrome/browser/plugin_data_remover_helper.h b/chrome/browser/plugin_data_remover_helper.h
index cd74068..b228d47 100644
--- a/chrome/browser/plugin_data_remover_helper.h
+++ b/chrome/browser/plugin_data_remover_helper.h
@@ -11,8 +11,8 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/prefs/pref_member.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class PluginPrefs;
class Profile;
@@ -26,7 +26,7 @@ struct WebPluginInfo;
// by an installed plug-in.
// It should only be used from the UI thread. The client has to make sure that
// the passed profile outlives this object.
-class PluginDataRemoverHelper : public NotificationObserver {
+class PluginDataRemoverHelper : public content::NotificationObserver {
public:
PluginDataRemoverHelper();
virtual ~PluginDataRemoverHelper();
@@ -37,14 +37,14 @@ class PluginDataRemoverHelper : public NotificationObserver {
// plug-ins.
void Init(const char* pref_name,
Profile* profile,
- NotificationObserver* observer);
+ content::NotificationObserver* observer);
bool GetValue() const { return pref_.GetValue(); }
- // NotificationObserver methods:
+ // content::NotificationObserver methods:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
void StartUpdate();
@@ -52,7 +52,7 @@ class PluginDataRemoverHelper : public NotificationObserver {
const std::vector<webkit::WebPluginInfo>& plugins);
BooleanPrefMember pref_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Weak pointer.
Profile* profile_;
base::WeakPtrFactory<PluginDataRemoverHelper> factory_;
diff --git a/chrome/browser/plugin_prefs.cc b/chrome/browser/plugin_prefs.cc
index 7e523b5..5e76865 100644
--- a/chrome/browser/plugin_prefs.cc
+++ b/chrome/browser/plugin_prefs.cc
@@ -243,15 +243,15 @@ bool PluginPrefs::IsPluginEnabled(const webkit::WebPluginInfo& plugin) {
}
void PluginPrefs::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(chrome::NOTIFICATION_PREF_CHANGED, type);
- const std::string* pref_name = Details<std::string>(details).ptr();
+ const std::string* pref_name = content::Details<std::string>(details).ptr();
if (!pref_name) {
NOTREACHED();
return;
}
- DCHECK_EQ(prefs_, Source<PrefService>(source).ptr());
+ DCHECK_EQ(prefs_, content::Source<PrefService>(source).ptr());
if (*pref_name == prefs::kPluginsDisabledPlugins) {
base::AutoLock auto_lock(lock_);
ListValueToStringSet(prefs_->GetList(prefs::kPluginsDisabledPlugins),
@@ -542,6 +542,6 @@ void PluginPrefs::NotifyPluginStatusChanged() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
NotificationService::current()->Notify(
chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED,
- Source<Profile>(profile_),
+ content::Source<Profile>(profile_),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/plugin_prefs.h b/chrome/browser/plugin_prefs.h
index 1e2c283..e6afa45 100644
--- a/chrome/browser/plugin_prefs.h
+++ b/chrome/browser/plugin_prefs.h
@@ -15,10 +15,8 @@
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
-class NotificationDetails;
-class NotificationSource;
class Profile;
namespace content {
@@ -42,7 +40,7 @@ class PluginList;
// enabled or disabled.
// Except where otherwise noted, it can be used on every thread.
class PluginPrefs : public base::RefCountedThreadSafe<PluginPrefs>,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
enum PolicyStatus {
NO_POLICY = 0, // Neither enabled or disabled by policy.
@@ -99,10 +97,10 @@ class PluginPrefs : public base::RefCountedThreadSafe<PluginPrefs>,
void set_profile(Profile* profile) { profile_ = profile; }
- // NotificationObserver method override.
+ // content::NotificationObserver method override.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
friend class base::RefCountedThreadSafe<PluginPrefs>;
diff --git a/chrome/browser/policy/browser_policy_connector.cc b/chrome/browser/policy/browser_policy_connector.cc
index 25315d3..6c7d1bf 100644
--- a/chrome/browser/policy/browser_policy_connector.cc
+++ b/chrome/browser/policy/browser_policy_connector.cc
@@ -21,8 +21,8 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/net/gaia/gaia_constants.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "policy/policy_constants.h"
#if defined(OS_WIN)
@@ -279,7 +279,7 @@ void BrowserPolicyConnector::SetUserPolicyTokenService(
token_service_ = token_service;
registrar_.Add(this,
chrome::NOTIFICATION_TOKEN_AVAILABLE,
- Source<TokenService>(token_service_));
+ content::Source<TokenService>(token_service_));
if (token_service_->HasTokenForService(
GaiaConstants::kDeviceManagementService)) {
@@ -336,16 +336,18 @@ BrowserPolicyConnector::BrowserPolicyConnector(
recommended_cloud_provider_(recommended_cloud_provider),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) {}
-void BrowserPolicyConnector::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void BrowserPolicyConnector::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (type == chrome::NOTIFICATION_TOKEN_AVAILABLE) {
const TokenService* token_source =
- Source<const TokenService>(source).ptr();
+ content::Source<const TokenService>(source).ptr();
DCHECK_EQ(token_service_, token_source);
const TokenService::TokenAvailableDetails* token_details =
- Details<const TokenService::TokenAvailableDetails>(details).ptr();
+ content::Details<const TokenService::TokenAvailableDetails>(details).
+ ptr();
if (token_details->service() == GaiaConstants::kDeviceManagementService) {
if (user_data_store_.get()) {
user_data_store_->SetGaiaToken(token_details->token());
diff --git a/chrome/browser/policy/browser_policy_connector.h b/chrome/browser/policy/browser_policy_connector.h
index 34966e3..4f63910 100644
--- a/chrome/browser/policy/browser_policy_connector.h
+++ b/chrome/browser/policy/browser_policy_connector.h
@@ -13,8 +13,8 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/policy/cloud_policy_data_store.h"
#include "chrome/browser/policy/enterprise_install_attributes.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class TestingBrowserProcess;
class TokenService;
@@ -30,7 +30,7 @@ class UserPolicyTokenCache;
// platform policy providers, device- and the user-cloud policy infrastructure.
// TODO(gfeher,mnissler): Factor out device and user specific methods into their
// respective classes.
-class BrowserPolicyConnector : public NotificationObserver {
+class BrowserPolicyConnector : public content::NotificationObserver {
public:
// Indicates the type of token passed to SetDeviceCredentials.
enum TokenType {
@@ -121,10 +121,10 @@ class BrowserPolicyConnector : public NotificationObserver {
CloudPolicyProvider* managed_cloud_provider,
CloudPolicyProvider* recommended_cloud_provider);
- // NotificationObserver method overrides:
+ // content::NotificationObserver method overrides:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Initializes the device cloud policy infrasturcture.
void InitializeDevicePolicy();
@@ -164,7 +164,7 @@ class BrowserPolicyConnector : public NotificationObserver {
base::WeakPtrFactory<BrowserPolicyConnector> weak_ptr_factory_;
// Registers the provider for notification of successful Gaia logins.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Weak reference to the TokenService we are listening to for user cloud
// policy authentication tokens.
diff --git a/chrome/browser/policy/cloud_policy_subsystem.cc b/chrome/browser/policy/cloud_policy_subsystem.cc
index 9c43a5e..19f71cf 100644
--- a/chrome/browser/policy/cloud_policy_subsystem.cc
+++ b/chrome/browser/policy/cloud_policy_subsystem.cc
@@ -19,8 +19,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
namespace {
@@ -155,14 +155,15 @@ void CloudPolicySubsystem::UpdatePolicyRefreshRate(int64 refresh_rate) {
}
}
-void CloudPolicySubsystem::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void CloudPolicySubsystem::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED) {
- DCHECK_EQ(*(Details<std::string>(details).ptr()),
+ DCHECK_EQ(*(content::Details<std::string>(details).ptr()),
std::string(refresh_pref_name_));
PrefService* local_state = g_browser_process->local_state();
- DCHECK_EQ(Source<PrefService>(source).ptr(), local_state);
+ DCHECK_EQ(content::Source<PrefService>(source).ptr(), local_state);
UpdatePolicyRefreshRate(local_state->GetInteger(refresh_pref_name_));
} else {
NOTREACHED();
diff --git a/chrome/browser/policy/cloud_policy_subsystem.h b/chrome/browser/policy/cloud_policy_subsystem.h
index 2810a81..1205625 100644
--- a/chrome/browser/policy/cloud_policy_subsystem.h
+++ b/chrome/browser/policy/cloud_policy_subsystem.h
@@ -8,7 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "net/base/network_change_notifier.h"
class PrefService;
@@ -26,7 +26,7 @@ class PolicyNotifier;
// policy. It glues together the backend, the policy controller and manages the
// life cycle of the policy providers.
class CloudPolicySubsystem
- : public NotificationObserver,
+ : public content::NotificationObserver,
public net::NetworkChangeNotifier::IPAddressObserver {
public:
enum PolicySubsystemState {
@@ -120,10 +120,10 @@ class CloudPolicySubsystem
virtual void CreateDeviceTokenFetcher();
virtual void CreateCloudPolicyController();
- // NotificationObserver overrides.
+ // content::NotificationObserver overrides.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// net::NetworkChangeNotifier::IPAddressObserver:
virtual void OnIPAddressChanged() OVERRIDE;
diff --git a/chrome/browser/policy/url_blacklist_manager.cc b/chrome/browser/policy/url_blacklist_manager.cc
index 4b6591f..2c90093 100644
--- a/chrome/browser/policy/url_blacklist_manager.cc
+++ b/chrome/browser/policy/url_blacklist_manager.cc
@@ -13,8 +13,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "googleurl/src/gurl.h"
namespace policy {
@@ -318,13 +318,13 @@ URLBlacklistManager::~URLBlacklistManager() {
}
void URLBlacklistManager::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(type == chrome::NOTIFICATION_PREF_CHANGED);
- PrefService* prefs = Source<PrefService>(source).ptr();
+ PrefService* prefs = content::Source<PrefService>(source).ptr();
DCHECK(prefs == pref_service_);
- std::string* pref_name = Details<std::string>(details).ptr();
+ std::string* pref_name = content::Details<std::string>(details).ptr();
DCHECK(*pref_name == prefs::kUrlBlacklist ||
*pref_name == prefs::kUrlWhitelist);
ScheduleUpdate();
diff --git a/chrome/browser/policy/url_blacklist_manager.h b/chrome/browser/policy/url_blacklist_manager.h
index 72a22df..c085973 100644
--- a/chrome/browser/policy/url_blacklist_manager.h
+++ b/chrome/browser/policy/url_blacklist_manager.h
@@ -16,11 +16,9 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
class GURL;
-class NotificationDetails;
-class NotificationSource;
class PrefService;
namespace policy {
@@ -109,7 +107,7 @@ class URLBlacklist {
// exists in UI, then a potential destruction on IO will come after any task
// posted to IO from that method on UI. This is used to go through IO before
// the actual update starts, and grab a WeakPtr.
-class URLBlacklistManager : public NotificationObserver {
+class URLBlacklistManager : public content::NotificationObserver {
public:
// Must be constructed on the UI thread.
explicit URLBlacklistManager(PrefService* pref_service);
@@ -145,8 +143,8 @@ class URLBlacklistManager : public NotificationObserver {
private:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// ---------
// UI thread
diff --git a/chrome/browser/prefs/pref_change_registrar.cc b/chrome/browser/prefs/pref_change_registrar.cc
index 64c60962..3531afd 100644
--- a/chrome/browser/prefs/pref_change_registrar.cc
+++ b/chrome/browser/prefs/pref_change_registrar.cc
@@ -22,7 +22,8 @@ void PrefChangeRegistrar::Init(PrefService* service) {
service_ = service;
}
-void PrefChangeRegistrar::Add(const char* path, NotificationObserver* obs) {
+void PrefChangeRegistrar::Add(const char* path,
+ content::NotificationObserver* obs) {
if (!service_) {
NOTREACHED();
return;
@@ -36,7 +37,8 @@ void PrefChangeRegistrar::Add(const char* path, NotificationObserver* obs) {
service_->AddPrefObserver(path, obs);
}
-void PrefChangeRegistrar::Remove(const char* path, NotificationObserver* obs) {
+void PrefChangeRegistrar::Remove(const char* path,
+ content::NotificationObserver* obs) {
if (!service_) {
NOTREACHED();
return;
diff --git a/chrome/browser/prefs/pref_change_registrar.h b/chrome/browser/prefs/pref_change_registrar.h
index 773c556..0278bdb 100644
--- a/chrome/browser/prefs/pref_change_registrar.h
+++ b/chrome/browser/prefs/pref_change_registrar.h
@@ -12,7 +12,10 @@
#include "base/basictypes.h"
class PrefService;
+
+namespace content {
class NotificationObserver;
+}
// Automatically manages the registration of one or more pref change observers
// with a PrefStore. Functions much like NotificationRegistrar, but specifically
@@ -32,12 +35,12 @@ class PrefChangeRegistrar {
// when the registrar's destructor is called unless the observer has been
// explicitly removed by a call to Remove beforehand.
void Add(const char* path,
- NotificationObserver* obs);
+ content::NotificationObserver* obs);
// Removes a preference observer that has previously been added with a call to
// Add.
void Remove(const char* path,
- NotificationObserver* obs);
+ content::NotificationObserver* obs);
// Removes all observers that have been previously added with a call to Add.
void RemoveAll();
@@ -46,7 +49,8 @@ class PrefChangeRegistrar {
bool IsEmpty() const;
private:
- typedef std::pair<std::string, NotificationObserver*> ObserverRegistration;
+ typedef std::pair<std::string, content::NotificationObserver*>
+ ObserverRegistration;
std::set<ObserverRegistration> observers_;
PrefService* service_;
diff --git a/chrome/browser/prefs/pref_change_registrar_unittest.cc b/chrome/browser/prefs/pref_change_registrar_unittest.cc
index fdabfd9..3e5f192 100644
--- a/chrome/browser/prefs/pref_change_registrar_unittest.cc
+++ b/chrome/browser/prefs/pref_change_registrar_unittest.cc
@@ -4,10 +4,10 @@
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/test/base/testing_pref_service.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_observer_mock.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
+#include "content/test/notification_observer_mock.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -22,8 +22,10 @@ class MockPrefService : public TestingPrefService {
MockPrefService() {}
virtual ~MockPrefService() {}
- MOCK_METHOD2(AddPrefObserver, void(const char*, NotificationObserver*));
- MOCK_METHOD2(RemovePrefObserver, void(const char*, NotificationObserver*));
+ MOCK_METHOD2(AddPrefObserver,
+ void(const char*, content::NotificationObserver*));
+ MOCK_METHOD2(RemovePrefObserver,
+ void(const char*, content::NotificationObserver*));
};
} // namespace
@@ -36,17 +38,17 @@ class PrefChangeRegistrarTest : public testing::Test {
protected:
virtual void SetUp();
- NotificationObserver* observer() const { return observer_.get(); }
+ content::NotificationObserver* observer() const { return observer_.get(); }
MockPrefService* service() const { return service_.get(); }
private:
scoped_ptr<MockPrefService> service_;
- scoped_ptr<NotificationObserverMock> observer_;
+ scoped_ptr<content::NotificationObserverMock> observer_;
};
void PrefChangeRegistrarTest::SetUp() {
service_.reset(new MockPrefService());
- observer_.reset(new NotificationObserverMock());
+ observer_.reset(new content::NotificationObserverMock());
}
TEST_F(PrefChangeRegistrarTest, AddAndRemove) {
diff --git a/chrome/browser/prefs/pref_member.cc b/chrome/browser/prefs/pref_member.cc
index a2c05b1..d700939 100644
--- a/chrome/browser/prefs/pref_member.cc
+++ b/chrome/browser/prefs/pref_member.cc
@@ -25,7 +25,7 @@ PrefMemberBase::~PrefMemberBase() {
void PrefMemberBase::Init(const char* pref_name,
PrefService* prefs,
- NotificationObserver* observer) {
+ content::NotificationObserver* observer) {
DCHECK(pref_name);
DCHECK(prefs);
DCHECK(pref_name_.empty()); // Check that Init is only called once.
@@ -55,8 +55,8 @@ void PrefMemberBase::MoveToThread(BrowserThread::ID thread_id) {
}
void PrefMemberBase::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
VerifyValuePrefName();
DCHECK(chrome::NOTIFICATION_PREF_CHANGED == type);
UpdateValueFromPref();
diff --git a/chrome/browser/prefs/pref_member.h b/chrome/browser/prefs/pref_member.h
index 6c035ff..fa085e8 100644
--- a/chrome/browser/prefs/pref_member.h
+++ b/chrome/browser/prefs/pref_member.h
@@ -32,13 +32,13 @@
#include "base/memory/ref_counted.h"
#include "base/values.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
class PrefService;
namespace subtle {
-class PrefMemberBase : public NotificationObserver {
+class PrefMemberBase : public content::NotificationObserver {
protected:
class Internal : public base::RefCountedThreadSafe<Internal> {
public:
@@ -82,7 +82,7 @@ class PrefMemberBase : public NotificationObserver {
// See PrefMember<> for description.
void Init(const char* pref_name, PrefService* prefs,
- NotificationObserver* observer);
+ content::NotificationObserver* observer);
virtual void CreateInternal() const = 0;
@@ -91,10 +91,10 @@ class PrefMemberBase : public NotificationObserver {
void MoveToThread(BrowserThread::ID thread_id);
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
void VerifyValuePrefName() const {
DCHECK(!pref_name_.empty());
@@ -118,7 +118,7 @@ class PrefMemberBase : public NotificationObserver {
// Ordered the members to compact the class instance.
private:
std::string pref_name_;
- NotificationObserver* observer_;
+ content::NotificationObserver* observer_;
PrefService* prefs_;
protected:
@@ -139,7 +139,7 @@ class PrefMember : public subtle::PrefMemberBase {
// don't want any notifications of changes.
// This method should only be called on the UI thread.
void Init(const char* pref_name, PrefService* prefs,
- NotificationObserver* observer) {
+ content::NotificationObserver* observer) {
subtle::PrefMemberBase::Init(pref_name, prefs, observer);
}
diff --git a/chrome/browser/prefs/pref_member_unittest.cc b/chrome/browser/prefs/pref_member_unittest.cc
index 332f45f..bb5080b 100644
--- a/chrome/browser/prefs/pref_member_unittest.cc
+++ b/chrome/browser/prefs/pref_member_unittest.cc
@@ -10,8 +10,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/testing_pref_service.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -65,7 +65,7 @@ class GetPrefValueCallback
bool value_;
};
-class PrefMemberTestClass : public NotificationObserver {
+class PrefMemberTestClass : public content::NotificationObserver {
public:
explicit PrefMemberTestClass(PrefService* prefs)
: observe_cnt_(0), prefs_(prefs) {
@@ -73,12 +73,12 @@ class PrefMemberTestClass : public NotificationObserver {
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(chrome::NOTIFICATION_PREF_CHANGED == type);
- PrefService* prefs_in = Source<PrefService>(source).ptr();
+ PrefService* prefs_in = content::Source<PrefService>(source).ptr();
EXPECT_EQ(prefs_in, prefs_);
- std::string* pref_name_in = Details<std::string>(details).ptr();
+ std::string* pref_name_in = content::Details<std::string>(details).ptr();
EXPECT_EQ(*pref_name_in, kStringPref);
EXPECT_EQ(str_.GetValue(), prefs_->GetString(kStringPref));
++observe_cnt_;
diff --git a/chrome/browser/prefs/pref_notifier_impl.cc b/chrome/browser/prefs/pref_notifier_impl.cc
index 2dd454f..08a774f 100644
--- a/chrome/browser/prefs/pref_notifier_impl.cc
+++ b/chrome/browser/prefs/pref_notifier_impl.cc
@@ -7,7 +7,7 @@
#include "base/stl_util.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "content/common/notification_service.h"
PrefNotifierImpl::PrefNotifierImpl(PrefService* service)
@@ -32,7 +32,7 @@ PrefNotifierImpl::~PrefNotifierImpl() {
}
void PrefNotifierImpl::AddPrefObserver(const char* path,
- NotificationObserver* obs) {
+ content::NotificationObserver* obs) {
// Get the pref observer list associated with the path.
NotificationObserverList* observer_list = NULL;
const PrefObserverMap::iterator observer_iterator =
@@ -46,7 +46,7 @@ void PrefNotifierImpl::AddPrefObserver(const char* path,
// Verify that this observer doesn't already exist.
NotificationObserverList::Iterator it(*observer_list);
- NotificationObserver* existing_obs;
+ content::NotificationObserver* existing_obs;
while ((existing_obs = it.GetNext()) != NULL) {
DCHECK(existing_obs != obs) << path << " observer already registered";
if (existing_obs == obs)
@@ -58,7 +58,7 @@ void PrefNotifierImpl::AddPrefObserver(const char* path,
}
void PrefNotifierImpl::RemovePrefObserver(const char* path,
- NotificationObserver* obs) {
+ content::NotificationObserver* obs) {
DCHECK(CalledOnValidThread());
const PrefObserverMap::iterator observer_iterator =
@@ -80,8 +80,8 @@ void PrefNotifierImpl::OnInitializationCompleted(bool succeeded) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PREF_INITIALIZATION_COMPLETED,
- Source<PrefService>(pref_service_),
- Details<bool>(&succeeded));
+ content::Source<PrefService>(pref_service_),
+ content::Details<bool>(&succeeded));
}
void PrefNotifierImpl::FireObservers(const std::string& path) {
@@ -97,10 +97,10 @@ void PrefNotifierImpl::FireObservers(const std::string& path) {
return;
NotificationObserverList::Iterator it(*(observer_iterator->second));
- NotificationObserver* observer;
+ content::NotificationObserver* observer;
while ((observer = it.GetNext()) != NULL) {
observer->Observe(chrome::NOTIFICATION_PREF_CHANGED,
- Source<PrefService>(pref_service_),
- Details<const std::string>(&path));
+ content::Source<PrefService>(pref_service_),
+ content::Details<const std::string>(&path));
}
}
diff --git a/chrome/browser/prefs/pref_notifier_impl.h b/chrome/browser/prefs/pref_notifier_impl.h
index 8323fcb..b16ad11 100644
--- a/chrome/browser/prefs/pref_notifier_impl.h
+++ b/chrome/browser/prefs/pref_notifier_impl.h
@@ -14,7 +14,10 @@
#include "chrome/browser/prefs/pref_notifier.h"
class PrefService;
+
+namespace content {
class NotificationObserver;
+}
// The PrefNotifier implementation used by the PrefService.
class PrefNotifierImpl : public PrefNotifier,
@@ -25,8 +28,8 @@ class PrefNotifierImpl : public PrefNotifier,
// If the pref at the given path changes, we call the observer's Observe
// method with PREF_CHANGED.
- void AddPrefObserver(const char* path, NotificationObserver* obs);
- void RemovePrefObserver(const char* path, NotificationObserver* obs);
+ void AddPrefObserver(const char* path, content::NotificationObserver* obs);
+ void RemovePrefObserver(const char* path, content::NotificationObserver* obs);
// PrefNotifier overrides.
virtual void OnPreferenceChanged(const std::string& pref_name);
@@ -36,7 +39,7 @@ class PrefNotifierImpl : public PrefNotifier,
// A map from pref names to a list of observers. Observers get fired in the
// order they are added. These should only be accessed externally for unit
// testing.
- typedef ObserverList<NotificationObserver> NotificationObserverList;
+ typedef ObserverList<content::NotificationObserver> NotificationObserverList;
typedef base::hash_map<std::string, NotificationObserverList*>
PrefObserverMap;
diff --git a/chrome/browser/prefs/pref_notifier_impl_unittest.cc b/chrome/browser/prefs/pref_notifier_impl_unittest.cc
index 1beb430c..8eb017c 100644
--- a/chrome/browser/prefs/pref_notifier_impl_unittest.cc
+++ b/chrome/browser/prefs/pref_notifier_impl_unittest.cc
@@ -8,9 +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/common/notification_observer_mock.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
+#include "content/test/notification_observer_mock.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -34,7 +34,7 @@ class MockPrefNotifier : public PrefNotifierImpl {
MOCK_METHOD1(FireObservers, void(const std::string& path));
- size_t CountObserver(const char* path, NotificationObserver* obs) {
+ size_t CountObserver(const char* path, content::NotificationObserver* obs) {
PrefObserverMap::const_iterator observer_iterator =
pref_observers()->find(path);
if (observer_iterator == pref_observers()->end())
@@ -42,7 +42,7 @@ class MockPrefNotifier : public PrefNotifierImpl {
NotificationObserverList* observer_list = observer_iterator->second;
NotificationObserverList::Iterator it(*observer_list);
- NotificationObserver* existing_obs;
+ content::NotificationObserver* existing_obs;
size_t count = 0;
while ((existing_obs = it.GetNext()) != NULL) {
if (existing_obs == obs)
@@ -79,14 +79,14 @@ TEST_F(PrefNotifierTest, OnPreferenceChanged) {
TEST_F(PrefNotifierTest, OnInitializationCompleted) {
MockPrefNotifier notifier(&pref_service_);
- NotificationObserverMock observer;
- NotificationRegistrar registrar;
+ content::NotificationObserverMock observer;
+ content::NotificationRegistrar registrar;
registrar.Add(&observer, chrome::NOTIFICATION_PREF_INITIALIZATION_COMPLETED,
- Source<PrefService>(&pref_service_));
+ content::Source<PrefService>(&pref_service_));
EXPECT_CALL(observer, Observe(
int(chrome::NOTIFICATION_PREF_INITIALIZATION_COMPLETED),
- Source<PrefService>(&pref_service_),
- Property(&Details<bool>::ptr, testing::Pointee(true))));
+ content::Source<PrefService>(&pref_service_),
+ Property(&content::Details<bool>::ptr, testing::Pointee(true))));
notifier.OnInitializationCompleted(true);
}
diff --git a/chrome/browser/prefs/pref_observer_mock.cc b/chrome/browser/prefs/pref_observer_mock.cc
index 5d144b7..d42c69c 100644
--- a/chrome/browser/prefs/pref_observer_mock.cc
+++ b/chrome/browser/prefs/pref_observer_mock.cc
@@ -13,8 +13,8 @@ void PrefObserverMock::Expect(const PrefService* prefs,
const std::string& pref_name,
const Value* value) {
EXPECT_CALL(*this, Observe(int(chrome::NOTIFICATION_PREF_CHANGED),
- Source<PrefService>(prefs),
- Property(&Details<std::string>::ptr,
+ content::Source<PrefService>(prefs),
+ Property(&content::Details<std::string>::ptr,
Pointee(pref_name))))
.With(PrefValueMatches(prefs, pref_name, value));
}
diff --git a/chrome/browser/prefs/pref_observer_mock.h b/chrome/browser/prefs/pref_observer_mock.h
index d65d6b2..bc13ca3 100644
--- a/chrome/browser/prefs/pref_observer_mock.h
+++ b/chrome/browser/prefs/pref_observer_mock.h
@@ -9,9 +9,9 @@
#include <string>
#include "chrome/browser/prefs/pref_service.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -37,14 +37,14 @@ MATCHER_P3(PrefValueMatches, prefs, pref_name, value, "") {
}
// A mock for testing preference notifications and easy setup of expectations.
-class PrefObserverMock : public NotificationObserver {
+class PrefObserverMock : public content::NotificationObserver {
public:
PrefObserverMock();
virtual ~PrefObserverMock();
MOCK_METHOD3(Observe, void(int type,
- const NotificationSource& source,
- const NotificationDetails& details));
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details));
void Expect(const PrefService* prefs,
const std::string& pref_name,
diff --git a/chrome/browser/prefs/pref_service.cc b/chrome/browser/prefs/pref_service.cc
index c9bc91b..72b8452 100644
--- a/chrome/browser/prefs/pref_service.cc
+++ b/chrome/browser/prefs/pref_service.cc
@@ -690,12 +690,12 @@ const ListValue* PrefService::GetList(const char* path) const {
}
void PrefService::AddPrefObserver(const char* path,
- NotificationObserver* obs) {
+ content::NotificationObserver* obs) {
pref_notifier_->AddPrefObserver(path, obs);
}
void PrefService::RemovePrefObserver(const char* path,
- NotificationObserver* obs) {
+ content::NotificationObserver* obs) {
pref_notifier_->RemovePrefObserver(path, obs);
}
diff --git a/chrome/browser/prefs/pref_service.h b/chrome/browser/prefs/pref_service.h
index 5361928..3002e9d 100644
--- a/chrome/browser/prefs/pref_service.h
+++ b/chrome/browser/prefs/pref_service.h
@@ -19,7 +19,6 @@
class DefaultPrefStore;
class FilePath;
-class NotificationObserver;
class PersistentPrefStore;
class PrefModelAssociator;
class PrefNotifier;
@@ -29,6 +28,10 @@ class PrefValueStore;
class Profile;
class SyncableService;
+namespace content {
+class NotificationObserver;
+}
+
namespace subtle {
class PrefMemberBase;
class ScopedUserPrefUpdateBase;
@@ -348,8 +351,10 @@ class PrefService : public base::NonThreadSafe {
// method with PREF_CHANGED. Note that observers should not call these methods
// directly but rather use a PrefChangeRegistrar to make sure the observer
// gets cleaned up properly.
- virtual void AddPrefObserver(const char* path, NotificationObserver* obs);
- virtual void RemovePrefObserver(const char* path, NotificationObserver* obs);
+ virtual void AddPrefObserver(const char* path,
+ content::NotificationObserver* obs);
+ virtual void RemovePrefObserver(const char* path,
+ content::NotificationObserver* obs);
// Registers a new preference at |path|. The |default_value| must not be
// NULL as it determines the preference value's type.
diff --git a/chrome/browser/prefs/pref_set_observer.cc b/chrome/browser/prefs/pref_set_observer.cc
index 80faf32..92b8fa6 100644
--- a/chrome/browser/prefs/pref_set_observer.cc
+++ b/chrome/browser/prefs/pref_set_observer.cc
@@ -8,7 +8,7 @@
#include "content/public/browser/notification_types.h"
PrefSetObserver::PrefSetObserver(PrefService* pref_service,
- NotificationObserver* observer)
+ content::NotificationObserver* observer)
: pref_service_(pref_service),
observer_(observer) {
registrar_.Init(pref_service);
@@ -45,7 +45,7 @@ bool PrefSetObserver::IsManaged() {
// static
PrefSetObserver* PrefSetObserver::CreateProxyPrefSetObserver(
PrefService* pref_service,
- NotificationObserver* observer) {
+ content::NotificationObserver* observer) {
PrefSetObserver* pref_set = new PrefSetObserver(pref_service, observer);
pref_set->AddPref(prefs::kProxy);
@@ -55,7 +55,7 @@ PrefSetObserver* PrefSetObserver::CreateProxyPrefSetObserver(
// static
PrefSetObserver* PrefSetObserver::CreateDefaultSearchPrefSetObserver(
PrefService* pref_service,
- NotificationObserver* observer) {
+ content::NotificationObserver* observer) {
PrefSetObserver* pref_set = new PrefSetObserver(pref_service, observer);
pref_set->AddPref(prefs::kDefaultSearchProviderEnabled);
pref_set->AddPref(prefs::kDefaultSearchProviderName);
@@ -70,8 +70,8 @@ PrefSetObserver* PrefSetObserver::CreateDefaultSearchPrefSetObserver(
}
void PrefSetObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (observer_)
observer_->Observe(type, source, details);
}
diff --git a/chrome/browser/prefs/pref_set_observer.h b/chrome/browser/prefs/pref_set_observer.h
index 2639462..557bd83 100644
--- a/chrome/browser/prefs/pref_set_observer.h
+++ b/chrome/browser/prefs/pref_set_observer.h
@@ -11,15 +11,15 @@
#include "base/basictypes.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/browser/prefs/pref_service.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
// Observes the state of a set of preferences and allows to query their combined
// managed bits.
-class PrefSetObserver : public NotificationObserver {
+class PrefSetObserver : public content::NotificationObserver {
public:
// Initialize with an empty set of preferences.
PrefSetObserver(PrefService* pref_service,
- NotificationObserver* observer);
+ content::NotificationObserver* observer);
virtual ~PrefSetObserver();
// Add a |pref| to the set of preferences to observe.
@@ -35,25 +35,25 @@ class PrefSetObserver : public NotificationObserver {
// Create a pref set observer for all preferences relevant to proxies.
static PrefSetObserver* CreateProxyPrefSetObserver(
PrefService* pref_service,
- NotificationObserver* observer);
+ content::NotificationObserver* observer);
// Create a pref set observer for all preferences relevant to default search.
static PrefSetObserver* CreateDefaultSearchPrefSetObserver(
PrefService* pref_service,
- NotificationObserver* observer);
+ content::NotificationObserver* observer);
private:
- // Overridden from NotificationObserver.
+ // Overridden from content::NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
typedef std::set<std::string> PrefSet;
PrefSet prefs_;
PrefService* pref_service_;
PrefChangeRegistrar registrar_;
- NotificationObserver* observer_;
+ content::NotificationObserver* observer_;
DISALLOW_COPY_AND_ASSIGN(PrefSetObserver);
};
diff --git a/chrome/browser/prefs/pref_set_observer_unittest.cc b/chrome/browser/prefs/pref_set_observer_unittest.cc
index c3f7a12..e0aadf8 100644
--- a/chrome/browser/prefs/pref_set_observer_unittest.cc
+++ b/chrome/browser/prefs/pref_set_observer_unittest.cc
@@ -6,9 +6,9 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_pref_service.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_observer_mock.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.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"
@@ -28,7 +28,8 @@ class PrefSetObserverTest : public testing::Test {
PrefService::UNSYNCABLE_PREF);
}
- PrefSetObserver* CreatePrefSetObserver(NotificationObserver* observer) {
+ PrefSetObserver* CreatePrefSetObserver(
+ content::NotificationObserver* observer) {
PrefSetObserver* pref_set =
new PrefSetObserver(pref_service_.get(), observer);
pref_set->AddPref(prefs::kHomePage);
@@ -62,7 +63,8 @@ TEST_F(PrefSetObserverTest, IsManaged) {
}
MATCHER_P(PrefNameDetails, name, "details references named preference") {
- std::string* pstr = reinterpret_cast<const Details<std::string>&>(arg).ptr();
+ std::string* pstr =
+ reinterpret_cast<const content::Details<std::string>&>(arg).ptr();
return pstr && *pstr == name;
}
@@ -70,12 +72,12 @@ TEST_F(PrefSetObserverTest, Observe) {
using testing::_;
using testing::Mock;
- NotificationObserverMock observer;
+ content::NotificationObserverMock observer;
scoped_ptr<PrefSetObserver> pref_set(CreatePrefSetObserver(&observer));
EXPECT_CALL(observer,
Observe(int(chrome::NOTIFICATION_PREF_CHANGED),
- Source<PrefService>(pref_service_.get()),
+ content::Source<PrefService>(pref_service_.get()),
PrefNameDetails(prefs::kHomePage)));
pref_service_->SetUserPref(prefs::kHomePage,
Value::CreateStringValue("http://crbug.com"));
@@ -83,7 +85,7 @@ TEST_F(PrefSetObserverTest, Observe) {
EXPECT_CALL(observer,
Observe(int(chrome::NOTIFICATION_PREF_CHANGED),
- Source<PrefService>(pref_service_.get()),
+ content::Source<PrefService>(pref_service_.get()),
PrefNameDetails(prefs::kHomePageIsNewTabPage)));
pref_service_->SetUserPref(prefs::kHomePageIsNewTabPage,
Value::CreateBooleanValue(true));
diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc
index 84c0471..020424e 100644
--- a/chrome/browser/prerender/prerender_browsertest.cc
+++ b/chrome/browser/prerender/prerender_browsertest.cc
@@ -228,7 +228,7 @@ class TestPrerenderContents : public PrerenderContents {
notification_registrar().Add(
this,
content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED,
- Source<RenderWidgetHost>(new_render_view_host));
+ content::Source<RenderWidgetHost>(new_render_view_host));
new_render_view_host_ = new_render_view_host;
@@ -236,12 +236,13 @@ class TestPrerenderContents : public PrerenderContents {
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE {
if (type ==
content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED) {
- EXPECT_EQ(new_render_view_host_, Source<RenderWidgetHost>(source).ptr());
- bool is_visible = *Details<bool>(details).ptr();
+ EXPECT_EQ(new_render_view_host_,
+ content::Source<RenderWidgetHost>(source).ptr());
+ bool is_visible = *content::Details<bool>(details).ptr();
if (!is_visible) {
was_hidden_ = true;
@@ -723,7 +724,8 @@ class PrerenderBrowserTest : public InProcessBrowserTest {
page_load_observer.reset(
new ui_test_utils::WindowedNotificationObserver(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab_contents->controller())));
+ content::Source<NavigationController>(
+ &tab_contents->controller())));
}
// ui_test_utils::NavigateToURL waits until DidStopLoading is called on
@@ -1726,7 +1728,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderFavicon) {
ASSERT_TRUE(prerender_contents != NULL);
ui_test_utils::WindowedNotificationObserver favicon_update_watcher(
chrome::NOTIFICATION_FAVICON_UPDATED,
- Source<TabContents>(prerender_contents->prerender_contents()->
+ content::Source<TabContents>(prerender_contents->prerender_contents()->
tab_contents()));
NavigateToDestURL();
favicon_update_watcher.Wait();
diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc
index ef3885e..0c16105 100644
--- a/chrome/browser/prerender/prerender_contents.cc
+++ b/chrome/browser/prerender/prerender_contents.cc
@@ -299,22 +299,22 @@ void PrerenderContents::StartPrerendering(
// APP_TERMINATING before non-OTR profiles are destroyed).
// TODO(tburkard): figure out if this is needed.
notification_registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
// Register to inform new RenderViews that we're prerendering.
notification_registrar_.Add(
this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB,
- Source<TabContents>(new_contents));
+ content::Source<TabContents>(new_contents));
// Register for redirect notifications sourced from |this|.
notification_registrar_.Add(
this, content::NOTIFICATION_RESOURCE_RECEIVED_REDIRECT,
- Source<RenderViewHostDelegate>(GetRenderViewHostDelegate()));
+ content::Source<RenderViewHostDelegate>(GetRenderViewHostDelegate()));
// Register for new windows from any source.
notification_registrar_.Add(
this, content::NOTIFICATION_CREATING_NEW_WINDOW_CANCELLED,
- Source<TabContents>(new_contents));
+ content::Source<TabContents>(new_contents));
DCHECK(load_start_time_.is_null());
load_start_time_ = base::TimeTicks::Now();
@@ -381,8 +381,8 @@ PrerenderContents::~PrerenderContents() {
}
void PrerenderContents::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_PROFILE_DESTROYED:
Destroy(FINAL_STATUS_PROFILE_DESTROYED);
@@ -398,10 +398,10 @@ void PrerenderContents::Observe(int type,
// to be remembered for future matching, and if it redirects to
// an https resource, it needs to be canceled. If a subresource
// is redirected, nothing changes.
- DCHECK(Source<RenderViewHostDelegate>(source).ptr() ==
+ DCHECK(content::Source<RenderViewHostDelegate>(source).ptr() ==
GetRenderViewHostDelegate());
ResourceRedirectDetails* resource_redirect_details =
- Details<ResourceRedirectDetails>(details).ptr();
+ content::Details<ResourceRedirectDetails>(details).ptr();
CHECK(resource_redirect_details);
if (resource_redirect_details->resource_type() ==
ResourceType::MAIN_FRAME) {
@@ -413,10 +413,10 @@ void PrerenderContents::Observe(int type,
case content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB: {
if (prerender_contents_.get()) {
- DCHECK_EQ(Source<TabContents>(source).ptr(),
+ DCHECK_EQ(content::Source<TabContents>(source).ptr(),
prerender_contents_->tab_contents());
- Details<RenderViewHost> new_render_view_host(details);
+ content::Details<RenderViewHost> new_render_view_host(details);
OnRenderViewHostCreated(new_render_view_host.ptr());
// When a new RenderView is created for a prerendering TabContents,
@@ -443,7 +443,7 @@ void PrerenderContents::Observe(int type,
case content::NOTIFICATION_CREATING_NEW_WINDOW_CANCELLED: {
if (prerender_contents_.get()) {
- CHECK(Source<TabContents>(source).ptr() ==
+ CHECK(content::Source<TabContents>(source).ptr() ==
prerender_contents_->tab_contents());
// Since we don't want to permit child windows that would have a
// window.opener property, terminate prerendering.
diff --git a/chrome/browser/prerender/prerender_contents.h b/chrome/browser/prerender/prerender_contents.h
index 874502e..f508998 100644
--- a/chrome/browser/prerender/prerender_contents.h
+++ b/chrome/browser/prerender/prerender_contents.h
@@ -16,7 +16,7 @@
#include "chrome/browser/prerender/prerender_final_status.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
class Profile;
class RenderViewHost;
@@ -44,7 +44,7 @@ class PrerenderTracker;
// NavigationController because is has no facility for navigating (other than
// programatically view window.location.href) or RenderViewHostManager because
// it is never allowed to navigate across a SiteInstance boundary.
-class PrerenderContents : public NotificationObserver,
+class PrerenderContents : public content::NotificationObserver,
public TabContentsObserver {
public:
// PrerenderContents::Create uses the currently registered Factory to create
@@ -143,10 +143,10 @@ class PrerenderContents : public NotificationObserver,
RenderViewHost* render_view_host) OVERRIDE;
virtual void RenderViewGone() OVERRIDE;
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Adds an alias URL, for one of the many redirections. If the URL can not
// be prerendered - for example, it's an ftp URL - |this| will be destroyed
@@ -203,7 +203,7 @@ class PrerenderContents : public NotificationObserver,
// once the RenderViewHost has a RenderView and RenderWidgetHostView.
virtual void OnRenderViewHostCreated(RenderViewHost* new_render_view_host);
- NotificationRegistrar& notification_registrar() {
+ content::NotificationRegistrar& notification_registrar() {
return notification_registrar_;
}
@@ -255,7 +255,7 @@ class PrerenderContents : public NotificationObserver,
int32 page_id_;
GURL url_;
GURL icon_url_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
// A vector of URLs that this prerendered page matches against.
// This array can contain more than element as a result of redirects,
diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc
index cf02a58..4acfdac 100644
--- a/chrome/browser/prerender/prerender_manager.cc
+++ b/chrome/browser/prerender/prerender_manager.cc
@@ -41,8 +41,8 @@
#include "content/browser/tab_contents/render_view_host_manager.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
namespace prerender {
@@ -162,14 +162,15 @@ struct PrerenderManager::NavigationRecord {
}
};
-class PrerenderManager::MostVisitedSites : public NotificationObserver {
+class PrerenderManager::MostVisitedSites
+ : public content::NotificationObserver {
public:
explicit MostVisitedSites(Profile* profile) :
profile_(profile) {
history::TopSites* top_sites = GetTopSites();
if (top_sites) {
registrar_.Add(this, chrome::NOTIFICATION_TOP_SITES_CHANGED,
- Source<history::TopSites>(top_sites));
+ content::Source<history::TopSites>(top_sites));
}
UpdateMostVisited();
@@ -192,8 +193,8 @@ class PrerenderManager::MostVisitedSites : public NotificationObserver {
}
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(type, chrome::NOTIFICATION_TOP_SITES_CHANGED);
UpdateMostVisited();
}
@@ -211,7 +212,7 @@ class PrerenderManager::MostVisitedSites : public NotificationObserver {
CancelableRequestConsumer topsites_consumer_;
Profile* profile_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
std::set<GURL> urls_;
};
diff --git a/chrome/browser/printing/background_printing_manager.cc b/chrome/browser/printing/background_printing_manager.cc
index f1e9c24..9e8d521 100644
--- a/chrome/browser/printing/background_printing_manager.cc
+++ b/chrome/browser/printing/background_printing_manager.cc
@@ -13,8 +13,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
namespace printing {
@@ -39,15 +39,16 @@ void BackgroundPrintingManager::OwnPrintPreviewTab(
printing_tabs_.insert(preview_tab);
registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_RELEASED,
- Source<TabContentsWrapper>(preview_tab));
+ content::Source<TabContentsWrapper>(preview_tab));
// OwnInitiatorTabContents() may have already added this notification.
TabContents* preview_contents = preview_tab->tab_contents();
- if (!registrar_.IsRegistered(this,
- content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(preview_contents))) {
+ if (!registrar_.IsRegistered(
+ this,
+ content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
+ content::Source<TabContents>(preview_contents))) {
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(preview_contents));
+ content::Source<TabContents>(preview_contents));
}
// If a tab that is printing crashes, the user cannot destroy it since it is
@@ -58,9 +59,9 @@ void BackgroundPrintingManager::OwnPrintPreviewTab(
RenderProcessHost* rph = preview_tab->render_view_host()->process();
if (!registrar_.IsRegistered(this,
content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- Source<RenderProcessHost>(rph))) {
+ content::Source<RenderProcessHost>(rph))) {
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- Source<RenderProcessHost>(rph));
+ content::Source<RenderProcessHost>(rph));
}
RemoveFromTabStrip(preview_tab);
@@ -105,33 +106,35 @@ bool BackgroundPrintingManager::OwnInitiatorTab(
// OwnPrintPreviewTab() may have already added this notification.
TabContents* preview_contents = preview_tab->tab_contents();
- if (!registrar_.IsRegistered(this,
- content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(preview_contents))) {
+ if (!registrar_.IsRegistered(
+ this,
+ content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
+ content::Source<TabContents>(preview_contents))) {
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(preview_contents));
+ content::Source<TabContents>(preview_contents));
}
RemoveFromTabStrip(initiator_tab);
return true;
}
-void BackgroundPrintingManager::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void BackgroundPrintingManager::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: {
- OnRendererProcessClosed(Source<RenderProcessHost>(source).ptr());
+ OnRendererProcessClosed(content::Source<RenderProcessHost>(source).ptr());
break;
}
case chrome::NOTIFICATION_PRINT_JOB_RELEASED: {
- OnPrintJobReleased(Source<TabContentsWrapper>(source).ptr());
+ OnPrintJobReleased(content::Source<TabContentsWrapper>(source).ptr());
break;
}
case content::NOTIFICATION_TAB_CONTENTS_DESTROYED: {
OnTabContentsDestroyed(
TabContentsWrapper::GetCurrentWrapperForContents(
- Source<TabContents>(source).ptr()));
+ content::Source<TabContents>(source).ptr()));
break;
}
default: {
@@ -154,7 +157,7 @@ void BackgroundPrintingManager::OnRendererProcessClosed(
void BackgroundPrintingManager::OnPrintJobReleased(
TabContentsWrapper* preview_tab) {
registrar_.Remove(this, chrome::NOTIFICATION_PRINT_JOB_RELEASED,
- Source<TabContentsWrapper>(preview_tab));
+ content::Source<TabContentsWrapper>(preview_tab));
// This might be happening in the middle of a RenderViewGone() loop.
// Deleting |contents| later so the RenderViewGone() loop can finish.
@@ -170,7 +173,7 @@ void BackgroundPrintingManager::OnTabContentsDestroyed(
// Always need to remove this notification since the tab is gone.
registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(preview_tab->tab_contents()));
+ content::Source<TabContents>(preview_tab->tab_contents()));
// Delete the associated initiator tab if one exists.
if (is_preview_tab_for_owned_initator_tab) {
@@ -199,14 +202,15 @@ void BackgroundPrintingManager::OnTabContentsDestroyed(
}
if (!shared_rph) {
registrar_.Remove(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- Source<RenderProcessHost>(rph));
+ content::Source<RenderProcessHost>(rph));
}
// Remove other notifications and remove the tab from |printing_tabs_|.
- if (registrar_.IsRegistered(this, chrome::NOTIFICATION_PRINT_JOB_RELEASED,
- Source<TabContentsWrapper>(preview_tab))) {
+ if (registrar_.IsRegistered(
+ this, chrome::NOTIFICATION_PRINT_JOB_RELEASED,
+ content::Source<TabContentsWrapper>(preview_tab))) {
registrar_.Remove(this, chrome::NOTIFICATION_PRINT_JOB_RELEASED,
- Source<TabContentsWrapper>(preview_tab));
+ content::Source<TabContentsWrapper>(preview_tab));
}
printing_tabs_.erase(preview_tab);
}
diff --git a/chrome/browser/printing/background_printing_manager.h b/chrome/browser/printing/background_printing_manager.h
index 2ac37c7..84ae140 100644
--- a/chrome/browser/printing/background_printing_manager.h
+++ b/chrome/browser/printing/background_printing_manager.h
@@ -11,8 +11,8 @@
#include "base/compiler_specific.h"
#include "base/threading/non_thread_safe.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class RenderProcessHost;
class TabContentsWrapper;
@@ -23,7 +23,7 @@ namespace printing {
// The hidden tabs are no longer part of any Browser / TabStripModel.
// They get deleted when the tab finishes printing.
class BackgroundPrintingManager : public base::NonThreadSafe,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
typedef std::set<TabContentsWrapper*> TabContentsWrapperSet;
@@ -49,10 +49,10 @@ class BackgroundPrintingManager : public base::NonThreadSafe,
// Returns true if |printing_tabs_| contains |preview_tab|.
bool HasPrintPreviewTab(TabContentsWrapper* preview_tab);
- // NotificationObserver overrides:
+ // content::NotificationObserver overrides:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
typedef std::map<TabContentsWrapper*, TabContentsWrapper*>
@@ -76,7 +76,7 @@ class BackgroundPrintingManager : public base::NonThreadSafe,
// Value: initiator tab.
TabContentsWrapperMap map_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(BackgroundPrintingManager);
};
diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc
index 7dac1c2..aeb368a 100644
--- a/chrome/browser/printing/print_dialog_cloud.cc
+++ b/chrome/browser/printing/print_dialog_cloud.cc
@@ -30,8 +30,8 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/webui/web_ui.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "ui/base/l10n/l10n_util.h"
#include "webkit/glue/webpreferences.h"
@@ -305,12 +305,13 @@ void CloudPrintFlowHandler::RegisterMessages() {
CloudPrintURL(profile).GetCloudPrintServiceDialogURL());
}
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(controller));
+ content::Source<NavigationController>(controller));
}
-void CloudPrintFlowHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void CloudPrintFlowHandler::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_LOAD_STOP) {
// Take the opportunity to set some (minimal) additional
// script permissions required for the web UI.
diff --git a/chrome/browser/printing/print_dialog_cloud_internal.h b/chrome/browser/printing/print_dialog_cloud_internal.h
index 995b9a6..a594bd9 100644
--- a/chrome/browser/printing/print_dialog_cloud_internal.h
+++ b/chrome/browser/printing/print_dialog_cloud_internal.h
@@ -14,8 +14,8 @@
#include "base/synchronization/lock.h"
#include "chrome/browser/ui/webui/html_dialog_ui.h"
#include "content/browser/webui/web_ui.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class GURL;
class CloudPrintHtmlDialogDelegateTest;
@@ -101,7 +101,7 @@ class CloudPrintHtmlDialogDelegate;
// Probably..), and packing up the PDF and job parameters and sending
// them to the cloud.
class CloudPrintFlowHandler : public WebUIMessageHandler,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
CloudPrintFlowHandler(const FilePath& path_to_file,
const string16& print_job_title,
@@ -112,10 +112,10 @@ class CloudPrintFlowHandler : public WebUIMessageHandler,
// WebUIMessageHandler implementation.
virtual void RegisterMessages();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Callbacks from the page.
void HandleShowDebugger(const base::ListValue* args);
@@ -136,7 +136,7 @@ class CloudPrintFlowHandler : public WebUIMessageHandler,
void CancelAnyRunningTask();
CloudPrintHtmlDialogDelegate* dialog_delegate_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
FilePath path_to_file_;
string16 print_job_title_;
string16 print_ticket_;
diff --git a/chrome/browser/printing/print_dialog_cloud_unittest.cc b/chrome/browser/printing/print_dialog_cloud_unittest.cc
index d95a4d8..6158560 100644
--- a/chrome/browser/printing/print_dialog_cloud_unittest.cc
+++ b/chrome/browser/printing/print_dialog_cloud_unittest.cc
@@ -20,8 +20,8 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/testing_profile.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -93,8 +93,8 @@ class MockCloudPrintFlowHandler
MOCK_METHOD0(RegisterMessages, void());
MOCK_METHOD3(Observe,
void(int type,
- const NotificationSource& source,
- const NotificationDetails& details));
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details));
MOCK_METHOD1(SetDialogDelegate,
void(CloudPrintHtmlDialogDelegate* delegate));
MOCK_METHOD0(CreateCloudPrintDataSender,
diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc
index 0b180a2..9796f78 100644
--- a/chrome/browser/printing/print_job.cc
+++ b/chrome/browser/printing/print_job.cc
@@ -61,16 +61,16 @@ void PrintJob::Initialize(PrintJobWorkerOwner* job,
// Don't forget to register to our own messages.
registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
- Source<PrintJob>(this));
+ content::Source<PrintJob>(this));
}
void PrintJob::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(ui_message_loop_, MessageLoop::current());
switch (type) {
case chrome::NOTIFICATION_PRINT_JOB_EVENT: {
- OnNotifyPrintJobEvent(*Details<JobEventDetails>(details).ptr());
+ OnNotifyPrintJobEvent(*content::Details<JobEventDetails>(details).ptr());
break;
}
default: {
@@ -126,8 +126,8 @@ void PrintJob::StartPrinting() {
new JobEventDetails(JobEventDetails::NEW_DOC, document_.get(), NULL));
NotificationService::current()->Notify(
chrome::NOTIFICATION_PRINT_JOB_EVENT,
- Source<PrintJob>(this),
- Details<JobEventDetails>(details.get()));
+ content::Source<PrintJob>(this),
+ content::Details<JobEventDetails>(details.get()));
}
void PrintJob::Stop() {
@@ -142,7 +142,7 @@ void PrintJob::Stop() {
is_job_pending_ = false;
registrar_.Remove(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
- Source<PrintJob>(this));
+ content::Source<PrintJob>(this));
}
// Flush the cached document.
UpdatePrintedDocument(NULL);
@@ -168,8 +168,8 @@ void PrintJob::Cancel() {
new JobEventDetails(JobEventDetails::FAILED, NULL, NULL));
NotificationService::current()->Notify(
chrome::NOTIFICATION_PRINT_JOB_EVENT,
- Source<PrintJob>(this),
- Details<JobEventDetails>(details.get()));
+ content::Source<PrintJob>(this),
+ content::Details<JobEventDetails>(details.get()));
Stop();
is_canceling_ = false;
}
@@ -275,8 +275,8 @@ void PrintJob::OnDocumentDone() {
new JobEventDetails(JobEventDetails::JOB_DONE, document_.get(), NULL));
NotificationService::current()->Notify(
chrome::NOTIFICATION_PRINT_JOB_EVENT,
- Source<PrintJob>(this),
- Details<JobEventDetails>(details.get()));
+ content::Source<PrintJob>(this),
+ content::Details<JobEventDetails>(details.get()));
}
void PrintJob::ControlledWorkerShutdown() {
diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h
index e0d7e46..265ed687 100644
--- a/chrome/browser/printing/print_job.h
+++ b/chrome/browser/printing/print_job.h
@@ -10,8 +10,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "chrome/browser/printing/print_job_worker_owner.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class GURL;
class Thread;
@@ -34,7 +34,7 @@ class PrinterQuery;
// reference to the job to be sure it is kept alive. All the code in this class
// runs in the UI thread.
class PrintJob : public PrintJobWorkerOwner,
- public NotificationObserver,
+ public content::NotificationObserver,
public MessageLoop::DestructionObserver {
public:
// Create a empty PrintJob. When initializing with this constructor,
@@ -46,10 +46,10 @@ class PrintJob : public PrintJobWorkerOwner,
void Initialize(PrintJobWorkerOwner* job, PrintedPagesSource* source,
int page_count);
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// PrintJobWorkerOwner
virtual void GetSettingsDone(const PrintSettings& new_settings,
@@ -109,7 +109,7 @@ class PrintJob : public PrintJobWorkerOwner,
// eventual deadlock.
void ControlledWorkerShutdown();
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Main message loop reference. Used to send notifications in the right
// thread.
diff --git a/chrome/browser/printing/print_job_manager.cc b/chrome/browser/printing/print_job_manager.cc
index c692d17..dad6ad7 100644
--- a/chrome/browser/printing/print_job_manager.cc
+++ b/chrome/browser/printing/print_job_manager.cc
@@ -95,12 +95,12 @@ void PrintJobManager::RegisterPrefs(PrefService* prefs) {
}
void PrintJobManager::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_PRINT_JOB_EVENT: {
- OnPrintJobEvent(Source<PrintJob>(source).ptr(),
- *Details<JobEventDetails>(details).ptr());
+ OnPrintJobEvent(content::Source<PrintJob>(source).ptr(),
+ *content::Details<JobEventDetails>(details).ptr());
break;
}
default: {
diff --git a/chrome/browser/printing/print_job_manager.h b/chrome/browser/printing/print_job_manager.h
index 47b1052..72548da 100644
--- a/chrome/browser/printing/print_job_manager.h
+++ b/chrome/browser/printing/print_job_manager.h
@@ -11,8 +11,8 @@
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "chrome/browser/prefs/pref_member.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class PrefService;
@@ -24,7 +24,7 @@ class PrintJob;
class PrintedPage;
class PrinterQuery;
-class PrintJobManager : public NotificationObserver {
+class PrintJobManager : public content::NotificationObserver {
public:
PrintJobManager();
virtual ~PrintJobManager();
@@ -51,10 +51,10 @@ class PrintJobManager : public NotificationObserver {
static void RegisterPrefs(PrefService* prefs);
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
bool printing_enabled() {
return *printing_enabled_;
@@ -68,7 +68,7 @@ class PrintJobManager : public NotificationObserver {
void OnPrintJobEvent(PrintJob* print_job,
const JobEventDetails& event_details);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Used to serialize access to queued_workers_.
base::Lock lock_;
diff --git a/chrome/browser/printing/print_job_unittest.cc b/chrome/browser/printing/print_job_unittest.cc
index 33171b3..54d6017 100644
--- a/chrome/browser/printing/print_job_unittest.cc
+++ b/chrome/browser/printing/print_job_unittest.cc
@@ -7,7 +7,7 @@
#include "chrome/browser/printing/print_job.h"
#include "chrome/browser/printing/print_job_worker.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "printing/printed_pages_source.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -71,12 +71,12 @@ class TestPrintJob : public printing::PrintJob {
volatile bool* check_;
};
-class TestPrintNotifObserv : public NotificationObserver {
+class TestPrintNotifObserv : public content::NotificationObserver {
public:
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
ADD_FAILURE();
}
};
@@ -98,7 +98,7 @@ TEST_F(PrintJobTest, MAYBE_SimplePrint) {
// This message loop is actually never run.
MessageLoop current;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
TestPrintNotifObserv observ;
registrar_.Add(&observ, content::NOTIFICATION_ALL,
NotificationService::AllSources());
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
index e8074f79..6b4925a 100644
--- a/chrome/browser/printing/print_job_worker.cc
+++ b/chrome/browser/printing/print_job_worker.cc
@@ -41,8 +41,8 @@ class PrintJobWorker::NotificationTask : public Task {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PRINT_JOB_EVENT,
// We know that is is a PrintJob object in this circumstance.
- Source<PrintJob>(static_cast<PrintJob*>(print_job_.get())),
- Details<JobEventDetails>(details_));
+ content::Source<PrintJob>(static_cast<PrintJob*>(print_job_.get())),
+ content::Details<JobEventDetails>(details_));
}
// The job which originates this notification.
diff --git a/chrome/browser/printing/print_preview_tab_controller.cc b/chrome/browser/printing/print_preview_tab_controller.cc
index 330eca5..8229b9f 100644
--- a/chrome/browser/printing/print_preview_tab_controller.cc
+++ b/chrome/browser/printing/print_preview_tab_controller.cc
@@ -25,8 +25,8 @@
#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_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "webkit/plugins/webplugininfo.h"
@@ -105,16 +105,17 @@ TabContentsWrapper* PrintPreviewTabController::GetPrintPreviewForTab(
return NULL;
}
-void PrintPreviewTabController::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void PrintPreviewTabController::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: {
- OnRendererProcessClosed(Source<RenderProcessHost>(source).ptr());
+ OnRendererProcessClosed(content::Source<RenderProcessHost>(source).ptr());
break;
}
case content::NOTIFICATION_TAB_CONTENTS_DESTROYED: {
- TabContents* tab = Source<TabContents>(source).ptr();
+ TabContents* tab = content::Source<TabContents>(source).ptr();
TabContentsWrapper* wrapper =
TabContentsWrapper::GetCurrentWrapperForContents(tab);
OnTabContentsDestroyed(wrapper);
@@ -122,12 +123,12 @@ void PrintPreviewTabController::Observe(int type,
}
case content::NOTIFICATION_NAV_ENTRY_COMMITTED: {
NavigationController* controller =
- Source<NavigationController>(source).ptr();
+ content::Source<NavigationController>(source).ptr();
TabContentsWrapper* wrapper =
TabContentsWrapper::GetCurrentWrapperForContents(
controller->tab_contents());
content::LoadCommittedDetails* load_details =
- Details<content::LoadCommittedDetails>(details).ptr();
+ content::Details<content::LoadCommittedDetails>(details).ptr();
OnNavEntryCommitted(wrapper, load_details);
break;
}
@@ -338,36 +339,38 @@ void PrintPreviewTabController::SetInitiatorTabURLAndTitle(
void PrintPreviewTabController::AddObservers(TabContentsWrapper* tab) {
TabContents* contents = tab->tab_contents();
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(contents));
- registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(&contents->controller()));
+ content::Source<TabContents>(contents));
+ registrar_.Add(
+ this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
+ content::Source<NavigationController>(&contents->controller()));
// Multiple sites may share the same RenderProcessHost, so check if this
// notification has already been added.
RenderProcessHost* rph = tab->render_view_host()->process();
if (!registrar_.IsRegistered(this,
content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- Source<RenderProcessHost>(rph))) {
+ content::Source<RenderProcessHost>(rph))) {
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- Source<RenderProcessHost>(rph));
+ content::Source<RenderProcessHost>(rph));
}
}
void PrintPreviewTabController::RemoveObservers(TabContentsWrapper* tab) {
TabContents* contents = tab->tab_contents();
registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(contents));
- registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(&contents->controller()));
+ content::Source<TabContents>(contents));
+ registrar_.Remove(
+ this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
+ content::Source<NavigationController>(&contents->controller()));
// Multiple sites may share the same RenderProcessHost, so check if this
// notification has already been added.
RenderProcessHost* rph = tab->render_view_host()->process();
if (registrar_.IsRegistered(this,
content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- Source<RenderProcessHost>(rph))) {
+ content::Source<RenderProcessHost>(rph))) {
registrar_.Remove(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- Source<RenderProcessHost>(rph));
+ content::Source<RenderProcessHost>(rph));
}
}
diff --git a/chrome/browser/printing/print_preview_tab_controller.h b/chrome/browser/printing/print_preview_tab_controller.h
index afd8b93..ad21fbd 100644
--- a/chrome/browser/printing/print_preview_tab_controller.h
+++ b/chrome/browser/printing/print_preview_tab_controller.h
@@ -17,8 +17,8 @@
#include "base/memory/ref_counted.h"
#include "chrome/browser/sessions/session_id.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class Browser;
class GURL;
@@ -33,7 +33,7 @@ namespace printing {
class PrintPreviewTabController
: public base::RefCounted<PrintPreviewTabController>,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
PrintPreviewTabController();
@@ -58,10 +58,10 @@ class PrintPreviewTabController
// Returns NULL if no initiator tab exists for |preview_tab|.
TabContentsWrapper* GetInitiatorTab(TabContentsWrapper* preview_tab);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Returns true if |tab| is a print preview tab.
static bool IsPrintPreviewTab(TabContentsWrapper* tab);
@@ -108,7 +108,7 @@ class PrintPreviewTabController
PrintPreviewTabMap preview_tab_map_;
// A registrar for listening notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// True if the controller is waiting for a new preview tab via
// content::NAVIGATION_TYPE_NEW_PAGE.
diff --git a/chrome/browser/printing/print_preview_tab_controller_unittest.cc b/chrome/browser/printing/print_preview_tab_controller_unittest.cc
index 8b418d4..8b45f65 100644
--- a/chrome/browser/printing/print_preview_tab_controller_unittest.cc
+++ b/chrome/browser/printing/print_preview_tab_controller_unittest.cc
@@ -101,8 +101,8 @@ TEST_F(PrintPreviewTabControllerUnitTest, TitleAfterReload) {
details.entry = entry.get();
NotificationService::current()->Notify(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(&preview_tab->controller()),
- Details<content::LoadCommittedDetails>(&details));
+ content::Source<NavigationController>(&preview_tab->controller()),
+ content::Details<content::LoadCommittedDetails>(&details));
EXPECT_EQ(initiator_tab->tab_contents()->GetTitle(),
preview_ui->initiator_tab_title_);
}
diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc
index 6ffab8e..45f0700 100644
--- a/chrome/browser/printing/print_view_manager.cc
+++ b/chrome/browser/printing/print_view_manager.cc
@@ -19,9 +19,9 @@
#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_details.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "printing/metafile.h"
#include "printing/metafile_impl.h"
@@ -238,7 +238,7 @@ void PrintViewManager::OnPrintingFailed(int cookie) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PRINT_JOB_RELEASED,
- Source<TabContents>(tab_contents()),
+ content::Source<TabContents>(tab_contents()),
NotificationService::NoDetails());
}
@@ -258,11 +258,11 @@ bool PrintViewManager::OnMessageReceived(const IPC::Message& message) {
}
void PrintViewManager::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_PRINT_JOB_EVENT: {
- OnNotifyPrintJobEvent(*Details<JobEventDetails>(details).ptr());
+ OnNotifyPrintJobEvent(*content::Details<JobEventDetails>(details).ptr());
break;
}
default: {
@@ -280,7 +280,7 @@ void PrintViewManager::OnNotifyPrintJobEvent(
NotificationService::current()->Notify(
chrome::NOTIFICATION_PRINT_JOB_RELEASED,
- Source<TabContentsWrapper>(tab_),
+ content::Source<TabContentsWrapper>(tab_),
NotificationService::NoDetails());
break;
}
@@ -310,7 +310,7 @@ void PrintViewManager::OnNotifyPrintJobEvent(
NotificationService::current()->Notify(
chrome::NOTIFICATION_PRINT_JOB_RELEASED,
- Source<TabContentsWrapper>(tab_),
+ content::Source<TabContentsWrapper>(tab_),
NotificationService::NoDetails());
break;
}
@@ -392,7 +392,7 @@ bool PrintViewManager::CreateNewPrintJob(PrintJobWorkerOwner* job) {
print_job_ = new PrintJob();
print_job_->Initialize(job, this, number_pages_);
registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
- Source<PrintJob>(print_job_.get()));
+ content::Source<PrintJob>(print_job_.get()));
printing_succeeded_ = false;
return true;
}
@@ -452,7 +452,7 @@ void PrintViewManager::ReleasePrintJob() {
PrintingDone(printing_succeeded_);
registrar_.Remove(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
- Source<PrintJob>(print_job_.get()));
+ content::Source<PrintJob>(print_job_.get()));
print_job_->DisconnectSource();
// Don't close the worker thread.
print_job_ = NULL;
diff --git a/chrome/browser/printing/print_view_manager.h b/chrome/browser/printing/print_view_manager.h
index ec31134..d75e3d8 100644
--- a/chrome/browser/printing/print_view_manager.h
+++ b/chrome/browser/printing/print_view_manager.h
@@ -9,8 +9,8 @@
#include "base/memory/ref_counted.h"
#include "base/string16.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "printing/printed_pages_source.h"
class RenderViewHost;
@@ -26,7 +26,7 @@ class PrintViewManagerObserver;
// Manages the print commands in relation to a TabContents. TabContents
// delegates a few printing related commands to this instance.
-class PrintViewManager : public NotificationObserver,
+class PrintViewManager : public content::NotificationObserver,
public PrintedPagesSource,
public TabContentsObserver {
public:
@@ -71,10 +71,10 @@ class PrintViewManager : public NotificationObserver,
// PrintedPagesSource implementation.
virtual string16 RenderSourceName() OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// TabContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
@@ -147,7 +147,7 @@ class PrintViewManager : public NotificationObserver,
// TabContentsWrapper we're associated with.
TabContentsWrapper* tab_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Manages the low-level talk to the printer.
scoped_refptr<PrintJob> print_job_;
diff --git a/chrome/browser/profiles/avatar_menu_model.cc b/chrome/browser/profiles/avatar_menu_model.cc
index 82db6c4..fd54aa5 100644
--- a/chrome/browser/profiles/avatar_menu_model.cc
+++ b/chrome/browser/profiles/avatar_menu_model.cc
@@ -109,8 +109,8 @@ const AvatarMenuModel::Item& AvatarMenuModel::GetItemAt(size_t index) {
}
void AvatarMenuModel::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, type);
RebuildMenu();
observer_->OnAvatarMenuModelChanged(this);
diff --git a/chrome/browser/profiles/avatar_menu_model.h b/chrome/browser/profiles/avatar_menu_model.h
index 24158019..b98bee3 100644
--- a/chrome/browser/profiles/avatar_menu_model.h
+++ b/chrome/browser/profiles/avatar_menu_model.h
@@ -10,8 +10,8 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/string16.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class AvatarMenuModelObserver;
class Browser;
@@ -25,7 +25,7 @@ class Image;
// avatar icon is clicked in the browser window frame. This class will notify
// its observer when the backend data changes, and the controller/view for this
// model should forward actions back to it in response to user events.
-class AvatarMenuModel : public NotificationObserver {
+class AvatarMenuModel : public content::NotificationObserver {
public:
// Represents an item in the menu.
struct Item {
@@ -76,10 +76,10 @@ class AvatarMenuModel : public NotificationObserver {
// last active browser changes, the model needs to update accordingly.
void set_browser(Browser* browser) { browser_ = browser; }
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// True if avatar menu should be displayed.
static bool ShouldShowAvatarMenu();
@@ -104,7 +104,7 @@ class AvatarMenuModel : public NotificationObserver {
std::vector<Item*> items_;
// Listens for notifications from the ProfileInfoCache.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(AvatarMenuModel);
};
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index bda5e1d..61f21a1 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -118,7 +118,7 @@ void OffTheRecordProfileImpl::Init() {
OffTheRecordProfileImpl::~OffTheRecordProfileImpl() {
NotificationService::current()->Notify(
- chrome::NOTIFICATION_PROFILE_DESTROYED, Source<Profile>(this),
+ chrome::NOTIFICATION_PROFILE_DESTROYED, content::Source<Profile>(this),
NotificationService::NoDetails());
ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext(
@@ -384,7 +384,7 @@ HostZoomMap* OffTheRecordProfileImpl::GetHostZoomMap() {
// Observe parent's HZM change for propagating change of parent's
// change to this HZM.
registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
- Source<HostZoomMap>(profile_->GetHostZoomMap()));
+ content::Source<HostZoomMap>(profile_->GetHostZoomMap()));
}
return host_zoom_map_.get();
}
@@ -565,10 +565,11 @@ void OffTheRecordProfileImpl::ClearNetworkingHistorySince(base::Time time) {
}
void OffTheRecordProfileImpl::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_ZOOM_LEVEL_CHANGED) {
- const std::string& host = *(Details<const std::string>(details).ptr());
+ const std::string& host =
+ *(content::Details<const std::string>(details).ptr());
if (!host.empty()) {
double level = profile_->GetHostZoomMap()->GetZoomLevel(host);
GetHostZoomMap()->SetZoomLevel(host, level);
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.h b/chrome/browser/profiles/off_the_record_profile_impl.h
index 4f51975..7108e02 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.h
+++ b/chrome/browser/profiles/off_the_record_profile_impl.h
@@ -11,7 +11,7 @@
#include "chrome/browser/profiles/off_the_record_profile_io_data.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_list.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
using base::Time;
using base::TimeDelta;
@@ -27,7 +27,7 @@ using base::TimeDelta;
////////////////////////////////////////////////////////////////////////////////
class OffTheRecordProfileImpl : public Profile,
public BrowserList::Observer,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit OffTheRecordProfileImpl(Profile* real_profile);
virtual ~OffTheRecordProfileImpl();
@@ -128,15 +128,15 @@ class OffTheRecordProfileImpl : public Profile,
virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE;
virtual void ClearNetworkingHistorySince(base::Time time) OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
void CreateQuotaManagerAndClients();
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The real underlying profile.
Profile* profile_;
diff --git a/chrome/browser/profiles/off_the_record_profile_impl_unittest.cc b/chrome/browser/profiles/off_the_record_profile_impl_unittest.cc
index 6303a4c..a77bae0 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl_unittest.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl_unittest.cc
@@ -18,7 +18,7 @@
namespace {
class TestingProfileWithHostZoomMap : public TestingProfile,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
TestingProfileWithHostZoomMap() {}
@@ -29,7 +29,7 @@ class TestingProfileWithHostZoomMap : public TestingProfile,
host_zoom_map_ = new HostZoomMap();
registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
- Source<HostZoomMap>(host_zoom_map_));
+ content::Source<HostZoomMap>(host_zoom_map_));
}
return host_zoom_map_.get();
}
@@ -45,9 +45,10 @@ class TestingProfileWithHostZoomMap : public TestingProfile,
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE {
- const std::string& host = *(Details<const std::string>(details).ptr());
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE {
+ const std::string& host =
+ *(content::Details<const std::string>(details).ptr());
if (type == content::NOTIFICATION_ZOOM_LEVEL_CHANGED) {
if (!host.empty()) {
double level = host_zoom_map_->GetZoomLevel(host);
@@ -64,7 +65,7 @@ class TestingProfileWithHostZoomMap : public TestingProfile,
}
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
scoped_refptr<HostZoomMap> host_zoom_map_;
scoped_ptr<Profile> off_the_record_profile_;
scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_;
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 3879685..11e1b65 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -304,7 +304,7 @@ ProfileImpl::ProfileImpl(const FilePath& path,
// Wait for the notifcation that prefs has been loaded (successfully or
// not).
registrar_.Add(this, chrome::NOTIFICATION_PREF_INITIALIZATION_COMPLETED,
- Source<PrefService>(prefs_.get()));
+ content::Source<PrefService>(prefs_.get()));
} else {
// Load prefs synchronously.
prefs_.reset(PrefService::CreatePrefService(
@@ -346,7 +346,7 @@ void ProfileImpl::DoFinalInit() {
// Listen for bookmark model load, to bootstrap the sync service.
// On CrOS sync service will be initialized after sign in.
registrar_.Add(this, chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
- Source<Profile>(this));
+ content::Source<Profile>(this));
#endif
PrefService* local_state = g_browser_process->local_state();
@@ -428,7 +428,7 @@ void ProfileImpl::DoFinalInit() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_CREATED,
- Source<Profile>(this),
+ content::Source<Profile>(this),
NotificationService::NoDetails());
}
@@ -633,7 +633,7 @@ void ProfileImpl::set_last_selected_directory(const FilePath& path) {
ProfileImpl::~ProfileImpl() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_DESTROYED,
- Source<Profile>(this),
+ content::Source<Profile>(this),
NotificationService::NoDetails());
if (appcache_service_ && clear_local_state_on_exit_) {
@@ -754,7 +754,7 @@ Profile* ProfileImpl::GetOffTheRecordProfile() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_CREATED,
- Source<Profile>(off_the_record_profile_.get()),
+ content::Source<Profile>(off_the_record_profile_.get()),
NotificationService::NoDetails());
}
return off_the_record_profile_.get();
@@ -1020,7 +1020,7 @@ HostZoomMap* ProfileImpl::GetHostZoomMap() {
}
registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
- Source<HostZoomMap>(host_zoom_map_));
+ content::Source<HostZoomMap>(host_zoom_map_));
}
return host_zoom_map_.get();
}
@@ -1392,22 +1392,22 @@ void ProfileImpl::MarkAsCleanShutdown() {
}
void ProfileImpl::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_PREF_INITIALIZATION_COMPLETED: {
- bool* succeeded = Details<bool>(details).ptr();
- PrefService *prefs = Source<PrefService>(source).ptr();
+ bool* succeeded = content::Details<bool>(details).ptr();
+ PrefService *prefs = content::Source<PrefService>(source).ptr();
DCHECK(prefs == prefs_.get());
registrar_.Remove(this,
chrome::NOTIFICATION_PREF_INITIALIZATION_COMPLETED,
- Source<PrefService>(prefs));
+ content::Source<PrefService>(prefs));
OnPrefsLoaded(*succeeded);
break;
}
case chrome::NOTIFICATION_PREF_CHANGED: {
- std::string* pref_name_in = Details<std::string>(details).ptr();
- PrefService* prefs = Source<PrefService>(source).ptr();
+ std::string* pref_name_in = content::Details<std::string>(details).ptr();
+ PrefService* prefs = content::Source<PrefService>(source).ptr();
DCHECK(pref_name_in && prefs);
if (*pref_name_in == prefs::kSpellCheckDictionary ||
*pref_name_in == prefs::kEnableSpellCheck) {
@@ -1452,10 +1452,11 @@ void ProfileImpl::Observe(int type,
case chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED:
GetProfileSyncService(); // Causes lazy-load if sync is enabled.
registrar_.Remove(this, chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
- Source<Profile>(this));
+ content::Source<Profile>(this));
break;
case content::NOTIFICATION_ZOOM_LEVEL_CHANGED: {
- const std::string& host = *(Details<const std::string>(details).ptr());
+ const std::string& host =
+ *(content::Details<const std::string>(details).ptr());
if (!host.empty()) {
double level = host_zoom_map_->GetZoomLevel(host);
DictionaryPrefUpdate update(prefs_.get(), prefs::kPerHostZoomLevels);
diff --git a/chrome/browser/profiles/profile_impl.h b/chrome/browser/profiles/profile_impl.h
index da72a41..cc9fbe7 100644
--- a/chrome/browser/profiles/profile_impl.h
+++ b/chrome/browser/profiles/profile_impl.h
@@ -15,8 +15,8 @@
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_impl_io_data.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class ExtensionNavigationObserver;
class ExtensionPrefs;
@@ -37,7 +37,7 @@ class Preferences;
// The default profile implementation.
class ProfileImpl : public Profile,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
virtual ~ProfileImpl();
@@ -140,10 +140,10 @@ class ProfileImpl : public Profile,
virtual PrefProxyConfigTracker* GetProxyConfigTracker() OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
friend class Profile;
@@ -182,7 +182,7 @@ class ProfileImpl : public Profile,
SpellCheckProfile* GetSpellCheckProfile();
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
PrefChangeRegistrar pref_change_registrar_;
FilePath path_;
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index 95af1dd..7686070 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -105,8 +105,8 @@ class ChromeCookieMonsterDelegate : public net::CookieMonster::Delegate {
ChromeCookieDetails cookie_details(&cookie, removed, cause);
NotificationService::current()->Notify(
chrome::NOTIFICATION_COOKIE_CHANGED,
- Source<Profile>(profile),
- Details<ChromeCookieDetails>(&cookie_details));
+ 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 d431142..7ee8b3f 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -416,8 +416,8 @@ void ProfileManager::NewWindowWithProfile(
void ProfileManager::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
#if defined(OS_CHROMEOS)
if (type == chrome::NOTIFICATION_LOGIN_USER_CHANGED) {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
@@ -443,7 +443,7 @@ void ProfileManager::OnImportFinished(Profile* profile) {
DCHECK(profile);
NotificationService::current()->Notify(
chrome::NOTIFICATION_IMPORT_FINISHED,
- Source<Profile>(profile),
+ content::Source<Profile>(profile),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h
index 27347ab..a99bf0d 100644
--- a/chrome/browser/profiles/profile_manager.h
+++ b/chrome/browser/profiles/profile_manager.h
@@ -21,8 +21,8 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_init.h"
#include "chrome/browser/ui/browser_list.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class NewProfileLauncher;
class ProfileInfoCache;
@@ -55,7 +55,7 @@ class ProfileManagerObserver {
class ProfileManager : public base::NonThreadSafe,
public BrowserList::Observer,
- public NotificationObserver,
+ public content::NotificationObserver,
public Profile::Delegate {
public:
explicit ProfileManager(const FilePath& user_data_dir);
@@ -113,10 +113,10 @@ class ProfileManager : public base::NonThreadSafe,
// related with the creation order.
std::vector<Profile*> GetLoadedProfiles() const;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// BrowserList::Observer implementation.
virtual void OnBrowserAdded(const Browser* browser);
@@ -244,7 +244,7 @@ class ProfileManager : public base::NonThreadSafe,
// For ChromeOS, determines if profile should be otr.
bool ShouldGoOffTheRecord();
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The path to the user data directory (DIR_USER_DATA).
const FilePath user_data_dir_;
diff --git a/chrome/browser/remoting/firewall_traversal_observer.cc b/chrome/browser/remoting/firewall_traversal_observer.cc
index 76041dc..4e55e35 100644
--- a/chrome/browser/remoting/firewall_traversal_observer.cc
+++ b/chrome/browser/remoting/firewall_traversal_observer.cc
@@ -49,14 +49,14 @@ void FirewallTraversalObserver::RegisterUserPrefs(PrefService* prefs) {
void FirewallTraversalObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_PREF_CHANGED: {
- std::string* pref_name_in = Details<std::string>(details).ptr();
+ std::string* pref_name_in = content::Details<std::string>(details).ptr();
Profile* profile =
Profile::FromBrowserContext(tab_contents()->browser_context());
- DCHECK(Source<PrefService>(source).ptr() == profile->GetPrefs());
+ DCHECK(content::Source<PrefService>(source).ptr() == profile->GetPrefs());
if (*pref_name_in == prefs::kRemoteAccessClientFirewallTraversal) {
UpdateFirewallTraversalState();
} else {
diff --git a/chrome/browser/remoting/firewall_traversal_observer.h b/chrome/browser/remoting/firewall_traversal_observer.h
index 2667fb6..9cb5bba 100644
--- a/chrome/browser/remoting/firewall_traversal_observer.h
+++ b/chrome/browser/remoting/firewall_traversal_observer.h
@@ -8,14 +8,14 @@
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "ipc/ipc_channel.h"
// Per-tab class to manage the firewall traversal policies for
// the remoting plugin.
// TODO(dmaclach): Replace this with a more generic mechanism for
// plugins to access preferences. http://crbug.com/90543
-class FirewallTraversalObserver : public NotificationObserver,
+class FirewallTraversalObserver : public content::NotificationObserver,
public TabContentsObserver {
public:
explicit FirewallTraversalObserver(TabContents* tab_contents);
@@ -23,10 +23,10 @@ class FirewallTraversalObserver : public NotificationObserver,
static void RegisterUserPrefs(PrefService* prefs);
- // NotificationObserver overrides:
+ // content::NotificationObserver overrides:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// IPC::Channel::Listener overrides:
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
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 8945f04..9737c58 100644
--- a/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
+++ b/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
@@ -148,13 +148,13 @@ void ChromeRenderViewHostObserver::OnDomOperationResponse(
DomOperationNotificationDetails details(json_string, automation_id);
NotificationService::current()->Notify(
chrome::NOTIFICATION_DOM_OPERATION_RESPONSE,
- Source<RenderViewHost>(render_view_host()),
- Details<DomOperationNotificationDetails>(&details));
+ content::Source<RenderViewHost>(render_view_host()),
+ content::Details<DomOperationNotificationDetails>(&details));
}
void ChromeRenderViewHostObserver::OnFocusedEditableNodeTouched() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_FOCUSED_EDITABLE_NODE_TOUCHED,
- Source<RenderViewHost>(render_view_host()),
+ content::Source<RenderViewHost>(render_view_host()),
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 ea94aaf..494e975 100644
--- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
@@ -80,7 +80,8 @@ void NotifyDownloadInitiatedOnUI(int render_process_id, int render_view_id) {
return;
NotificationService::current()->Notify(
- chrome::NOTIFICATION_DOWNLOAD_INITIATED, Source<RenderViewHost>(rvh),
+ chrome::NOTIFICATION_DOWNLOAD_INITIATED,
+ content::Source<RenderViewHost>(rvh),
NotificationService::NoDetails());
}
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 bb48956..98421a5 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_views.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_views.cc
@@ -422,9 +422,10 @@ void RenderWidgetHostViewViews::SelectionBoundsChanged(
}
}
-void RenderWidgetHostViewViews::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void RenderWidgetHostViewViews::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
#if defined(TOUCH_UI)
if (type != chrome::NOTIFICATION_KEYBOARD_VISIBLE_BOUNDS_CHANGED) {
NOTREACHED();
diff --git a/chrome/browser/renderer_host/render_widget_host_view_views.h b/chrome/browser/renderer_host/render_widget_host_view_views.h
index 91bdf46..c476765 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_views.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_views.h
@@ -14,8 +14,8 @@
#include "base/task.h"
#include "base/time.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "ui/gfx/compositor/compositor_observer.h"
#include "ui/gfx/native_widget_types.h"
@@ -48,7 +48,7 @@ class RenderWidgetHostViewViews : public RenderWidgetHostView,
#endif
public views::TouchSelectionClientView,
public views::TextInputClient,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// Internal class name.
static const char kViewClassName[];
@@ -130,10 +130,10 @@ class RenderWidgetHostViewViews : public RenderWidgetHostView,
virtual void SelectRect(const gfx::Point& start,
const gfx::Point& end) OVERRIDE;
- // Overriden from NotificationObserver
+ // Overriden from content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Overridden from ui::SimpleMenuModel::Delegate.
virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
@@ -310,7 +310,7 @@ class RenderWidgetHostViewViews : public RenderWidgetHostView,
#if defined(TOUCH_UI)
// used to register for keyboard visiblity notificatons.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
gfx::Rect keyboard_rect_;
#endif
diff --git a/chrome/browser/renderer_host/web_cache_manager.cc b/chrome/browser/renderer_host/web_cache_manager.cc
index d6cac02..07ae824 100644
--- a/chrome/browser/renderer_host/web_cache_manager.cc
+++ b/chrome/browser/renderer_host/web_cache_manager.cc
@@ -158,16 +158,18 @@ void WebCacheManager::ClearCacheOnNavigation() {
}
void WebCacheManager::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_CREATED: {
- RenderProcessHost* process = Source<RenderProcessHost>(source).ptr();
+ RenderProcessHost* process =
+ content::Source<RenderProcessHost>(source).ptr();
Add(process->id());
break;
}
case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED: {
- RenderProcessHost* process = Source<RenderProcessHost>(source).ptr();
+ RenderProcessHost* process =
+ content::Source<RenderProcessHost>(source).ptr();
Remove(process->id());
break;
}
diff --git a/chrome/browser/renderer_host/web_cache_manager.h b/chrome/browser/renderer_host/web_cache_manager.h
index 0006572..e93a26c 100644
--- a/chrome/browser/renderer_host/web_cache_manager.h
+++ b/chrome/browser/renderer_host/web_cache_manager.h
@@ -18,15 +18,15 @@
#include "base/gtest_prod_util.h"
#include "base/task.h"
#include "base/time.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
template<typename Type>
struct DefaultSingletonTraits;
class PrefService;
-class WebCacheManager : public NotificationObserver {
+class WebCacheManager : public content::NotificationObserver {
friend class WebCacheManagerTest;
FRIEND_TEST_ALL_PREFIXES(WebCacheManagerBrowserTest, CrashOnceOnly);
@@ -74,10 +74,10 @@ class WebCacheManager : public NotificationObserver {
// to a different website.
void ClearCacheOnNavigation();
- // NotificationObserver implementation:
+ // content::NotificationObserver implementation:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Gets the default global size limit. This interrogates system metrics to
// tune the default size to the current system.
@@ -215,7 +215,7 @@ class WebCacheManager : public NotificationObserver {
ScopedRunnableMethodFactory<WebCacheManager> revise_allocation_factory_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(WebCacheManager);
};
diff --git a/chrome/browser/repost_form_warning_controller.cc b/chrome/browser/repost_form_warning_controller.cc
index 00d5d51..987b7d6 100644
--- a/chrome/browser/repost_form_warning_controller.cc
+++ b/chrome/browser/repost_form_warning_controller.cc
@@ -6,7 +6,7 @@
#include "chrome/browser/ui/constrained_window.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
RepostFormWarningController::RepostFormWarningController(
@@ -15,11 +15,11 @@ RepostFormWarningController::RepostFormWarningController(
window_(NULL) {
NavigationController* controller = &tab_contents->controller();
registrar_.Add(this, content::NOTIFICATION_LOAD_START,
- Source<NavigationController>(controller));
+ content::Source<NavigationController>(controller));
registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING,
- Source<NavigationController>(controller));
+ content::Source<NavigationController>(controller));
registrar_.Add(this, content::NOTIFICATION_REPOST_WARNING_SHOWN,
- Source<NavigationController>(controller));
+ content::Source<NavigationController>(controller));
}
RepostFormWarningController::~RepostFormWarningController() {
@@ -45,8 +45,8 @@ void RepostFormWarningController::Continue() {
}
void RepostFormWarningController::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
// Close the dialog if we load a page (because reloading might not apply to
// the same page anymore) or if the tab is closed, because then we won't have
// a navigation controller anymore.
@@ -54,7 +54,7 @@ void RepostFormWarningController::Observe(int type,
(type == content::NOTIFICATION_LOAD_START ||
type == content::NOTIFICATION_TAB_CLOSING ||
type == content::NOTIFICATION_REPOST_WARNING_SHOWN)) {
- DCHECK_EQ(Source<NavigationController>(source).ptr(),
+ DCHECK_EQ(content::Source<NavigationController>(source).ptr(),
&tab_contents_->controller());
Cancel();
}
diff --git a/chrome/browser/repost_form_warning_controller.h b/chrome/browser/repost_form_warning_controller.h
index 81f41d2..a618538 100644
--- a/chrome/browser/repost_form_warning_controller.h
+++ b/chrome/browser/repost_form_warning_controller.h
@@ -6,8 +6,8 @@
#define CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_
#pragma once
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class ConstrainedWindow;
class TabContents;
@@ -15,7 +15,7 @@ class TabContents;
// This class is used to continue or cancel a pending reload when the
// repost form warning is shown. It is owned by the platform-dependent
// |RepostFormWarning{Gtk,Mac,View}| classes.
-class RepostFormWarningController : public NotificationObserver {
+class RepostFormWarningController : public content::NotificationObserver {
public:
explicit RepostFormWarningController(TabContents* tab_contents);
virtual ~RepostFormWarningController();
@@ -29,16 +29,16 @@ class RepostFormWarningController : public NotificationObserver {
void set_window(ConstrainedWindow* window) { window_ = window; }
private:
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
// Watch for a new load or a closed tab and dismiss the dialog if they occur.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Close the warning dialog.
void CloseDialog();
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Tab contents, used to continue the reload.
TabContents* tab_contents_;
diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc
index 0c38cce..7af1767 100644
--- a/chrome/browser/rlz/rlz.cc
+++ b/chrome/browser/rlz/rlz.cc
@@ -274,8 +274,8 @@ bool RLZTracker::SendFinancialPing(const std::string& brand,
}
void RLZTracker::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
// Needs to be evaluated. See http://crbug.com/62328.
base::ThreadRestrictions::ScopedAllowIO allow_io;
@@ -296,7 +296,8 @@ void RLZTracker::Observe(int type,
NotificationService::AllSources());
break;
case content::NOTIFICATION_NAV_ENTRY_PENDING: {
- const NavigationEntry* entry = Details<NavigationEntry>(details).ptr();
+ const NavigationEntry* entry =
+ content::Details<NavigationEntry>(details).ptr();
if (entry != NULL &&
((entry->transition_type() &
content::PAGE_TRANSITION_HOME_PAGE) != 0)) {
diff --git a/chrome/browser/rlz/rlz.h b/chrome/browser/rlz/rlz.h
index e30f8cc..ee97a22 100644
--- a/chrome/browser/rlz/rlz.h
+++ b/chrome/browser/rlz/rlz.h
@@ -18,8 +18,8 @@
#include "base/memory/singleton.h"
#include "base/string16.h"
#include "base/task.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "rlz/win/lib/rlz_lib.h"
// RLZ is a library which is used to measure distribution scenarios.
@@ -32,7 +32,7 @@
// For partner or bundled installs, the RLZ might send more information
// according to the terms disclosed in the EULA.
-class RLZTracker : public NotificationObserver {
+class RLZTracker : public content::NotificationObserver {
public:
// Initializes the RLZ library services for use in chrome. Schedules a
// delayed task (delayed by |delay| seconds) that performs the ping and
@@ -75,10 +75,10 @@ class RLZTracker : public NotificationObserver {
// that it does not interfere with chrome startup time.
virtual void DelayedInit();
- // NotificationObserver implementation:
+ // content::NotificationObserver implementation:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Used by test code to override the default RLZTracker instance returned
// by GetInstance().
@@ -145,7 +145,7 @@ class RLZTracker : public NotificationObserver {
bool omnibox_used_;
bool homepage_used_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(RLZTracker);
};
diff --git a/chrome/browser/rlz/rlz_unittest.cc b/chrome/browser/rlz/rlz_unittest.cc
index 603f26d..0308c06 100644
--- a/chrome/browser/rlz/rlz_unittest.cc
+++ b/chrome/browser/rlz/rlz_unittest.cc
@@ -17,9 +17,9 @@
#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_details.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::win::RegKey;
@@ -201,7 +201,7 @@ void RlzLibTest::TearDown() {
void RlzLibTest::SimulateOmniboxUsage() {
tracker_.Observe(chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
NotificationService::AllSources(),
- Details<AutocompleteLog>(NULL));
+ content::Details<AutocompleteLog>(NULL));
}
void RlzLibTest::SimulateHomepageUsage() {
@@ -209,7 +209,7 @@ void RlzLibTest::SimulateHomepageUsage() {
content::PAGE_TRANSITION_HOME_PAGE, false);
tracker_.Observe(content::NOTIFICATION_NAV_ENTRY_PENDING,
NotificationService::AllSources(),
- Details<NavigationEntry>(&entry));
+ content::Details<NavigationEntry>(&entry));
}
void RlzLibTest::InvokeDelayedInit() {
@@ -544,8 +544,8 @@ TEST_F(RlzLibTest, ObserveHandlesBadArgs) {
content::PAGE_TRANSITION_LINK, false);
tracker_.Observe(content::NOTIFICATION_NAV_ENTRY_PENDING,
NotificationService::AllSources(),
- Details<NavigationEntry>(NULL));
+ content::Details<NavigationEntry>(NULL));
tracker_.Observe(content::NOTIFICATION_NAV_ENTRY_PENDING,
NotificationService::AllSources(),
- Details<NavigationEntry>(&entry));
+ 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 d246793..872dfd2 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
@@ -265,7 +265,7 @@ ClientSideDetectionHost::ClientSideDetectionHost(TabContents* tab)
sb_service_ = g_browser_process->safe_browsing_service();
// Note: csd_service_ and sb_service_ will be NULL here in testing.
registrar_.Add(this, content::NOTIFICATION_RESOURCE_RESPONSE_STARTED,
- Source<RenderViewHostDelegate>(tab));
+ content::Source<RenderViewHostDelegate>(tab));
if (sb_service_) {
sb_service_->AddObserver(this);
}
@@ -453,12 +453,13 @@ void ClientSideDetectionHost::FeatureExtractionDone(
cb);
}
-void ClientSideDetectionHost::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ClientSideDetectionHost::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(type, content::NOTIFICATION_RESOURCE_RESPONSE_STARTED);
- const ResourceRequestDetails* req = Details<ResourceRequestDetails>(
+ const ResourceRequestDetails* req = content::Details<ResourceRequestDetails>(
details).ptr();
if (req && browse_info_.get()) {
browse_info_->ips.insert(req->socket_address().host());
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.h b/chrome/browser/safe_browsing/client_side_detection_host.h
index cdf7472..3c06e10 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.h
+++ b/chrome/browser/safe_browsing/client_side_detection_host.h
@@ -17,11 +17,9 @@
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
-class NotificationDetails;
-class NotificationSource;
class TabContents;
namespace safe_browsing {
@@ -34,7 +32,7 @@ class ClientSideDetectionService;
// class which sends a ping to a server to validate the verdict.
// TODO(noelutz): move all client-side detection IPCs to this class.
class ClientSideDetectionHost : public TabContentsObserver,
- public NotificationObserver,
+ public content::NotificationObserver,
public SafeBrowsingService::Observer {
public:
// The caller keeps ownership of the tab object and is responsible for
@@ -84,8 +82,8 @@ class ClientSideDetectionHost : public TabContentsObserver,
// From NotificationObserver. Called when a notification comes in. This
// method is called in the UI thread.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Returns true if the user has seen a regular SafeBrowsing
// interstitial for the current page. This is only true if the user has
@@ -121,7 +119,7 @@ class ClientSideDetectionHost : public TabContentsObserver,
// Current host, used to help determine cur_host_redirects_.
std::string cur_host_;
// Handles registering notifications with the NotificationService.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::ScopedCallbackFactory<ClientSideDetectionHost> cb_factory_;
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chrome/browser/safe_browsing/client_side_detection_service.cc
index cc7a46b..a42c8f9 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_service.cc
@@ -196,16 +196,17 @@ void ClientSideDetectionService::OnURLFetchComplete(
}
}
-void ClientSideDetectionService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ClientSideDetectionService::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(type == content::NOTIFICATION_RENDERER_PROCESS_CREATED);
if (!model_.get()) {
// Model might not be ready or maybe there was an error.
return;
}
- SendModelToProcess(Source<RenderProcessHost>(source).ptr());
+ SendModelToProcess(content::Source<RenderProcessHost>(source).ptr());
}
void ClientSideDetectionService::SendModelToProcess(
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.h b/chrome/browser/safe_browsing/client_side_detection_service.h
index 7e583a1..aec3ecd 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service.h
+++ b/chrome/browser/safe_browsing/client_side_detection_service.h
@@ -30,8 +30,8 @@
#include "base/task.h"
#include "base/time.h"
#include "content/common/net/url_fetcher.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
@@ -53,7 +53,7 @@ class ClientPhishingResponse;
class ClientSideModel;
class ClientSideDetectionService : public URLFetcher::Delegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
typedef Callback2<GURL /* phishing URL */, bool /* is phishing */>::Type
ClientReportPhishingRequestCallback;
@@ -85,10 +85,10 @@ class ClientSideDetectionService : public URLFetcher::Delegate,
const net::ResponseCookies& cookies,
const std::string& data) OVERRIDE;
- // NotificationObserver overrides:
+ // content::NotificationObserver overrides:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Sends a request to the SafeBrowsing servers with the ClientPhishingRequest.
// The URL scheme of the |url()| in the request should be HTTP. This method
@@ -298,7 +298,7 @@ class ClientSideDetectionService : public URLFetcher::Delegate,
// this map to speed up lookups.
BadSubnetMap bad_subnets_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionService);
};
diff --git a/chrome/browser/safe_browsing/malware_details_history.cc b/chrome/browser/safe_browsing/malware_details_history.cc
index 11a0d4c..de3444e 100644
--- a/chrome/browser/safe_browsing/malware_details_history.cc
+++ b/chrome/browser/safe_browsing/malware_details_history.cc
@@ -15,9 +15,9 @@
#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_details.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
MalwareDetailsRedirectsCollector::MalwareDetailsRedirectsCollector(
Profile* profile)
@@ -26,7 +26,7 @@ MalwareDetailsRedirectsCollector::MalwareDetailsRedirectsCollector(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (profile) {
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
}
}
@@ -126,8 +126,8 @@ MalwareDetailsRedirectsCollector::GetCollectedUrls() const {
void MalwareDetailsRedirectsCollector::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(type, chrome::NOTIFICATION_PROFILE_DESTROYED);
DVLOG(1) << "Profile gone.";
diff --git a/chrome/browser/safe_browsing/malware_details_history.h b/chrome/browser/safe_browsing/malware_details_history.h
index 59ccdf8..9da1c02 100644
--- a/chrome/browser/safe_browsing/malware_details_history.h
+++ b/chrome/browser/safe_browsing/malware_details_history.h
@@ -17,8 +17,8 @@
#include "base/memory/ref_counted.h"
#include "chrome/browser/history/history.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "net/base/completion_callback.h"
class TabContents;
@@ -30,7 +30,7 @@ typedef std::vector<GURL> RedirectChain;
class MalwareDetailsRedirectsCollector
: public base::RefCountedThreadSafe<MalwareDetailsRedirectsCollector,
BrowserThread::DeleteOnUIThread>,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit MalwareDetailsRedirectsCollector(Profile* profile);
@@ -69,7 +69,7 @@ class MalwareDetailsRedirectsCollector
// The collected directs from history service
std::vector<safe_browsing::RedirectChain> redirects_urls_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
void StartGetRedirects(const std::vector<GURL>& urls);
void GetRedirects(const GURL& url);
@@ -83,8 +83,8 @@ class MalwareDetailsRedirectsCollector
void AllDone();
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(MalwareDetailsRedirectsCollector);
};
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
index dc64322..12b32b9 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
@@ -316,7 +316,7 @@ class SafeBrowsingBlockingPageTest : public InProcessBrowserTest,
TabContents* contents = browser()->GetSelectedTabContents();
ui_test_utils::WindowedNotificationObserver interstitial_observer(
content::NOTIFICATION_INTERSTITIAL_ATTACHED,
- Source<TabContents>(contents));
+ content::Source<TabContents>(contents));
if (!InterstitialPage::GetInterstitialPage(contents))
interstitial_observer.Wait();
}
@@ -420,7 +420,7 @@ IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, MalwareProceed) {
ui_test_utils::NavigateToURL(browser(), url);
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
SendCommand("\"proceed\""); // Simulate the user clicking "proceed"
observer.Wait();
@@ -448,7 +448,7 @@ IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, PhishingProceed) {
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
SendCommand("\"proceed\""); // Simulate the user clicking "proceed".
observer.Wait();
@@ -464,7 +464,7 @@ IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, PhishingReportError) {
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
SendCommand("\"reportError\""); // Simulate the user clicking "report error"
observer.Wait();
@@ -484,7 +484,7 @@ IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest,
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
SendCommand("\"learnMore\""); // Simulate the user clicking "learn more"
observer.Wait();
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index 4059f34..62109c2 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -1272,26 +1272,26 @@ void SafeBrowsingService::UpdateWhitelist(const UnsafeResource& resource) {
}
void SafeBrowsingService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_PROFILE_CREATED: {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- Profile* profile = Source<Profile>(source).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
if (!profile->IsOffTheRecord())
AddPrefService(profile->GetPrefs());
break;
}
case chrome::NOTIFICATION_PROFILE_DESTROYED: {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- Profile* profile = Source<Profile>(source).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
if (!profile->IsOffTheRecord())
RemovePrefService(profile->GetPrefs());
break;
}
case chrome::NOTIFICATION_PREF_CHANGED: {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- std::string* pref = Details<std::string>(details).ptr();
+ std::string* pref = content::Details<std::string>(details).ptr();
DCHECK(*pref == prefs::kSafeBrowsingEnabled);
RefreshState();
break;
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.h b/chrome/browser/safe_browsing/safe_browsing_service.h
index b4e3b74..ccf3ab0 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.h
+++ b/chrome/browser/safe_browsing/safe_browsing_service.h
@@ -23,8 +23,8 @@
#include "base/task.h"
#include "base/time.h"
#include "chrome/browser/safe_browsing/safe_browsing_util.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
class MalwareDetails;
@@ -50,7 +50,7 @@ class DownloadProtectionService;
// Construction needs to happen on the main thread.
class SafeBrowsingService
: public base::RefCountedThreadSafe<SafeBrowsingService>,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
class Client;
// Users of this service implement this interface to be notified
@@ -457,10 +457,10 @@ class SafeBrowsingService
// Adds the given entry to the whitelist. Called on the UI thread.
void UpdateWhitelist(const UnsafeResource& resource);
- // NotificationObserver override
+ // content::NotificationObserver override
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Starts following the safe browsing preference on |pref_service|.
void AddPrefService(PrefService* pref_service);
@@ -540,7 +540,7 @@ class SafeBrowsingService
ObserverList<Observer> observer_list_;
// Used to track purge memory notifications. Lives on the IO thread.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Tracks existing PrefServices, and the safe browsing preference on each.
// This is used to determine if any profile is currently using the safe
@@ -548,7 +548,7 @@ class SafeBrowsingService
std::map<PrefService*, PrefChangeRegistrar*> prefs_map_;
// Used to track creation and destruction of profiles on the UI thread.
- NotificationRegistrar prefs_registrar_;
+ content::NotificationRegistrar prefs_registrar_;
// The ClientSideDetectionService is managed by the SafeBrowsingService,
// since its running state and lifecycle depends on SafeBrowsingService's.
diff --git a/chrome/browser/search_engines/search_provider_install_data.cc b/chrome/browser/search_engines/search_provider_install_data.cc
index 4f9994e..ead0a10 100644
--- a/chrome/browser/search_engines/search_provider_install_data.cc
+++ b/chrome/browser/search_engines/search_provider_install_data.cc
@@ -18,10 +18,10 @@
#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_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
typedef SearchHostToURLsMap::TemplateURLSet TemplateURLSet;
@@ -99,23 +99,23 @@ void GoogleURLChangeNotifier::OnChange(const std::string& google_base_url) {
// Notices changes in the Google base URL and sends them along
// to the SearchProviderInstallData on the I/O thread.
-class GoogleURLObserver : public NotificationObserver {
+class GoogleURLObserver : public content::NotificationObserver {
public:
GoogleURLObserver(
GoogleURLChangeNotifier* change_notifier,
int ui_death_notification,
- const NotificationSource& ui_death_source);
+ const content::NotificationSource& ui_death_source);
- // Implementation of NotificationObserver.
+ // Implementation of content::NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
virtual ~GoogleURLObserver() {}
scoped_refptr<GoogleURLChangeNotifier> change_notifier_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(GoogleURLObserver);
};
@@ -123,7 +123,7 @@ class GoogleURLObserver : public NotificationObserver {
GoogleURLObserver::GoogleURLObserver(
GoogleURLChangeNotifier* change_notifier,
int ui_death_notification,
- const NotificationSource& ui_death_source)
+ const content::NotificationSource& ui_death_source)
: change_notifier_(change_notifier) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
registrar_.Add(this, chrome::NOTIFICATION_GOOGLE_URL_UPDATED,
@@ -132,8 +132,8 @@ GoogleURLObserver::GoogleURLObserver(
}
void GoogleURLObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_GOOGLE_URL_UPDATED) {
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
NewRunnableMethod(change_notifier_.get(),
@@ -163,7 +163,7 @@ static bool IsSameOrigin(const GURL& requested_origin,
SearchProviderInstallData::SearchProviderInstallData(
WebDataService* web_service,
int ui_death_notification,
- const NotificationSource& ui_death_source)
+ const content::NotificationSource& ui_death_source)
: web_service_(web_service),
load_handle_(0),
google_base_url_(UIThreadSearchTermsData().GoogleBaseURLValue()) {
diff --git a/chrome/browser/search_engines/search_provider_install_data.h b/chrome/browser/search_engines/search_provider_install_data.h
index 191615c..11ca8bf 100644
--- a/chrome/browser/search_engines/search_provider_install_data.h
+++ b/chrome/browser/search_engines/search_provider_install_data.h
@@ -17,11 +17,14 @@
#include "chrome/browser/webdata/web_data_service.h"
class GURL;
-class NotificationSource;
class SearchHostToURLsMap;
class Task;
class TemplateURL;
+namespace content {
+class NotificationSource;
+}
+
// Provides the search provider install state for the I/O thread. It works by
// loading the data on demand (when CallWhenLoaded is called) and then throwing
// away the results after the callbacks are done, so the results are always up
@@ -46,7 +49,7 @@ class SearchProviderInstallData : public WebDataServiceConsumer,
// that notification occurs. It doesn't matter.)
SearchProviderInstallData(WebDataService* web_service,
int ui_death_notification,
- const NotificationSource& ui_death_source);
+ const content::NotificationSource& ui_death_source);
virtual ~SearchProviderInstallData();
// Use to determine when the search provider information is loaded. The
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 c5e1322..1dcb980 100644
--- a/chrome/browser/search_engines/search_provider_install_data_unittest.cc
+++ b/chrome/browser/search_engines/search_provider_install_data_unittest.cc
@@ -19,7 +19,7 @@
#include "chrome/test/base/testing_profile.h"
#include "content/browser/browser_thread.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "testing/gtest/include/gtest/gtest.h"
// Create a TemplateURL. The caller owns the returned TemplateURL*.
@@ -168,7 +168,7 @@ class SearchProviderInstallDataTest : public testing::Test {
install_data_ = new SearchProviderInstallData(
util_.GetWebDataService(),
content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- Source<SearchProviderInstallDataTest>(this));
+ content::Source<SearchProviderInstallDataTest>(this));
}
virtual void TearDown() {
@@ -181,7 +181,7 @@ class SearchProviderInstallDataTest : public testing::Test {
// It doesn't matter that this happens after install_data_ is deleted.
NotificationService::current()->Notify(
content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- Source<SearchProviderInstallDataTest>(this),
+ content::Source<SearchProviderInstallDataTest>(this),
NotificationService::NoDetails());
util_.TearDown();
@@ -207,8 +207,8 @@ class SearchProviderInstallDataTest : public testing::Test {
prefs::kDefaultSearchProviderPrepopulateID, new StringValue(""));
util_.model()->Observe(
chrome::NOTIFICATION_PREF_CHANGED,
- Source<PrefService>(util_.profile()->GetTestingPrefService()),
- Details<std::string>(NULL));
+ content::Source<PrefService>(util_.profile()->GetTestingPrefService()),
+ content::Details<std::string>(NULL));
}
protected:
diff --git a/chrome/browser/search_engines/search_provider_install_state_message_filter.cc b/chrome/browser/search_engines/search_provider_install_state_message_filter.cc
index 15fea69..7c9ad91 100644
--- a/chrome/browser/search_engines/search_provider_install_state_message_filter.cc
+++ b/chrome/browser/search_engines/search_provider_install_state_message_filter.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_view_host.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
@@ -21,7 +21,7 @@ SearchProviderInstallStateMessageFilter(
reply_with_provider_install_state_factory_(this)),
provider_data_(profile->GetWebDataService(Profile::EXPLICIT_ACCESS),
content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- Source<RenderProcessHost>(
+ content::Source<RenderProcessHost>(
RenderProcessHost::FromID(render_process_id))),
is_off_the_record_(profile->IsOffTheRecord()) {
// This is initialized by BrowserRenderProcessHost. Do not add any non-trivial
diff --git a/chrome/browser/search_engines/template_url_fetcher.cc b/chrome/browser/search_engines/template_url_fetcher.cc
index 4ce2f5c..bb805bde 100644
--- a/chrome/browser/search_engines/template_url_fetcher.cc
+++ b/chrome/browser/search_engines/template_url_fetcher.cc
@@ -16,14 +16,15 @@
#include "chrome/browser/search_engines/template_url_parser.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/common/net/url_fetcher.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "net/url_request/url_request_status.h"
// RequestDelegate ------------------------------------------------------------
-class TemplateURLFetcher::RequestDelegate : public URLFetcher::Delegate,
- public NotificationObserver {
+class TemplateURLFetcher::RequestDelegate
+ : public URLFetcher::Delegate,
+ public content::NotificationObserver {
public:
// Takes ownership of |callbacks|.
RequestDelegate(TemplateURLFetcher* fetcher,
@@ -33,10 +34,10 @@ class TemplateURLFetcher::RequestDelegate : public URLFetcher::Delegate,
TemplateURLFetcherCallbacks* callbacks,
ProviderType provider_type);
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// URLFetcher::Delegate:
// If data contains a valid OSDD, a TemplateURL is created and added to
@@ -70,7 +71,7 @@ class TemplateURLFetcher::RequestDelegate : public URLFetcher::Delegate,
scoped_ptr<TemplateURLFetcherCallbacks> callbacks_;
// Handles registering for our notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(RequestDelegate);
};
@@ -98,7 +99,7 @@ TemplateURLFetcher::RequestDelegate::RequestDelegate(
// Start the model load and set-up waiting for it.
registrar_.Add(this,
chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED,
- Source<TemplateURLService>(model));
+ content::Source<TemplateURLService>(model));
model->Load();
}
@@ -108,8 +109,8 @@ TemplateURLFetcher::RequestDelegate::RequestDelegate(
void TemplateURLFetcher::RequestDelegate::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED);
if (!template_url_.get())
diff --git a/chrome/browser/search_engines/template_url_scraper_unittest.cc b/chrome/browser/search_engines/template_url_scraper_unittest.cc
index 0eada4b..27e799e 100644
--- a/chrome/browser/search_engines/template_url_scraper_unittest.cc
+++ b/chrome/browser/search_engines/template_url_scraper_unittest.cc
@@ -10,8 +10,8 @@
#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_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "net/base/mock_host_resolver.h"
#include "net/base/net_util.h"
@@ -25,26 +25,26 @@ class TemplateURLScraperTest : public InProcessBrowserTest {
DISALLOW_COPY_AND_ASSIGN(TemplateURLScraperTest);
};
-class TemplateURLServiceLoader : public NotificationObserver {
+class TemplateURLServiceLoader : public content::NotificationObserver {
public:
explicit TemplateURLServiceLoader(TemplateURLService* model) : model_(model) {
registrar_.Add(this, chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED,
- Source<TemplateURLService>(model));
+ content::Source<TemplateURLService>(model));
model_->Load();
ui_test_utils::RunMessageLoop();
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED &&
- Source<TemplateURLService>(source).ptr() == model_) {
+ content::Source<TemplateURLService>(source).ptr() == model_) {
MessageLoop::current()->Quit();
}
}
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
TemplateURLService* model_;
diff --git a/chrome/browser/search_engines/template_url_service.cc b/chrome/browser/search_engines/template_url_service.cc
index 55a614a..0b6a8dc 100644
--- a/chrome/browser/search_engines/template_url_service.cc
+++ b/chrome/browser/search_engines/template_url_service.cc
@@ -598,10 +598,10 @@ string16 TemplateURLService::GetKeywordShortName(const string16& keyword,
}
void TemplateURLService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_HISTORY_URL_VISITED) {
- Details<history::URLVisitedDetails> visit_details(details);
+ content::Details<history::URLVisitedDetails> visit_details(details);
if (!loaded())
visits_to_add_.push_back(*visit_details.ptr());
else
@@ -610,7 +610,7 @@ void TemplateURLService::Observe(int type,
if (loaded_)
GoogleBaseURLChanged();
} else if (type == chrome::NOTIFICATION_PREF_CHANGED) {
- const std::string* pref_name = Details<std::string>(details).ptr();
+ const std::string* pref_name = content::Details<std::string>(details).ptr();
if (!pref_name || default_search_prefs_->IsObserved(*pref_name)) {
// A preference related to default search engine has changed.
// Update the model if needed.
@@ -921,7 +921,7 @@ void TemplateURLService::Init(const Initializer* initializers,
// backend can handle automatically adding the search terms as the user
// navigates.
registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URL_VISITED,
- Source<Profile>(profile_->GetOriginalProfile()));
+ content::Source<Profile>(profile_->GetOriginalProfile()));
PrefService* prefs = GetPrefs();
default_search_prefs_.reset(
PrefSetObserver::CreateDefaultSearchPrefSetObserver(prefs, this));
@@ -1045,7 +1045,7 @@ void TemplateURLService::ChangeToLoadedState() {
void TemplateURLService::NotifyLoaded() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED,
- Source<TemplateURLService>(this),
+ content::Source<TemplateURLService>(this),
NotificationService::NoDetails());
for (size_t i = 0; i < pending_extension_ids_.size(); ++i) {
@@ -1550,12 +1550,12 @@ void TemplateURLService::RemoveNoNotify(const TemplateURL* template_url) {
ProcessTemplateURLChange(template_url, SyncChange::ACTION_DELETE);
if (profile_) {
- Source<Profile> source(profile_);
+ content::Source<Profile> source(profile_);
TemplateURLID id = template_url->id();
NotificationService::current()->Notify(
chrome::NOTIFICATION_TEMPLATE_URL_REMOVED,
source,
- Details<TemplateURLID>(&id));
+ content::Details<TemplateURLID>(&id));
}
// We own the TemplateURL and need to delete it.
diff --git a/chrome/browser/search_engines/template_url_service.h b/chrome/browser/search_engines/template_url_service.h
index 9cc3918..fb98de6 100644
--- a/chrome/browser/search_engines/template_url_service.h
+++ b/chrome/browser/search_engines/template_url_service.h
@@ -20,8 +20,8 @@
#include "chrome/browser/sync/api/sync_change.h"
#include "chrome/browser/sync/api/syncable_service.h"
#include "chrome/browser/webdata/web_data_service.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class GURL;
class Extension;
@@ -61,7 +61,7 @@ struct URLVisitedDetails;
class TemplateURLService : public WebDataServiceConsumer,
public ProfileKeyedService,
- public NotificationObserver,
+ public content::NotificationObserver,
public SyncableService {
public:
typedef std::map<std::string, std::string> QueryTerms;
@@ -232,7 +232,7 @@ class TemplateURLService : public WebDataServiceConsumer,
string16 GetKeywordShortName(const string16& keyword,
bool* is_extension_keyword);
- // NotificationObserver method. TemplateURLService listens for three
+ // content::NotificationObserver method. TemplateURLService listens for three
// notification types:
// . NOTIFY_HISTORY_URL_VISITED: adds keyword search terms if the visit
// corresponds to a keyword.
@@ -240,8 +240,8 @@ class TemplateURLService : public WebDataServiceConsumer,
// a google base url replacement term.
// . PREF_CHANGED: checks whether the default search engine has changed.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// SyncableService implementation.
@@ -495,7 +495,7 @@ class TemplateURLService : public WebDataServiceConsumer,
TemplateURL* local_url,
SyncChangeList* change_list);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Mapping from keyword to the TemplateURL.
KeywordToTemplateMap keyword_to_template_map_;
diff --git a/chrome/browser/search_engines/template_url_service_unittest.cc b/chrome/browser/search_engines/template_url_service_unittest.cc
index f9a1463..6eeada95 100644
--- a/chrome/browser/search_engines/template_url_service_unittest.cc
+++ b/chrome/browser/search_engines/template_url_service_unittest.cc
@@ -26,8 +26,8 @@
#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_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::Time;
@@ -149,8 +149,8 @@ class TemplateURLServiceTest : public testing::Test {
void NotifyManagedPrefsHaveChanged() {
model()->Observe(
chrome::NOTIFICATION_PREF_CHANGED,
- Source<PrefService>(profile()->GetTestingPrefService()),
- Details<std::string>(NULL));
+ content::Source<PrefService>(profile()->GetTestingPrefService()),
+ content::Details<std::string>(NULL));
}
// Verifies the two TemplateURLs are equal.
diff --git a/chrome/browser/service/service_process_control.cc b/chrome/browser/service/service_process_control.cc
index 40de028..a08f93a 100644
--- a/chrome/browser/service/service_process_control.cc
+++ b/chrome/browser/service/service_process_control.cc
@@ -231,10 +231,11 @@ bool ServiceProcessControl::Send(IPC::Message* message) {
return channel_->Send(message);
}
-// NotificationObserver implementation.
-void ServiceProcessControl::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+// content::NotificationObserver implementation.
+void ServiceProcessControl::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_UPGRADE_RECOMMENDED) {
Send(new ServiceMsg_UpdateAvailable);
}
diff --git a/chrome/browser/service/service_process_control.h b/chrome/browser/service/service_process_control.h
index a98a026..69740b4 100644
--- a/chrome/browser/service/service_process_control.h
+++ b/chrome/browser/service/service_process_control.h
@@ -17,8 +17,8 @@
#include "base/memory/singleton.h"
#include "base/process.h"
#include "base/task.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ipc/ipc_channel_proxy.h"
class CommandLine;
@@ -39,7 +39,7 @@ struct CloudPrintProxyInfo;
// talks to the IPC channel on the IO thread.
class ServiceProcessControl : public IPC::Channel::Sender,
public IPC::Channel::Listener,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
typedef IDMap<ServiceProcessControl>::iterator iterator;
typedef std::queue<IPC::Message> MessageQueue;
@@ -75,10 +75,10 @@ class ServiceProcessControl : public IPC::Channel::Sender,
// IPC::Channel::Sender implementation
virtual bool Send(IPC::Message* message);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Message handlers
void OnCloudPrintProxyInfo(
@@ -161,7 +161,7 @@ class ServiceProcessControl : public IPC::Channel::Sender,
// the cloud print proxy.
scoped_ptr<CloudPrintProxyInfoHandler> cloud_print_info_callback_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
#endif // CHROME_BROWSER_SERVICE_SERVICE_PROCESS_CONTROL_H_
diff --git a/chrome/browser/sessions/restore_tab_helper.cc b/chrome/browser/sessions/restore_tab_helper.cc
index ffc7db9..2823e8e 100644
--- a/chrome/browser/sessions/restore_tab_helper.cc
+++ b/chrome/browser/sessions/restore_tab_helper.cc
@@ -22,7 +22,7 @@ void RestoreTabHelper::SetWindowID(const SessionID& id) {
window_id_ = id;
NotificationService::current()->Notify(
content::NOTIFICATION_TAB_PARENTED,
- Source<TabContentsWrapper>(tab_),
+ content::Source<TabContentsWrapper>(tab_),
NotificationService::NoDetails());
// Extension code in the renderer holds the ID of the window that hosts it.
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index de1ad91..e1befc6 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -32,7 +32,7 @@
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "net/base/network_change_notifier.h"
@@ -58,7 +58,7 @@ static const int kInitialDelayTimerMS = 100;
//
// This is not part of SessionRestoreImpl so that synchronous destruction
// of SessionRestoreImpl doesn't have timing problems.
-class TabLoader : public NotificationObserver,
+class TabLoader : public content::NotificationObserver,
public net::NetworkChangeNotifier::OnlineStateObserver {
public:
explicit TabLoader(base::TimeTicks restore_started);
@@ -88,8 +88,8 @@ class TabLoader : public NotificationObserver,
// NotificationObserver method. Removes the specified tab and loads the next
// tab.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// net::NetworkChangeNotifier::OnlineStateObserver overrides.
virtual void OnOnlineStateChanged(bool online) OVERRIDE;
@@ -113,7 +113,7 @@ class TabLoader : public NotificationObserver,
// Called when a tab goes away or a load completes.
void HandleTabClosedOrLoaded(NavigationController* controller);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Current delay before a new tab is loaded. See class description for
// details.
@@ -232,21 +232,22 @@ void TabLoader::LoadNextTab() {
}
void TabLoader::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_LOAD_START: {
// Add this render_widget_host to the set of those we're waiting for
// paints on. We want to only record stats for paints that occur after
// a load has finished.
- NavigationController* tab = Source<NavigationController>(source).ptr();
+ NavigationController* tab =
+ content::Source<NavigationController>(source).ptr();
RenderWidgetHost* render_widget_host = GetRenderWidgetHost(tab);
DCHECK(render_widget_host);
render_widget_hosts_loading_.insert(render_widget_host);
break;
}
case content::NOTIFICATION_TAB_CONTENTS_DESTROYED: {
- TabContents* tab_contents = Source<TabContents>(source).ptr();
+ TabContents* tab_contents = content::Source<TabContents>(source).ptr();
if (!got_first_paint_) {
RenderWidgetHost* render_widget_host =
GetRenderWidgetHost(&tab_contents->controller());
@@ -256,7 +257,8 @@ void TabLoader::Observe(int type,
break;
}
case content::NOTIFICATION_LOAD_STOP: {
- NavigationController* tab = Source<NavigationController>(source).ptr();
+ NavigationController* tab =
+ content::Source<NavigationController>(source).ptr();
render_widget_hosts_to_paint_.insert(GetRenderWidgetHost(tab));
HandleTabClosedOrLoaded(tab);
break;
@@ -264,7 +266,7 @@ void TabLoader::Observe(int type,
case content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT: {
if (!got_first_paint_) {
RenderWidgetHost* render_widget_host =
- Source<RenderWidgetHost>(source).ptr();
+ content::Source<RenderWidgetHost>(source).ptr();
if (render_widget_hosts_to_paint_.find(render_widget_host) !=
render_widget_hosts_to_paint_.end()) {
// Got a paint for one of our renderers, so record time.
@@ -323,11 +325,11 @@ void TabLoader::OnOnlineStateChanged(bool online) {
void TabLoader::RemoveTab(NavigationController* tab) {
registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab->tab_contents()));
+ content::Source<TabContents>(tab->tab_contents()));
registrar_.Remove(this, content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(tab));
+ content::Source<NavigationController>(tab));
registrar_.Remove(this, content::NOTIFICATION_LOAD_START,
- Source<NavigationController>(tab));
+ content::Source<NavigationController>(tab));
TabsLoading::iterator i = tabs_loading_.find(tab);
if (i != tabs_loading_.end())
@@ -357,11 +359,11 @@ RenderWidgetHost* TabLoader::GetRenderWidgetHost(NavigationController* tab) {
void TabLoader::RegisterForNotifications(NavigationController* controller) {
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(controller->tab_contents()));
+ content::Source<TabContents>(controller->tab_contents()));
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(controller));
+ content::Source<NavigationController>(controller));
registrar_.Add(this, content::NOTIFICATION_LOAD_START,
- Source<NavigationController>(controller));
+ content::Source<NavigationController>(controller));
++tab_count_;
}
@@ -397,7 +399,7 @@ void TabLoader::HandleTabClosedOrLoaded(NavigationController* tab) {
// SessionRestoreImpl is responsible for fetching the set of tabs to create
// from SessionService. SessionRestoreImpl deletes itself when done.
-class SessionRestoreImpl : public NotificationObserver {
+class SessionRestoreImpl : public content::NotificationObserver {
public:
SessionRestoreImpl(Profile* profile,
Browser* browser,
@@ -438,7 +440,7 @@ class SessionRestoreImpl : public NotificationObserver {
if (browser_) {
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(browser_));
+ content::Source<Browser>(browser_));
}
return browser_;
@@ -490,8 +492,8 @@ class SessionRestoreImpl : public NotificationObserver {
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_BROWSER_CLOSED:
delete this;
@@ -801,7 +803,7 @@ class SessionRestoreImpl : public NotificationObserver {
// windows when the nested message loop exits.
std::vector<SessionWindow*> windows_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The time we started the restore.
base::TimeTicks restore_started_;
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index 94b7050..de031f6 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -33,8 +33,8 @@
#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_details.h"
#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
#if defined(OS_MACOSX)
#include "chrome/browser/app_controller_cppsafe_mac.h"
@@ -460,7 +460,7 @@ void SessionService::Save() {
&last_updated_save_time_);
NotificationService::current()->Notify(
chrome::NOTIFICATION_SESSION_SERVICE_SAVED,
- Source<Profile>(profile()),
+ content::Source<Profile>(profile()),
NotificationService::NoDetails());
}
}
@@ -523,12 +523,12 @@ bool SessionService::RestoreIfNecessary(const std::vector<GURL>& urls_to_open,
}
void SessionService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
// All of our messages have the NavigationController as the source.
switch (type) {
case chrome::NOTIFICATION_BROWSER_OPENED: {
- Browser* browser = Source<Browser>(source).ptr();
+ Browser* browser = content::Source<Browser>(source).ptr();
if (browser->profile() != profile() ||
!should_track_changes_for_browser_type(browser->type())) {
return;
@@ -540,7 +540,8 @@ void SessionService::Observe(int type,
}
case content::NOTIFICATION_TAB_PARENTED: {
- TabContentsWrapper* tab = Source<TabContentsWrapper>(source).ptr();
+ TabContentsWrapper* tab =
+ content::Source<TabContentsWrapper>(source).ptr();
if (tab->profile() != profile())
return;
SetTabWindow(tab->restore_tab_helper()->window_id(),
@@ -557,7 +558,8 @@ void SessionService::Observe(int type,
case content::NOTIFICATION_TAB_CLOSED: {
TabContentsWrapper* tab =
TabContentsWrapper::GetCurrentWrapperForContents(
- Source<NavigationController>(source).ptr()->tab_contents());
+ content::Source<NavigationController>(
+ source).ptr()->tab_contents());
if (!tab || tab->profile() != profile())
return;
TabClosed(tab->restore_tab_helper()->window_id(),
@@ -571,10 +573,11 @@ void SessionService::Observe(int type,
case content::NOTIFICATION_NAV_LIST_PRUNED: {
TabContentsWrapper* tab =
TabContentsWrapper::GetCurrentWrapperForContents(
- Source<NavigationController>(source).ptr()->tab_contents());
+ content::Source<NavigationController>(
+ source).ptr()->tab_contents());
if (!tab || tab->profile() != profile())
return;
- Details<content::PrunedDetails> pruned_details(details);
+ content::Details<content::PrunedDetails> pruned_details(details);
if (pruned_details->from_front) {
TabNavigationPathPrunedFromFront(
tab->restore_tab_helper()->window_id(),
@@ -594,10 +597,11 @@ void SessionService::Observe(int type,
case content::NOTIFICATION_NAV_ENTRY_CHANGED: {
TabContentsWrapper* tab =
TabContentsWrapper::GetCurrentWrapperForContents(
- Source<NavigationController>(source).ptr()->tab_contents());
+ content::Source<NavigationController>(
+ source).ptr()->tab_contents());
if (!tab || tab->profile() != profile())
return;
- Details<content::EntryChangedDetails> changed(details);
+ content::Details<content::EntryChangedDetails> changed(details);
UpdateTabNavigation(
tab->restore_tab_helper()->window_id(),
tab->restore_tab_helper()->session_id(),
@@ -608,7 +612,8 @@ void SessionService::Observe(int type,
case content::NOTIFICATION_NAV_ENTRY_COMMITTED: {
TabContentsWrapper* tab =
TabContentsWrapper::GetCurrentWrapperForContents(
- Source<NavigationController>(source).ptr()->tab_contents());
+ content::Source<NavigationController>(
+ source).ptr()->tab_contents());
if (!tab || tab->profile() != profile())
return;
int current_entry_index = tab->controller().GetCurrentEntryIndex();
@@ -620,7 +625,7 @@ void SessionService::Observe(int type,
tab->restore_tab_helper()->session_id(),
current_entry_index,
*tab->controller().GetEntryAtIndex(current_entry_index));
- Details<content::LoadCommittedDetails> changed(details);
+ content::Details<content::LoadCommittedDetails> changed(details);
if (changed->type == content::NAVIGATION_TYPE_NEW_PAGE ||
changed->type == content::NAVIGATION_TYPE_EXISTING_PAGE) {
RecordSessionUpdateHistogramData(
@@ -632,7 +637,7 @@ void SessionService::Observe(int type,
case chrome::NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED: {
ExtensionTabHelper* extension_tab_helper =
- Source<ExtensionTabHelper>(source).ptr();
+ content::Source<ExtensionTabHelper>(source).ptr();
if (extension_tab_helper->tab_contents_wrapper()->profile() != profile())
return;
if (extension_tab_helper->extension_app()) {
diff --git a/chrome/browser/sessions/session_service.h b/chrome/browser/sessions/session_service.h
index 2d4ebd6..6c863b2 100644
--- a/chrome/browser/sessions/session_service.h
+++ b/chrome/browser/sessions/session_service.h
@@ -17,8 +17,8 @@
#include "chrome/browser/sessions/session_id.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/ui_base_types.h"
class NavigationEntry;
@@ -49,7 +49,7 @@ class TabContentsWrapper;
// SessionService rebuilds the contents of the file from the open state
// of the browser.
class SessionService : public BaseSessionService,
- public NotificationObserver {
+ public content::NotificationObserver {
friend class SessionServiceTestHelper;
public:
// Creates a SessionService for the specified profile.
@@ -207,8 +207,8 @@ class SessionService : public BaseSessionService,
Browser* browser);
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Sets the application extension id of the specified tab.
void SetTabExtensionAppID(const SessionID& window_id,
@@ -404,7 +404,7 @@ class SessionService : public BaseSessionService,
static WindowType WindowTypeForBrowserType(Browser::Type type);
static Browser::Type BrowserTypeForWindowType(WindowType type);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Maps from session tab id to the range of navigation entries that has
// been written to disk.
diff --git a/chrome/browser/sessions/session_service_unittest.cc b/chrome/browser/sessions/session_service_unittest.cc
index 0fc8ddb..d6b4479 100644
--- a/chrome/browser/sessions/session_service_unittest.cc
+++ b/chrome/browser/sessions/session_service_unittest.cc
@@ -21,13 +21,13 @@
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/base/testing_profile.h"
#include "content/browser/tab_contents/navigation_entry.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
class SessionServiceTest : public BrowserWithTestWindowTest,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
SessionServiceTest() : window_bounds(0, 1, 2, 3), sync_save_count_(0){}
@@ -52,8 +52,8 @@ class SessionServiceTest : public BrowserWithTestWindowTest,
// Upon notification, increment the sync_save_count variable
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
ASSERT_EQ(type, chrome::NOTIFICATION_SESSION_SERVICE_SAVED);
sync_save_count_++;
}
@@ -648,7 +648,7 @@ TEST_F(SessionServiceTest, GetCurrentSession) {
// Test that the notification for SESSION_SERVICE_SAVED is working properly.
TEST_F(SessionServiceTest, SavedSessionNotification) {
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
registrar_.Add(this, chrome::NOTIFICATION_SESSION_SERVICE_SAVED,
NotificationService::AllSources());
service()->Save();
diff --git a/chrome/browser/sidebar/sidebar_browsertest.cc b/chrome/browser/sidebar/sidebar_browsertest.cc
index af59db0..f98f9fa 100644
--- a/chrome/browser/sidebar/sidebar_browsertest.cc
+++ b/chrome/browser/sidebar/sidebar_browsertest.cc
@@ -77,7 +77,7 @@ class SidebarTest : public ExtensionBrowserTest {
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&client_contents->controller()));
+ content::Source<NavigationController>(&client_contents->controller()));
sidebar_manager->NavigateSidebar(tab, content_id_, url);
observer.Wait();
}
diff --git a/chrome/browser/sidebar/sidebar_manager.cc b/chrome/browser/sidebar/sidebar_manager.cc
index c00a5b4..5c946c7 100644
--- a/chrome/browser/sidebar/sidebar_manager.cc
+++ b/chrome/browser/sidebar/sidebar_manager.cc
@@ -229,10 +229,10 @@ SidebarManager::~SidebarManager() {
}
void SidebarManager::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED) {
- HideAllSidebars(Source<TabContents>(source).ptr());
+ HideAllSidebars(content::Source<TabContents>(source).ptr());
} else {
NOTREACHED() << "Got a notification we didn't register for!";
}
@@ -241,8 +241,8 @@ void SidebarManager::Observe(int type,
void SidebarManager::UpdateSidebar(SidebarContainer* host) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_SIDEBAR_CHANGED,
- Source<SidebarManager>(this),
- Details<SidebarContainer>(host));
+ content::Source<SidebarManager>(this),
+ content::Details<SidebarContainer>(host));
}
void SidebarManager::HideAllSidebars(TabContents* tab) {
@@ -283,7 +283,7 @@ void SidebarManager::RegisterSidebarContainerFor(
if (tab_to_sidebar_host_.find(tab) == tab_to_sidebar_host_.end()) {
registrar_.Add(this,
content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab));
+ content::Source<TabContents>(tab));
}
BindSidebarHost(tab, sidebar_host);
@@ -302,7 +302,7 @@ void SidebarManager::UnregisterSidebarContainerFor(
if (tab_to_sidebar_host_.find(tab) == tab_to_sidebar_host_.end()) {
registrar_.Remove(this,
content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab));
+ content::Source<TabContents>(tab));
}
// Issue tab closing event post unbound.
diff --git a/chrome/browser/sidebar/sidebar_manager.h b/chrome/browser/sidebar/sidebar_manager.h
index 8bcc846..3cf4281 100644
--- a/chrome/browser/sidebar/sidebar_manager.h
+++ b/chrome/browser/sidebar/sidebar_manager.h
@@ -11,8 +11,8 @@
#include "base/memory/ref_counted.h"
#include "base/string16.h"
#include "chrome/browser/sidebar/sidebar_container.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class GURL;
class PrefService;
@@ -27,7 +27,7 @@ class TabContents;
// This class is a singleton that manages SidebarContainer instances and
// maintains a connection between tabs and sidebars.
//
-class SidebarManager : public NotificationObserver,
+class SidebarManager : public content::NotificationObserver,
public base::RefCounted<SidebarManager>,
private SidebarContainer::Delegate {
public:
@@ -98,10 +98,10 @@ class SidebarManager : public NotificationObserver,
virtual ~SidebarManager();
- // Overridden from NotificationObserver.
+ // Overridden from content::NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Overridden from SidebarContainer::Delegate.
virtual void UpdateSidebar(SidebarContainer* host);
@@ -127,7 +127,7 @@ class SidebarManager : public NotificationObserver,
// Forgets the link between |tab| and |sidebar_host|.
void UnbindSidebarHost(TabContents* tab, SidebarContainer* sidebar_host);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// This map stores sidebars linked to a particular tab. Sidebars are
// identified by their unique content id (string).
diff --git a/chrome/browser/speech/speech_input_bubble_controller.cc b/chrome/browser/speech/speech_input_bubble_controller.cc
index 1cfb552..1ffb393 100644
--- a/chrome/browser/speech/speech_input_bubble_controller.cc
+++ b/chrome/browser/speech/speech_input_bubble_controller.cc
@@ -8,8 +8,8 @@
#include "chrome/browser/tab_contents/tab_util.h"
#include "content/browser/browser_thread.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "ui/gfx/rect.h"
@@ -18,7 +18,7 @@ namespace speech_input {
SpeechInputBubbleController::SpeechInputBubbleController(Delegate* delegate)
: delegate_(delegate),
current_bubble_caller_id_(0),
- registrar_(new NotificationRegistrar) {
+ registrar_(new content::NotificationRegistrar) {
}
SpeechInputBubbleController::~SpeechInputBubbleController() {
@@ -111,19 +111,20 @@ void SpeechInputBubbleController::UpdateTabContentsSubscription(
if (action == BUBBLE_ADDED) {
registrar_->Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
} else {
registrar_->Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
}
}
-void SpeechInputBubbleController::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void SpeechInputBubbleController::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED) {
// Cancel all bubbles and active recognition sessions for this tab.
- TabContents* tab_contents = Source<TabContents>(source).ptr();
+ TabContents* tab_contents = content::Source<TabContents>(source).ptr();
BubbleCallerIdMap::iterator iter = bubbles_.begin();
while (iter != bubbles_.end()) {
if (iter->second->tab_contents() == tab_contents) {
diff --git a/chrome/browser/speech/speech_input_bubble_controller.h b/chrome/browser/speech/speech_input_bubble_controller.h
index 164807d..b0f1baf 100644
--- a/chrome/browser/speech/speech_input_bubble_controller.h
+++ b/chrome/browser/speech/speech_input_bubble_controller.h
@@ -11,12 +11,15 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/speech/speech_input_bubble.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
namespace gfx {
class Rect;
}
+
+namespace content {
class NotificationRegistrar;
+}
namespace speech_input {
@@ -28,7 +31,7 @@ namespace speech_input {
class SpeechInputBubbleController
: public base::RefCountedThreadSafe<SpeechInputBubbleController>,
public SpeechInputBubbleDelegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// All methods of this delegate are called in the IO thread.
class Delegate {
@@ -80,10 +83,10 @@ class SpeechInputBubbleController
virtual void InfoBubbleButtonClicked(SpeechInputBubble::Button button);
virtual void InfoBubbleFocusChanged();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// The various calls received by this object and handled in the UI thread.
@@ -132,7 +135,7 @@ class SpeechInputBubbleController
typedef std::map<int, SpeechInputBubble*> BubbleCallerIdMap;
BubbleCallerIdMap bubbles_;
- scoped_ptr<NotificationRegistrar> registrar_;
+ scoped_ptr<content::NotificationRegistrar> registrar_;
};
// This typedef is to workaround the issue with certain versions of
diff --git a/chrome/browser/spellchecker/spellcheck_host_impl.cc b/chrome/browser/spellchecker/spellcheck_host_impl.cc
index d2ab6c3..5cc84c6 100644
--- a/chrome/browser/spellchecker/spellcheck_host_impl.cc
+++ b/chrome/browser/spellchecker/spellcheck_host_impl.cc
@@ -353,10 +353,10 @@ void SpellCheckHostImpl::OnURLFetchComplete(const URLFetcher* source,
}
void SpellCheckHostImpl::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == content::NOTIFICATION_RENDERER_PROCESS_CREATED);
- RenderProcessHost* process = Source<RenderProcessHost>(source).ptr();
+ RenderProcessHost* process = content::Source<RenderProcessHost>(source).ptr();
InitForRenderer(process);
}
diff --git a/chrome/browser/spellchecker/spellcheck_host_impl.h b/chrome/browser/spellchecker/spellcheck_host_impl.h
index 6ec5ec4..30c217c 100644
--- a/chrome/browser/spellchecker/spellcheck_host_impl.h
+++ b/chrome/browser/spellchecker/spellcheck_host_impl.h
@@ -14,8 +14,8 @@
#include "chrome/browser/spellchecker/spellcheck_host.h"
#include "chrome/browser/spellchecker/spellcheck_profile_provider.h"
#include "content/common/net/url_fetcher.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
// This class implements the SpellCheckHost interface to provide the
// functionalities listed below:
@@ -39,7 +39,7 @@
// can be listed using SpellCheckHost::GetAvailableLanguages() static method.
class SpellCheckHostImpl : public SpellCheckHost,
public URLFetcher::Delegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
SpellCheckHostImpl(SpellCheckProfileProvider* profile,
const std::string& language,
@@ -113,8 +113,8 @@ class SpellCheckHostImpl : public SpellCheckHost,
// NotificationProfile implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Saves |data_| to disk. Run on the file thread.
void SaveDictionaryData();
@@ -156,7 +156,7 @@ class SpellCheckHostImpl : public SpellCheckHost,
// Used for downloading the dictionary file.
scoped_ptr<URLFetcher> fetcher_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// An optional metrics counter given by the constructor.
SpellCheckHostMetrics* metrics_;
diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc
index 292ecbf..1b98d63 100644
--- a/chrome/browser/ssl/ssl_blocking_page.cc
+++ b/chrome/browser/ssl/ssl_blocking_page.cc
@@ -117,7 +117,7 @@ void SSLBlockingPage::UpdateEntry(NavigationEntry* entry) {
entry->ssl().set_security_bits(ssl_info.security_bits);
NotificationService::current()->Notify(
content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED,
- Source<NavigationController>(&tab()->controller()),
+ content::Source<NavigationController>(&tab()->controller()),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index 1c86f6c..b2ebc6e 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -122,7 +122,7 @@ class SSLUITest : public InProcessBrowserTest {
ASSERT_TRUE(interstitial_page);
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->controller()));
interstitial_page->Proceed();
observer.Wait();
}
@@ -430,7 +430,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestHTTPSExpiredCertAndGoForward) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->controller()));
tab->controller().GoBack();
observer.Wait();
}
@@ -448,7 +448,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestHTTPSExpiredCertAndGoForward) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->controller()));
tab->controller().GoToOffset(1);
observer.Wait();
}
@@ -1032,7 +1032,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestGoodFrameNavigation) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->controller()));
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
tab->render_view_host(), std::wstring(),
L"window.domAutomationController.send(clickLink('goodHTTPSLink'));",
@@ -1048,7 +1048,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestGoodFrameNavigation) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->controller()));
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
tab->render_view_host(), std::wstring(),
L"window.domAutomationController.send(clickLink('badHTTPSLink'));",
@@ -1074,7 +1074,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestGoodFrameNavigation) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->controller()));
tab->controller().GoBack();
observer.Wait();
}
@@ -1084,7 +1084,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestGoodFrameNavigation) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->controller()));
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
tab->render_view_host(), std::wstring(),
L"window.domAutomationController.send(clickLink('HTTPLink'));",
@@ -1100,7 +1100,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestGoodFrameNavigation) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->controller()));
tab->controller().GoBack();
observer.Wait();
}
@@ -1132,7 +1132,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestBadFrameNavigation) {
bool success = false;
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->controller()));
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
tab->render_view_host(), std::wstring(),
L"window.domAutomationController.send(clickLink('goodHTTPSLink'));",
@@ -1169,7 +1169,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestUnauthenticatedFrameNavigation) {
bool success = false;
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->controller()));
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
tab->render_view_host(), std::wstring(),
L"window.domAutomationController.send(clickLink('goodHTTPSLink'));",
@@ -1186,7 +1186,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestUnauthenticatedFrameNavigation) {
bool success = false;
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->controller()));
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
tab->render_view_host(), std::wstring(),
L"window.domAutomationController.send(clickLink('badHTTPSLink'));",
diff --git a/chrome/browser/sync/backend_migrator.cc b/chrome/browser/sync/backend_migrator.cc
index 47fb4d6..cb6a0d2 100644
--- a/chrome/browser/sync/backend_migrator.cc
+++ b/chrome/browser/sync/backend_migrator.cc
@@ -16,8 +16,8 @@
#include "chrome/browser/sync/sessions/session_state.h"
#include "chrome/browser/sync/syncable/directory_manager.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
using syncable::ModelTypeSet;
@@ -36,7 +36,7 @@ BackendMigrator::BackendMigrator(const std::string& name,
manager_(manager), state_(IDLE),
weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
registrar_.Add(this, chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
- Source<DataTypeManager>(manager_));
+ content::Source<DataTypeManager>(manager_));
}
BackendMigrator::~BackendMigrator() {
@@ -134,8 +134,8 @@ void BackendMigrator::RestartMigration() {
}
void BackendMigrator::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(chrome::NOTIFICATION_SYNC_CONFIGURE_DONE, type);
if (state_ == IDLE)
return;
@@ -147,7 +147,8 @@ void BackendMigrator::Observe(int type,
FROM_HERE,
base::Bind(&BackendMigrator::OnConfigureDone,
weak_ptr_factory_.GetWeakPtr(),
- *Details<DataTypeManager::ConfigureResult>(details).ptr()));
+ *content::Details<DataTypeManager::ConfigureResult>(
+ details).ptr()));
}
namespace {
diff --git a/chrome/browser/sync/backend_migrator.h b/chrome/browser/sync/backend_migrator.h
index d1c409d..7e771cb 100644
--- a/chrome/browser/sync/backend_migrator.h
+++ b/chrome/browser/sync/backend_migrator.h
@@ -11,8 +11,8 @@
#include "base/task.h"
#include "chrome/browser/sync/glue/data_type_manager.h"
#include "chrome/browser/sync/syncable/model_type.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class ProfileSyncService;
@@ -34,7 +34,7 @@ class MigrationObserver {
// A class to perform migration of a datatype pursuant to the 'MIGRATION_DONE'
// code in the sync protocol definition (protocol/sync.proto).
-class BackendMigrator : public NotificationObserver {
+class BackendMigrator : public content::NotificationObserver {
public:
enum State {
IDLE,
@@ -61,10 +61,10 @@ class BackendMigrator : public NotificationObserver {
bool HasMigrationObserver(MigrationObserver* observer) const;
void RemoveMigrationObserver(MigrationObserver* observer);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
State state() const;
@@ -93,7 +93,7 @@ class BackendMigrator : public NotificationObserver {
State state_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
ObserverList<MigrationObserver> migration_observers_;
diff --git a/chrome/browser/sync/backend_migrator_unittest.cc b/chrome/browser/sync/backend_migrator_unittest.cc
index 75a0248..0f10842 100644
--- a/chrome/browser/sync/backend_migrator_unittest.cc
+++ b/chrome/browser/sync/backend_migrator_unittest.cc
@@ -79,8 +79,8 @@ class BackendMigratorTest : public testing::Test {
DataTypeManager::ConfigureResult result(status, requested_types);
NotificationService::current()->Notify(
chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
- Source<DataTypeManager>(&manager_),
- Details<const DataTypeManager::ConfigureResult>(&result));
+ content::Source<DataTypeManager>(&manager_),
+ content::Details<const DataTypeManager::ConfigureResult>(&result));
} else {
std::list<SyncError> errors;
DataTypeManager::ConfigureResult result(
@@ -89,8 +89,8 @@ class BackendMigratorTest : public testing::Test {
errors);
NotificationService::current()->Notify(
chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
- Source<DataTypeManager>(&manager_),
- Details<const DataTypeManager::ConfigureResult>(&result));
+ content::Source<DataTypeManager>(&manager_),
+ content::Details<const DataTypeManager::ConfigureResult>(&result));
}
message_loop_.RunAllPending();
}
diff --git a/chrome/browser/sync/glue/autofill_change_processor.cc b/chrome/browser/sync/glue/autofill_change_processor.cc
index 4f18dcb..ce1b0d9 100644
--- a/chrome/browser/sync/glue/autofill_change_processor.cc
+++ b/chrome/browser/sync/glue/autofill_change_processor.cc
@@ -59,11 +59,12 @@ AutofillChangeProcessor::AutofillChangeProcessor(
AutofillChangeProcessor::~AutofillChangeProcessor() {}
-void AutofillChangeProcessor::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void AutofillChangeProcessor::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
// Ensure this notification came from our web database.
- WebDataService* wds = Source<WebDataService>(source).ptr();
+ WebDataService* wds = content::Source<WebDataService>(source).ptr();
if (!wds || wds->GetDatabase() != web_database_)
return;
@@ -83,7 +84,8 @@ void AutofillChangeProcessor::Observe(int type,
DCHECK(type == chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED);
- AutofillChangeList* changes = Details<AutofillChangeList>(details).ptr();
+ AutofillChangeList* changes =
+ content::Details<AutofillChangeList>(details).ptr();
ObserveAutofillEntriesChanged(changes, &trans, autofill_root);
}
diff --git a/chrome/browser/sync/glue/autofill_change_processor.h b/chrome/browser/sync/glue/autofill_change_processor.h
index 454c11f..f29bac2 100644
--- a/chrome/browser/sync/glue/autofill_change_processor.h
+++ b/chrome/browser/sync/glue/autofill_change_processor.h
@@ -13,8 +13,8 @@
#include "chrome/browser/sync/glue/sync_backend_host.h"
#include "chrome/browser/sync/protocol/autofill_specifics.pb.h"
#include "chrome/browser/webdata/web_data_service.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class AutofillEntry;
class AutofillProfileChange;
@@ -35,7 +35,7 @@ class UnrecoverableErrorHandler;
// applying them to the sync_api 'syncable' model, and vice versa. All
// operations and use of this class are from the DB thread.
class AutofillChangeProcessor : public ChangeProcessor,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
AutofillChangeProcessor(AutofillModelAssociator* model_associator,
WebDatabase* web_database,
@@ -43,11 +43,11 @@ class AutofillChangeProcessor : public ChangeProcessor,
UnrecoverableErrorHandler* error_handler);
virtual ~AutofillChangeProcessor();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
// WebDataService -> sync_api model change application.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// sync_api model -> WebDataService change application.
virtual void ApplyChangesFromSyncModel(
@@ -118,7 +118,7 @@ class AutofillChangeProcessor : public ChangeProcessor,
// the changes made.
Profile* profile_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
bool observing_;
diff --git a/chrome/browser/sync/glue/autofill_data_type_controller.cc b/chrome/browser/sync/glue/autofill_data_type_controller.cc
index 9d258a6..74f9f32 100644
--- a/chrome/browser/sync/glue/autofill_data_type_controller.cc
+++ b/chrome/browser/sync/glue/autofill_data_type_controller.cc
@@ -16,7 +16,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/browser_thread.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
namespace browser_sync {
@@ -49,7 +49,7 @@ bool AutofillDataTypeController::StartModels() {
} else {
notification_registrar_.Add(
this, chrome::NOTIFICATION_WEB_DATABASE_LOADED,
- Source<WebDataService>(web_data_service_.get()));
+ content::Source<WebDataService>(web_data_service_.get()));
return false;
}
}
@@ -70,13 +70,14 @@ void AutofillDataTypeController::OnPersonalDataChanged() {
} else {
notification_registrar_.Add(
this, chrome::NOTIFICATION_WEB_DATABASE_LOADED,
- Source<WebDataService>(web_data_service_.get()));
+ content::Source<WebDataService>(web_data_service_.get()));
}
}
-void AutofillDataTypeController::Observe(int notification_type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void AutofillDataTypeController::Observe(
+ int notification_type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(state(), MODEL_STARTING);
notification_registrar_.RemoveAll();
diff --git a/chrome/browser/sync/glue/autofill_data_type_controller.h b/chrome/browser/sync/glue/autofill_data_type_controller.h
index f5a1118..b5aa65f 100644
--- a/chrome/browser/sync/glue/autofill_data_type_controller.h
+++ b/chrome/browser/sync/glue/autofill_data_type_controller.h
@@ -12,11 +12,9 @@
#include "base/memory/ref_counted.h"
#include "chrome/browser/autofill/personal_data_manager_observer.h"
#include "chrome/browser/sync/glue/non_frontend_data_type_controller.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
-class NotificationDetails;
-class NotificationSource;
class PersonalDataManager;
class WebDataService;
@@ -24,7 +22,7 @@ namespace browser_sync {
// A class that manages the startup and shutdown of autofill sync.
class AutofillDataTypeController : public NonFrontendDataTypeController,
- public NotificationObserver,
+ public content::NotificationObserver,
public PersonalDataManagerObserver {
public:
AutofillDataTypeController(ProfileSyncFactory* profile_sync_factory,
@@ -35,10 +33,10 @@ class AutofillDataTypeController : public NonFrontendDataTypeController,
virtual syncable::ModelType type() const;
virtual browser_sync::ModelSafeGroup model_safe_group() const;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int notification_type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// PersonalDataManagerObserver implementation:
virtual void OnPersonalDataChanged() OVERRIDE;
@@ -63,7 +61,7 @@ class AutofillDataTypeController : public NonFrontendDataTypeController,
private:
PersonalDataManager* personal_data_;
scoped_refptr<WebDataService> web_data_service_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
DISALLOW_COPY_AND_ASSIGN(AutofillDataTypeController);
};
diff --git a/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc b/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc
index 012f8d9..e954f65 100644
--- a/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc
@@ -21,7 +21,7 @@
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/test/base/profile_mock.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "testing/gmock/include/gmock/gmock.h"
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 9edf21b..152a4a2 100644
--- a/chrome/browser/sync/glue/autofill_profile_data_type_controller.cc
+++ b/chrome/browser/sync/glue/autofill_profile_data_type_controller.cc
@@ -17,7 +17,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/browser_thread.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
namespace browser_sync {
@@ -67,8 +67,8 @@ void AutofillProfileDataTypeController::OnPersonalDataChanged() {
void AutofillProfileDataTypeController::Observe(
int notification_type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
notification_registrar_.RemoveAll();
DoStartAssociationAsync();
}
diff --git a/chrome/browser/sync/glue/autofill_profile_data_type_controller.h b/chrome/browser/sync/glue/autofill_profile_data_type_controller.h
index f55dd8a..3613355 100644
--- a/chrome/browser/sync/glue/autofill_profile_data_type_controller.h
+++ b/chrome/browser/sync/glue/autofill_profile_data_type_controller.h
@@ -10,11 +10,9 @@
#include "base/memory/ref_counted.h"
#include "chrome/browser/autofill/personal_data_manager_observer.h"
#include "chrome/browser/sync/glue/new_non_frontend_data_type_controller.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
-class NotificationDetails;
-class NotificationSource;
class PersonalDataManager;
class WebDataService;
@@ -22,7 +20,7 @@ namespace browser_sync {
class AutofillProfileDataTypeController
: public NewNonFrontendDataTypeController,
- public NotificationObserver,
+ public content::NotificationObserver,
public PersonalDataManagerObserver {
public:
AutofillProfileDataTypeController(
@@ -34,10 +32,10 @@ class AutofillProfileDataTypeController
virtual syncable::ModelType type() const OVERRIDE;
virtual browser_sync::ModelSafeGroup model_safe_group() const OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// PersonalDataManagerObserver implementation:
virtual void OnPersonalDataChanged() OVERRIDE;
@@ -61,7 +59,7 @@ class AutofillProfileDataTypeController
private:
PersonalDataManager* personal_data_;
scoped_refptr<WebDataService> web_data_service_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
DISALLOW_COPY_AND_ASSIGN(AutofillProfileDataTypeController);
};
diff --git a/chrome/browser/sync/glue/bookmark_data_type_controller.cc b/chrome/browser/sync/glue/bookmark_data_type_controller.cc
index b7022b2..b2f1057 100644
--- a/chrome/browser/sync/glue/bookmark_data_type_controller.cc
+++ b/chrome/browser/sync/glue/bookmark_data_type_controller.cc
@@ -11,8 +11,8 @@
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
namespace browser_sync {
@@ -38,7 +38,7 @@ bool BookmarkDataTypeController::StartModels() {
// Add an observer and continue when the bookmarks model is loaded.
registrar_.Add(this, chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
- Source<Profile>(sync_service_->profile()));
+ content::Source<Profile>(sync_service_->profile()));
return false; // Don't continue Start.
}
@@ -47,9 +47,10 @@ void BookmarkDataTypeController::CleanUpState() {
registrar_.RemoveAll();
}
-void BookmarkDataTypeController::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void BookmarkDataTypeController::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED, type);
registrar_.RemoveAll();
diff --git a/chrome/browser/sync/glue/bookmark_data_type_controller.h b/chrome/browser/sync/glue/bookmark_data_type_controller.h
index b35c93e..56366d1 100644
--- a/chrome/browser/sync/glue/bookmark_data_type_controller.h
+++ b/chrome/browser/sync/glue/bookmark_data_type_controller.h
@@ -9,17 +9,14 @@
#include <string>
#include "chrome/browser/sync/glue/frontend_data_type_controller.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
-
-class NotificationDetails;
-class NotificationSource;
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
namespace browser_sync {
// A class that manages the startup and shutdown of bookmark sync.
class BookmarkDataTypeController : public FrontendDataTypeController,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
BookmarkDataTypeController(
ProfileSyncFactory* profile_sync_factory,
@@ -30,10 +27,10 @@ class BookmarkDataTypeController : public FrontendDataTypeController,
// FrontendDataTypeController interface.
virtual syncable::ModelType type() const;
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// FrontendDataTypeController interface.
@@ -46,7 +43,7 @@ class BookmarkDataTypeController : public FrontendDataTypeController,
virtual void RecordAssociationTime(base::TimeDelta time);
virtual void RecordStartFailure(StartResult result);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(BookmarkDataTypeController);
};
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 6f65b9f..d8a3fa9 100644
--- a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
@@ -20,7 +20,7 @@
#include "chrome/test/base/profile_mock.h"
#include "content/browser/browser_thread.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "testing/gmock/include/gmock/gmock.h"
using browser_sync::BookmarkDataTypeController;
@@ -115,7 +115,7 @@ TEST_F(BookmarkDataTypeControllerTest, StartBookmarkModelNotReady) {
// Send the notification that the bookmark model has started.
NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
- Source<Profile>(&profile_),
+ content::Source<Profile>(&profile_),
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 d2f5728..3a58290 100644
--- a/chrome/browser/sync/glue/data_type_manager_impl.cc
+++ b/chrome/browser/sync/glue/data_type_manager_impl.cc
@@ -18,9 +18,9 @@
#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_details.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
namespace browser_sync {
@@ -459,7 +459,7 @@ void DataTypeManagerImpl::Abort(ConfigureStatus status,
void DataTypeManagerImpl::NotifyStart() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_SYNC_CONFIGURE_START,
- Source<DataTypeManager>(this),
+ content::Source<DataTypeManager>(this),
NotificationService::NoDetails());
}
@@ -495,8 +495,8 @@ void DataTypeManagerImpl::NotifyDone(const ConfigureResult& result) {
}
NotificationService::current()->Notify(
chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
- Source<DataTypeManager>(this),
- Details<const ConfigureResult>(&result));
+ content::Source<DataTypeManager>(this),
+ content::Details<const ConfigureResult>(&result));
}
DataTypeManager::State DataTypeManagerImpl::state() {
@@ -510,7 +510,7 @@ void DataTypeManagerImpl::SetBlockedAndNotify() {
<< configure_time_delta_.InSecondsF() << "s";
NotificationService::current()->Notify(
chrome::NOTIFICATION_SYNC_CONFIGURE_BLOCKED,
- Source<DataTypeManager>(this),
+ content::Source<DataTypeManager>(this),
NotificationService::NoDetails());
}
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 8714278..eccd6f8 100644
--- a/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc
+++ b/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc
@@ -18,10 +18,10 @@
#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_observer_mock.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/test/notification_observer_mock.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -46,9 +46,9 @@ using testing::Return;
using testing::SaveArg;
DataTypeManager::ConfigureStatus GetStatus(
- const NotificationDetails& details) {
+ const content::NotificationDetails& details) {
const DataTypeManager::ConfigureResult* result =
- Details<const DataTypeManager::ConfigureResult>(
+ content::Details<const DataTypeManager::ConfigureResult>(
details).ptr();
return result->status;
}
@@ -285,8 +285,8 @@ class DataTypeManagerImplTest : public testing::Test {
BrowserThread ui_thread_;
DataTypeController::TypeMap controllers_;
NiceMock<SyncBackendHostMock> backend_;
- NotificationObserverMock observer_;
- NotificationRegistrar registrar_;
+ content::NotificationObserverMock observer_;
+ content::NotificationRegistrar registrar_;
std::set<syncable::ModelType> types_;
};
diff --git a/chrome/browser/sync/glue/data_type_manager_mock.h b/chrome/browser/sync/glue/data_type_manager_mock.h
index d152f1b..34828d8 100644
--- a/chrome/browser/sync/glue/data_type_manager_mock.h
+++ b/chrome/browser/sync/glue/data_type_manager_mock.h
@@ -9,8 +9,8 @@
#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_details.h"
#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_types.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -37,14 +37,14 @@ ACTION_P3(InvokeCallbackPointer, callback, datatype, callback_result) {
ACTION_P3(NotifyFromDataTypeManagerWithResult, dtm, type, result) {
NotificationService::current()->Notify(
type,
- Source<browser_sync::DataTypeManager>(dtm),
- Details<const browser_sync::DataTypeManager::ConfigureResult>(
+ content::Source<browser_sync::DataTypeManager>(dtm),
+ content::Details<const browser_sync::DataTypeManager::ConfigureResult>(
result));
}
ACTION_P2(NotifyFromDataTypeManager, dtm, type) {
NotificationService::current()->Notify(type,
- Source<browser_sync::DataTypeManager>(dtm),
+ content::Source<browser_sync::DataTypeManager>(dtm),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/sync/glue/password_change_processor.cc b/chrome/browser/sync/glue/password_change_processor.cc
index 715bdfb..5022542 100644
--- a/chrome/browser/sync/glue/password_change_processor.cc
+++ b/chrome/browser/sync/glue/password_change_processor.cc
@@ -21,8 +21,8 @@
#include "chrome/browser/sync/protocol/password_specifics.pb.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "webkit/glue/password_form.h"
namespace browser_sync {
@@ -50,9 +50,10 @@ PasswordChangeProcessor::~PasswordChangeProcessor() {
DCHECK(expected_loop_ == MessageLoop::current());
}
-void PasswordChangeProcessor::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void PasswordChangeProcessor::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(expected_loop_ == MessageLoop::current());
DCHECK(chrome::NOTIFICATION_LOGINS_CHANGED == type);
if (!observing_)
@@ -71,7 +72,7 @@ void PasswordChangeProcessor::Observe(int type,
}
PasswordStoreChangeList* changes =
- Details<PasswordStoreChangeList>(details).ptr();
+ content::Details<PasswordStoreChangeList>(details).ptr();
for (PasswordStoreChangeList::iterator change = changes->begin();
change != changes->end(); ++change) {
std::string tag = PasswordModelAssociator::MakeTag(change->form());
@@ -227,14 +228,15 @@ void PasswordChangeProcessor::StartObserving() {
DCHECK(expected_loop_ == MessageLoop::current());
notification_registrar_.Add(this,
chrome::NOTIFICATION_LOGINS_CHANGED,
- Source<PasswordStore>(password_store_));
+ content::Source<PasswordStore>(password_store_));
}
void PasswordChangeProcessor::StopObserving() {
DCHECK(expected_loop_ == MessageLoop::current());
- notification_registrar_.Remove(this,
- chrome::NOTIFICATION_LOGINS_CHANGED,
- Source<PasswordStore>(password_store_));
+ notification_registrar_.Remove(
+ this,
+ chrome::NOTIFICATION_LOGINS_CHANGED,
+ content::Source<PasswordStore>(password_store_));
}
} // namespace browser_sync
diff --git a/chrome/browser/sync/glue/password_change_processor.h b/chrome/browser/sync/glue/password_change_processor.h
index a71f0f6..87a6409 100644
--- a/chrome/browser/sync/glue/password_change_processor.h
+++ b/chrome/browser/sync/glue/password_change_processor.h
@@ -12,8 +12,8 @@
#include "base/compiler_specific.h"
#include "chrome/browser/sync/glue/password_model_associator.h"
#include "chrome/browser/sync/glue/sync_backend_host.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
class PasswordStore;
@@ -29,18 +29,18 @@ class UnrecoverableErrorHandler;
// operations and use of this class are from the DB thread on Windows and Linux,
// or the password thread on Mac.
class PasswordChangeProcessor : public ChangeProcessor,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
PasswordChangeProcessor(PasswordModelAssociator* model_associator,
PasswordStore* password_store,
UnrecoverableErrorHandler* error_handler);
virtual ~PasswordChangeProcessor();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
// Passwords -> sync_api model change application.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// sync_api model -> WebDataService change application.
virtual void ApplyChangesFromSyncModel(
@@ -75,7 +75,7 @@ class PasswordChangeProcessor : public ChangeProcessor,
PasswordModelAssociator::PasswordVector updated_passwords_;
PasswordModelAssociator::PasswordVector deleted_passwords_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
bool observing_;
diff --git a/chrome/browser/sync/glue/search_engine_data_type_controller.cc b/chrome/browser/sync/glue/search_engine_data_type_controller.cc
index 9f90cd5..25c9f5b 100644
--- a/chrome/browser/sync/glue/search_engine_data_type_controller.cc
+++ b/chrome/browser/sync/glue/search_engine_data_type_controller.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/sync/profile_sync_factory.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
namespace browser_sync {
@@ -34,8 +34,8 @@ syncable::ModelType SearchEngineDataTypeController::type() const {
void SearchEngineDataTypeController::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED, type);
registrar_.RemoveAll();
@@ -55,7 +55,7 @@ bool SearchEngineDataTypeController::StartModels() {
// Add an observer and continue when the TemplateURLService is loaded.
registrar_.Add(this, chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED,
- Source<TemplateURLService>(turl_service));
+ content::Source<TemplateURLService>(turl_service));
return false; // Don't continue Start.
}
diff --git a/chrome/browser/sync/glue/search_engine_data_type_controller.h b/chrome/browser/sync/glue/search_engine_data_type_controller.h
index 61d9f87..e4460e2 100644
--- a/chrome/browser/sync/glue/search_engine_data_type_controller.h
+++ b/chrome/browser/sync/glue/search_engine_data_type_controller.h
@@ -11,13 +11,13 @@
#include "base/compiler_specific.h"
#include "chrome/browser/sync/glue/generic_change_processor.h"
#include "chrome/browser/sync/glue/frontend_data_type_controller.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
namespace browser_sync {
class SearchEngineDataTypeController : public FrontendDataTypeController,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
SearchEngineDataTypeController(
ProfileSyncFactory* profile_sync_factory,
@@ -28,10 +28,10 @@ class SearchEngineDataTypeController : public FrontendDataTypeController,
// FrontendDataTypeController implementation.
virtual syncable::ModelType type() const OVERRIDE;
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
protected:
virtual GenericChangeProcessor* change_processor() const OVERRIDE;
@@ -49,7 +49,7 @@ class SearchEngineDataTypeController : public FrontendDataTypeController,
scoped_ptr<GenericChangeProcessor> generic_change_processor_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(SearchEngineDataTypeController);
};
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 e618f8e..a2abcb9 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
@@ -109,7 +109,7 @@ TEST_F(SearchEngineDataTypeControllerTest, StartURLServiceNotReady) {
// Send the notification that the TemplateURLService has started.
NotificationService::current()->Notify(
chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED,
- Source<TemplateURLService>(test_util_.model()),
+ content::Source<TemplateURLService>(test_util_.model()),
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 5ce3ba6..45b4d9e 100644
--- a/chrome/browser/sync/glue/session_change_processor.cc
+++ b/chrome/browser/sync/glue/session_change_processor.cc
@@ -21,9 +21,9 @@
#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_details.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
namespace browser_sync {
@@ -31,9 +31,10 @@ namespace {
// Extract the source SyncedTabDelegate from a NotificationSource originating
// from a NavigationController, if it exists. Returns |NULL| otherwise.
-SyncedTabDelegate* ExtractSyncedTabDelegate(const NotificationSource& source) {
+SyncedTabDelegate* ExtractSyncedTabDelegate(
+ const content::NotificationSource& source) {
TabContentsWrapper* tab = TabContentsWrapper::GetCurrentWrapperForContents(
- Source<NavigationController>(source).ptr()->tab_contents());
+ content::Source<NavigationController>(source).ptr()->tab_contents());
if (!tab)
return NULL;
return tab->synced_tab_delegate();
@@ -70,9 +71,10 @@ SessionChangeProcessor::~SessionChangeProcessor() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
-void SessionChangeProcessor::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void SessionChangeProcessor::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(running());
DCHECK(profile_);
@@ -81,7 +83,7 @@ void SessionChangeProcessor::Observe(int type,
std::vector<SyncedTabDelegate*> modified_tabs;
switch (type) {
case chrome::NOTIFICATION_BROWSER_OPENED: {
- Browser* browser = Source<Browser>(source).ptr();
+ Browser* browser = content::Source<Browser>(source).ptr();
if (!browser || browser->profile() != profile_) {
return;
}
@@ -90,7 +92,7 @@ void SessionChangeProcessor::Observe(int type,
}
case content::NOTIFICATION_TAB_PARENTED: {
- SyncedTabDelegate* tab = Source<SyncedTabDelegate>(source).ptr();
+ SyncedTabDelegate* tab = content::Source<SyncedTabDelegate>(source).ptr();
if (!tab || tab->profile() != profile_) {
return;
}
@@ -102,7 +104,7 @@ void SessionChangeProcessor::Observe(int type,
case content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME: {
TabContentsWrapper* tab_contents_wrapper =
TabContentsWrapper::GetCurrentWrapperForContents(
- Source<TabContents>(source).ptr());
+ content::Source<TabContents>(source).ptr());
if (!tab_contents_wrapper) {
return;
}
@@ -157,7 +159,7 @@ void SessionChangeProcessor::Observe(int type,
case chrome::NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED: {
ExtensionTabHelper* extension_tab_helper =
- Source<ExtensionTabHelper>(source).ptr();
+ content::Source<ExtensionTabHelper>(source).ptr();
if (!extension_tab_helper ||
extension_tab_helper->tab_contents()->browser_context() != profile_) {
return;
@@ -270,7 +272,7 @@ void SessionChangeProcessor::ApplyChangesFromSyncModel(
// Notify foreign session handlers that there are new sessions.
NotificationService::current()->Notify(
chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED,
- Source<Profile>(profile_),
+ content::Source<Profile>(profile_),
NotificationService::NoDetails());
StartObserving();
diff --git a/chrome/browser/sync/glue/session_change_processor.h b/chrome/browser/sync/glue/session_change_processor.h
index a7fe920..bc6e1c6 100644
--- a/chrome/browser/sync/glue/session_change_processor.h
+++ b/chrome/browser/sync/glue/session_change_processor.h
@@ -11,13 +11,10 @@
#include "chrome/browser/sessions/session_backend.h"
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sync/glue/change_processor.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
-
-class NotificationDetails;
-class NotificationSource;
class Profile;
namespace browser_sync {
@@ -30,7 +27,7 @@ class UnrecoverableErrorHandler;
// model, and vice versa. All operations and use of this class are
// from the UI thread.
class SessionChangeProcessor : public ChangeProcessor,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// Does not take ownership of either argument.
SessionChangeProcessor(
@@ -42,11 +39,11 @@ class SessionChangeProcessor : public ChangeProcessor,
bool setup_for_test);
virtual ~SessionChangeProcessor();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
// BrowserSessionProvider -> sync_api model change application.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// ChangeProcessor implementation.
// sync_api model -> BrowserSessionProvider change application.
@@ -63,7 +60,7 @@ class SessionChangeProcessor : public ChangeProcessor,
void StartObserving();
void StopObserving();
SessionModelAssociator* session_model_associator_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
// Owner of the SessionService. Non-NULL iff |running()| is true.
Profile* profile_;
diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc
index e243085..73bf7cd 100644
--- a/chrome/browser/sync/glue/session_model_associator.cc
+++ b/chrome/browser/sync/glue/session_model_associator.cc
@@ -28,8 +28,8 @@
#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_details.h"
#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
#if defined(OS_LINUX)
#include "base/linux_util.h"
#elif defined(OS_WIN)
@@ -535,7 +535,7 @@ bool SessionModelAssociator::DisassociateModels(SyncError* error) {
// foreign session handlers.
NotificationService::current()->Notify(
chrome::NOTIFICATION_FOREIGN_SESSION_DISABLED,
- Source<Profile>(sync_service_->profile()),
+ content::Source<Profile>(sync_service_->profile()),
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 dfc8607..ff5374d 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -790,8 +790,8 @@ void SyncBackendHost::Core::NotifyUpdatedToken(const std::string& token) {
TokenAvailableDetails details(GaiaConstants::kSyncService, token);
NotificationService::current()->Notify(
chrome::NOTIFICATION_TOKEN_UPDATED,
- Source<Profile>(host_->profile_),
- Details<const TokenAvailableDetails>(&details));
+ content::Source<Profile>(host_->profile_),
+ content::Details<const TokenAvailableDetails>(&details));
}
void SyncBackendHost::Core::NotifyEncryptionComplete(
diff --git a/chrome/browser/sync/glue/theme_change_processor.cc b/chrome/browser/sync/glue/theme_change_processor.cc
index 2b6a77d..c32b26b 100644
--- a/chrome/browser/sync/glue/theme_change_processor.cc
+++ b/chrome/browser/sync/glue/theme_change_processor.cc
@@ -18,8 +18,8 @@
#include "chrome/browser/themes/theme_service.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
namespace browser_sync {
@@ -32,9 +32,10 @@ ThemeChangeProcessor::ThemeChangeProcessor(
ThemeChangeProcessor::~ThemeChangeProcessor() {}
-void ThemeChangeProcessor::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ThemeChangeProcessor::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(running());
DCHECK(profile_);
DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
@@ -126,7 +127,7 @@ void ThemeChangeProcessor::StartObserving() {
VLOG(1) << "Observing BROWSER_THEME_CHANGED";
notification_registrar_.Add(
this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(
+ content::Source<ThemeService>(
ThemeServiceFactory::GetForProfile(profile_)));
}
diff --git a/chrome/browser/sync/glue/theme_change_processor.h b/chrome/browser/sync/glue/theme_change_processor.h
index 7651bce..7e6906f 100644
--- a/chrome/browser/sync/glue/theme_change_processor.h
+++ b/chrome/browser/sync/glue/theme_change_processor.h
@@ -9,12 +9,10 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chrome/browser/sync/glue/change_processor.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
-class NotificationDetails;
-class NotificationSource;
class Profile;
namespace browser_sync {
@@ -26,16 +24,16 @@ class UnrecoverableErrorHandler;
// model, and vice versa. All operations and use of this class are
// from the UI thread.
class ThemeChangeProcessor : public ChangeProcessor,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit ThemeChangeProcessor(UnrecoverableErrorHandler* error_handler);
virtual ~ThemeChangeProcessor();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
// ThemeService -> sync_api model change application.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// ChangeProcessor implementation.
// sync_api model -> ThemeService change application.
@@ -52,7 +50,7 @@ class ThemeChangeProcessor : public ChangeProcessor,
void StartObserving();
void StopObserving();
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
// Profile associated with the ThemeService. Non-NULL iff |running()| is
// true.
Profile* profile_;
diff --git a/chrome/browser/sync/glue/typed_url_change_processor.cc b/chrome/browser/sync/glue/typed_url_change_processor.cc
index 067b7b2..b68b2a1 100644
--- a/chrome/browser/sync/glue/typed_url_change_processor.cc
+++ b/chrome/browser/sync/glue/typed_url_change_processor.cc
@@ -56,9 +56,10 @@ TypedUrlChangeProcessor::~TypedUrlChangeProcessor() {
DCHECK(expected_loop_ == MessageLoop::current());
}
-void TypedUrlChangeProcessor::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void TypedUrlChangeProcessor::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(expected_loop_ == MessageLoop::current());
if (!observing_)
return;
@@ -69,11 +70,14 @@ void TypedUrlChangeProcessor::Observe(int type,
chrome::NOTIFICATION_HISTORY_URLS_DELETED == type ||
chrome::NOTIFICATION_HISTORY_URL_VISITED == type);
if (type == chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED) {
- HandleURLsModified(Details<history::URLsModifiedDetails>(details).ptr());
+ HandleURLsModified(
+ content::Details<history::URLsModifiedDetails>(details).ptr());
} else if (type == chrome::NOTIFICATION_HISTORY_URLS_DELETED) {
- HandleURLsDeleted(Details<history::URLsDeletedDetails>(details).ptr());
+ HandleURLsDeleted(
+ content::Details<history::URLsDeletedDetails>(details).ptr());
} else if (type == chrome::NOTIFICATION_HISTORY_URL_VISITED) {
- HandleURLsVisited(Details<history::URLVisitedDetails>(details).ptr());
+ HandleURLsVisited(
+ content::Details<history::URLVisitedDetails>(details).ptr());
}
}
@@ -349,13 +353,13 @@ void TypedUrlChangeProcessor::StartObserving() {
DCHECK(profile_);
notification_registrar_.Add(
this, chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
notification_registrar_.Add(
this, chrome::NOTIFICATION_HISTORY_URLS_DELETED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
notification_registrar_.Add(
this, chrome::NOTIFICATION_HISTORY_URL_VISITED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
void TypedUrlChangeProcessor::StopObserving() {
@@ -363,13 +367,13 @@ void TypedUrlChangeProcessor::StopObserving() {
DCHECK(profile_);
notification_registrar_.Remove(
this, chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
notification_registrar_.Remove(
this, chrome::NOTIFICATION_HISTORY_URLS_DELETED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
notification_registrar_.Remove(
this, chrome::NOTIFICATION_HISTORY_URL_VISITED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
} // namespace browser_sync
diff --git a/chrome/browser/sync/glue/typed_url_change_processor.h b/chrome/browser/sync/glue/typed_url_change_processor.h
index cbb9bf5..a8c3044 100644
--- a/chrome/browser/sync/glue/typed_url_change_processor.h
+++ b/chrome/browser/sync/glue/typed_url_change_processor.h
@@ -13,8 +13,8 @@
#include "base/time.h"
#include "chrome/browser/sync/glue/sync_backend_host.h"
#include "chrome/browser/sync/glue/typed_url_model_associator.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
class MessageLoop;
@@ -37,7 +37,7 @@ class UnrecoverableErrorHandler;
// applying them to the sync_api 'syncable' model, and vice versa. All
// operations and use of this class are from the UI thread.
class TypedUrlChangeProcessor : public ChangeProcessor,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
TypedUrlChangeProcessor(Profile* profile,
TypedUrlModelAssociator* model_associator,
@@ -45,11 +45,11 @@ class TypedUrlChangeProcessor : public ChangeProcessor,
UnrecoverableErrorHandler* error_handler);
virtual ~TypedUrlChangeProcessor();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
// History -> sync_api model change application.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// sync_api model -> WebDataService change application.
virtual void ApplyChangesFromSyncModel(
@@ -95,7 +95,7 @@ class TypedUrlChangeProcessor : public ChangeProcessor,
// holding a reference.
history::HistoryBackend* history_backend_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
bool observing_; // True when we should observe notifications.
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 2bfd46a..610ce0e 100644
--- a/chrome/browser/sync/glue/typed_url_data_type_controller.cc
+++ b/chrome/browser/sync/glue/typed_url_data_type_controller.cc
@@ -98,13 +98,14 @@ void TypedUrlDataTypeController::CreateSyncComponents() {
set_change_processor(sync_components.change_processor);
}
-void TypedUrlDataTypeController::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void TypedUrlDataTypeController::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
switch (type) {
case chrome::NOTIFICATION_PREF_CHANGED:
- DCHECK(*Details<std::string>(details).ptr() ==
+ DCHECK(*content::Details<std::string>(details).ptr() ==
prefs::kSavingBrowserHistoryDisabled);
if (profile()->GetPrefs()->GetBoolean(
prefs::kSavingBrowserHistoryDisabled)) {
diff --git a/chrome/browser/sync/glue/typed_url_data_type_controller.h b/chrome/browser/sync/glue/typed_url_data_type_controller.h
index ba553f66..bcfae38 100644
--- a/chrome/browser/sync/glue/typed_url_data_type_controller.h
+++ b/chrome/browser/sync/glue/typed_url_data_type_controller.h
@@ -12,12 +12,10 @@
#include "chrome/browser/sync/glue/non_frontend_data_type_controller.h"
#include "content/browser/cancelable_request.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
-class NotificationSource;
-class NotificationDetails;
class HistoryService;
namespace history {
@@ -30,7 +28,7 @@ class ControlTask;
// A class that manages the startup and shutdown of typed_url sync.
class TypedUrlDataTypeController : public NonFrontendDataTypeController,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
TypedUrlDataTypeController(
ProfileSyncFactory* profile_sync_factory,
@@ -41,10 +39,10 @@ class TypedUrlDataTypeController : public NonFrontendDataTypeController,
virtual syncable::ModelType type() const OVERRIDE;
virtual browser_sync::ModelSafeGroup model_safe_group() const OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// CancelableRequestConsumerBase implementation.
virtual void OnRequestAdded(CancelableRequestProvider* provider,
@@ -76,7 +74,7 @@ class TypedUrlDataTypeController : public NonFrontendDataTypeController,
history::HistoryBackend* backend_;
scoped_refptr<HistoryService> history_service_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
PrefChangeRegistrar pref_registrar_;
// Helper object to make sure we don't leave tasks running on the history
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 57f9065..500ec09 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -56,8 +56,8 @@
#include "chrome/common/net/gaia/gaia_constants.h"
#include "chrome/common/time_format.h"
#include "chrome/common/url_constants.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "net/base/cookie_monster.h"
#include "ui/base/l10n/l10n_util.h"
@@ -205,16 +205,16 @@ void ProfileSyncService::Initialize() {
void ProfileSyncService::RegisterAuthNotifications() {
registrar_.Add(this,
chrome::NOTIFICATION_TOKEN_AVAILABLE,
- Source<TokenService>(profile_->GetTokenService()));
+ content::Source<TokenService>(profile_->GetTokenService()));
registrar_.Add(this,
chrome::NOTIFICATION_TOKEN_LOADING_FINISHED,
- Source<TokenService>(profile_->GetTokenService()));
+ content::Source<TokenService>(profile_->GetTokenService()));
registrar_.Add(this,
chrome::NOTIFICATION_TOKEN_REQUEST_FAILED,
- Source<TokenService>(profile_->GetTokenService()));
+ content::Source<TokenService>(profile_->GetTokenService()));
registrar_.Add(this,
chrome::NOTIFICATION_GOOGLE_SIGNIN_FAILED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
void ProfileSyncService::RegisterDataTypeController(
@@ -390,12 +390,14 @@ void ProfileSyncService::Shutdown(bool sync_disabled) {
data_type_manager_->Stop();
}
- registrar_.Remove(this,
- chrome::NOTIFICATION_SYNC_CONFIGURE_START,
- Source<DataTypeManager>(data_type_manager_.get()));
- registrar_.Remove(this,
- chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
- Source<DataTypeManager>(data_type_manager_.get()));
+ registrar_.Remove(
+ this,
+ chrome::NOTIFICATION_SYNC_CONFIGURE_START,
+ content::Source<DataTypeManager>(data_type_manager_.get()));
+ registrar_.Remove(
+ this,
+ chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
+ content::Source<DataTypeManager>(data_type_manager_.get()));
data_type_manager_.reset();
}
@@ -1202,10 +1204,10 @@ void ProfileSyncService::ConfigureDataTypeManager() {
&data_type_controllers_));
registrar_.Add(this,
chrome::NOTIFICATION_SYNC_CONFIGURE_START,
- Source<DataTypeManager>(data_type_manager_.get()));
+ content::Source<DataTypeManager>(data_type_manager_.get()));
registrar_.Add(this,
chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
- Source<DataTypeManager>(data_type_manager_.get()));
+ content::Source<DataTypeManager>(data_type_manager_.get()));
// We create the migrator at the same time.
migrator_.reset(
@@ -1361,8 +1363,8 @@ void ProfileSyncService::OnSyncManagedPrefChange(bool is_sync_managed) {
}
void ProfileSyncService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_SYNC_CONFIGURE_START: {
NotifyObservers();
@@ -1371,7 +1373,7 @@ void ProfileSyncService::Observe(int type,
}
case chrome::NOTIFICATION_SYNC_CONFIGURE_DONE: {
DataTypeManager::ConfigureResult* result =
- Details<DataTypeManager::ConfigureResult>(details).ptr();
+ content::Details<DataTypeManager::ConfigureResult>(details).ptr();
DataTypeManager::ConfigureStatus status = result->status;
VLOG(1) << "PSS SYNC_CONFIGURE_DONE called with status: " << status;
@@ -1424,7 +1426,7 @@ void ProfileSyncService::Observe(int type,
}
case chrome::NOTIFICATION_GOOGLE_SIGNIN_FAILED: {
GoogleServiceAuthError error =
- *(Details<const GoogleServiceAuthError>(details).ptr());
+ *(content::Details<const GoogleServiceAuthError>(details).ptr());
UpdateAuthErrorState(error);
break;
}
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index 7cfcbbe..3aeed83 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -32,13 +32,11 @@
#include "chrome/browser/sync/sync_setup_wizard.h"
#include "chrome/browser/sync/unrecoverable_error_handler.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
-class NotificationDetails;
-class NotificationSource;
class Profile;
class ProfileSyncFactory;
class SigninManager;
@@ -105,7 +103,7 @@ struct UserShare;
class ProfileSyncService : public browser_sync::SyncFrontend,
public browser_sync::SyncPrefObserver,
public browser_sync::UnrecoverableErrorHandler,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
typedef ProfileSyncServiceObserver Observer;
typedef browser_sync::SyncBackendHost::Status Status;
@@ -403,10 +401,10 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
// SyncPrefObserver implementation.
virtual void OnSyncManagedPrefChange(bool is_sync_managed) OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Changes which data types we're going to be syncing to |preferred_types|.
// If it is running, the DataTypeManager will be instructed to reconfigure
@@ -638,7 +636,7 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
browser_sync::SyncJsController sync_js_controller_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
ScopedRunnableMethodFactory<ProfileSyncService>
scoped_runnable_method_factory_;
diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
index 7274ede..96553ed 100644
--- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
@@ -53,7 +53,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/net/gaia/gaia_constants.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "testing/gmock/include/gmock/gmock.h"
using base::Time;
@@ -938,8 +938,8 @@ TEST_F(ProfileSyncServiceAutofillTest, ProcessUserChangeAddEntry) {
changes.push_back(AutofillChange(AutofillChange::ADD, added_entry.key()));
scoped_refptr<ThreadNotifier> notifier(new ThreadNotifier(&db_thread_));
notifier->Notify(chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED,
- Source<WebDataService>(web_data_service_.get()),
- Details<AutofillChangeList>(&changes));
+ content::Source<WebDataService>(web_data_service_.get()),
+ content::Details<AutofillChangeList>(&changes));
std::vector<AutofillEntry> new_sync_entries;
std::vector<AutofillProfile> new_sync_profiles;
@@ -967,8 +967,8 @@ TEST_F(ProfileSyncServiceAutofillTest, ProcessUserChangeAddProfile) {
added_profile.guid(), &added_profile);
scoped_refptr<ThreadNotifier> notifier(new ThreadNotifier(&db_thread_));
notifier->Notify(chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
- Source<WebDataService>(web_data_service_.get()),
- Details<AutofillProfileChange>(&change));
+ content::Source<WebDataService>(web_data_service_.get()),
+ content::Details<AutofillProfileChange>(&change));
std::vector<AutofillProfile> new_sync_profiles;
ASSERT_TRUE(GetAutofillProfilesFromSyncDBUnderProfileNode(
@@ -1001,8 +1001,8 @@ TEST_F(ProfileSyncServiceAutofillTest, ProcessUserChangeUpdateEntry) {
updated_entry.key()));
scoped_refptr<ThreadNotifier> notifier(new ThreadNotifier(&db_thread_));
notifier->Notify(chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED,
- Source<WebDataService>(web_data_service_.get()),
- Details<AutofillChangeList>(&changes));
+ content::Source<WebDataService>(web_data_service_.get()),
+ content::Details<AutofillChangeList>(&changes));
std::vector<AutofillEntry> new_sync_entries;
std::vector<AutofillProfile> new_sync_profiles;
@@ -1031,8 +1031,8 @@ TEST_F(ProfileSyncServiceAutofillTest, ProcessUserChangeRemoveEntry) {
original_entry.key()));
scoped_refptr<ThreadNotifier> notifier(new ThreadNotifier(&db_thread_));
notifier->Notify(chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED,
- Source<WebDataService>(web_data_service_.get()),
- Details<AutofillChangeList>(&changes));
+ content::Source<WebDataService>(web_data_service_.get()),
+ content::Details<AutofillChangeList>(&changes));
std::vector<AutofillEntry> new_sync_entries;
std::vector<AutofillProfile> new_sync_profiles;
@@ -1069,8 +1069,8 @@ TEST_F(ProfileSyncServiceAutofillTest, ProcessUserChangeRemoveProfile) {
sync_profile.guid(), NULL);
scoped_refptr<ThreadNotifier> notifier(new ThreadNotifier(&db_thread_));
notifier->Notify(chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
- Source<WebDataService>(web_data_service_.get()),
- Details<AutofillProfileChange>(&change));
+ content::Source<WebDataService>(web_data_service_.get()),
+ content::Details<AutofillProfileChange>(&change));
std::vector<AutofillProfile> new_sync_profiles;
ASSERT_TRUE(GetAutofillProfilesFromSyncDBUnderProfileNode(
@@ -1096,8 +1096,8 @@ TEST_F(ProfileSyncServiceAutofillTest, ProcessUserChangeError) {
evil_entry.key()));
scoped_refptr<ThreadNotifier> notifier(new ThreadNotifier(&db_thread_));
notifier->Notify(chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED,
- Source<WebDataService>(web_data_service_.get()),
- Details<AutofillChangeList>(&changes));
+ content::Source<WebDataService>(web_data_service_.get()),
+ content::Details<AutofillChangeList>(&changes));
// Wait for the PPS to shut everything down and signal us.
ProfileSyncServiceObserverMock observer;
@@ -1108,8 +1108,8 @@ TEST_F(ProfileSyncServiceAutofillTest, ProcessUserChangeError) {
// Ensure future autofill notifications don't crash.
notifier->Notify(chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED,
- Source<WebDataService>(web_data_service_.get()),
- Details<AutofillChangeList>(&changes));
+ content::Source<WebDataService>(web_data_service_.get()),
+ content::Details<AutofillChangeList>(&changes));
}
// Crashy, http://crbug.com/57884
diff --git a/chrome/browser/sync/profile_sync_service_password_unittest.cc b/chrome/browser/sync/profile_sync_service_password_unittest.cc
index d7310fb..064e946 100644
--- a/chrome/browser/sync/profile_sync_service_password_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_password_unittest.cc
@@ -36,8 +36,8 @@
#include "chrome/common/pref_names.h"
#include "chrome/test/base/profile_mock.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_observer_mock.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
+#include "content/test/notification_observer_mock.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "webkit/glue/password_form.h"
@@ -303,10 +303,10 @@ class ProfileSyncServicePasswordTest : public AbstractProfileSyncServiceTest {
friend class AddPasswordEntriesTask;
scoped_refptr<ThreadNotificationService> notification_service_;
- NotificationObserverMock observer_;
+ content::NotificationObserverMock observer_;
ProfileMock profile_;
scoped_refptr<MockPasswordStore> password_store_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
class AddPasswordEntriesTask : public Task {
diff --git a/chrome/browser/sync/profile_sync_service_session_unittest.cc b/chrome/browser/sync/profile_sync_service_session_unittest.cc
index d8560e6..1ff13f6 100644
--- a/chrome/browser/sync/profile_sync_service_session_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_session_unittest.cc
@@ -39,8 +39,8 @@
#include "chrome/test/base/profile_mock.h"
#include "chrome/test/base/testing_profile.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "googleurl/src/gurl.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -149,7 +149,7 @@ void VerifySyncedSession(
class ProfileSyncServiceSessionTest
: public BrowserWithTestWindowTest,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
ProfileSyncServiceSessionTest()
: io_thread_(BrowserThread::IO),
@@ -181,8 +181,8 @@ class ProfileSyncServiceSessionTest
}
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED:
notified_of_update_ = true;
@@ -257,7 +257,7 @@ class ProfileSyncServiceSessionTest
scoped_ptr<TestProfileSyncService> sync_service_;
const gfx::Rect window_bounds_;
bool notified_of_update_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
class CreateRootTask : public Task {
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 925cd25..c55408a9 100644
--- a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
@@ -443,8 +443,8 @@ TEST_F(ProfileSyncServiceTypedUrlTest, ProcessUserChangeAdd) {
details.changed_urls.push_back(added_entry);
scoped_refptr<ThreadNotifier> notifier(new ThreadNotifier(&history_thread_));
notifier->Notify(chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED,
- Source<Profile>(&profile_),
- Details<history::URLsModifiedDetails>(&details));
+ content::Source<Profile>(&profile_),
+ content::Details<history::URLsModifiedDetails>(&details));
std::vector<history::URLRow> new_sync_entries;
GetTypedUrlsFromSyncDB(&new_sync_entries);
@@ -480,8 +480,8 @@ TEST_F(ProfileSyncServiceTypedUrlTest, ProcessUserChangeUpdate) {
details.changed_urls.push_back(updated_entry);
scoped_refptr<ThreadNotifier> notifier(new ThreadNotifier(&history_thread_));
notifier->Notify(chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED,
- Source<Profile>(&profile_),
- Details<history::URLsModifiedDetails>(&details));
+ content::Source<Profile>(&profile_),
+ content::Details<history::URLsModifiedDetails>(&details));
std::vector<history::URLRow> new_sync_entries;
GetTypedUrlsFromSyncDB(&new_sync_entries);
@@ -508,8 +508,8 @@ TEST_F(ProfileSyncServiceTypedUrlTest, ProcessUserChangeAddFromVisit) {
details.transition = content::PAGE_TRANSITION_TYPED;
scoped_refptr<ThreadNotifier> notifier(new ThreadNotifier(&history_thread_));
notifier->Notify(chrome::NOTIFICATION_HISTORY_URL_VISITED,
- Source<Profile>(&profile_),
- Details<history::URLVisitedDetails>(&details));
+ content::Source<Profile>(&profile_),
+ content::Details<history::URLVisitedDetails>(&details));
std::vector<history::URLRow> new_sync_entries;
GetTypedUrlsFromSyncDB(&new_sync_entries);
@@ -546,8 +546,8 @@ TEST_F(ProfileSyncServiceTypedUrlTest, ProcessUserChangeUpdateFromVisit) {
details.transition = content::PAGE_TRANSITION_TYPED;
scoped_refptr<ThreadNotifier> notifier(new ThreadNotifier(&history_thread_));
notifier->Notify(chrome::NOTIFICATION_HISTORY_URL_VISITED,
- Source<Profile>(&profile_),
- Details<history::URLVisitedDetails>(&details));
+ content::Source<Profile>(&profile_),
+ content::Details<history::URLVisitedDetails>(&details));
std::vector<history::URLRow> new_sync_entries;
GetTypedUrlsFromSyncDB(&new_sync_entries);
@@ -586,8 +586,8 @@ TEST_F(ProfileSyncServiceTypedUrlTest, ProcessUserIgnoreChangeUpdateFromVisit) {
details.transition = content::PAGE_TRANSITION_RELOAD;
scoped_refptr<ThreadNotifier> notifier(new ThreadNotifier(&history_thread_));
notifier->Notify(chrome::NOTIFICATION_HISTORY_URL_VISITED,
- Source<Profile>(&profile_),
- Details<history::URLVisitedDetails>(&details));
+ content::Source<Profile>(&profile_),
+ content::Details<history::URLVisitedDetails>(&details));
GetTypedUrlsFromSyncDB(&new_sync_entries);
@@ -603,8 +603,8 @@ TEST_F(ProfileSyncServiceTypedUrlTest, ProcessUserIgnoreChangeUpdateFromVisit) {
details.row = twelve_visits;
details.transition = content::PAGE_TRANSITION_TYPED;
notifier->Notify(chrome::NOTIFICATION_HISTORY_URL_VISITED,
- Source<Profile>(&profile_),
- Details<history::URLVisitedDetails>(&details));
+ content::Source<Profile>(&profile_),
+ content::Details<history::URLVisitedDetails>(&details));
GetTypedUrlsFromSyncDB(&new_sync_entries);
// Should be no changes to the sync DB from this notification.
ASSERT_EQ(1U, new_sync_entries.size());
@@ -618,8 +618,8 @@ TEST_F(ProfileSyncServiceTypedUrlTest, ProcessUserIgnoreChangeUpdateFromVisit) {
details.row = twenty_visits;
details.transition = content::PAGE_TRANSITION_TYPED;
notifier->Notify(chrome::NOTIFICATION_HISTORY_URL_VISITED,
- Source<Profile>(&profile_),
- Details<history::URLVisitedDetails>(&details));
+ content::Source<Profile>(&profile_),
+ content::Details<history::URLVisitedDetails>(&details));
GetTypedUrlsFromSyncDB(&new_sync_entries);
ASSERT_EQ(1U, new_sync_entries.size());
EXPECT_TRUE(URLsEqual(twenty_visits, new_sync_entries[0]));
@@ -652,8 +652,8 @@ TEST_F(ProfileSyncServiceTypedUrlTest, ProcessUserChangeRemove) {
changes.urls.insert(GURL("http://mine.com"));
scoped_refptr<ThreadNotifier> notifier(new ThreadNotifier(&history_thread_));
notifier->Notify(chrome::NOTIFICATION_HISTORY_URLS_DELETED,
- Source<Profile>(&profile_),
- Details<history::URLsDeletedDetails>(&changes));
+ content::Source<Profile>(&profile_),
+ content::Details<history::URLsDeletedDetails>(&changes));
std::vector<history::URLRow> new_sync_entries;
GetTypedUrlsFromSyncDB(&new_sync_entries);
@@ -687,8 +687,8 @@ TEST_F(ProfileSyncServiceTypedUrlTest, ProcessUserChangeRemoveAll) {
changes.all_history = true;
scoped_refptr<ThreadNotifier> notifier(new ThreadNotifier(&history_thread_));
notifier->Notify(chrome::NOTIFICATION_HISTORY_URLS_DELETED,
- Source<Profile>(&profile_),
- Details<history::URLsDeletedDetails>(&changes));
+ content::Source<Profile>(&profile_),
+ content::Details<history::URLsDeletedDetails>(&changes));
std::vector<history::URLRow> new_sync_entries;
GetTypedUrlsFromSyncDB(&new_sync_entries);
diff --git a/chrome/browser/sync/profile_sync_test_util.cc b/chrome/browser/sync/profile_sync_test_util.cc
index 26c89a4..c37680c 100644
--- a/chrome/browser/sync/profile_sync_test_util.cc
+++ b/chrome/browser/sync/profile_sync_test_util.cc
@@ -50,13 +50,13 @@ ThreadNotifier::ThreadNotifier(base::Thread* notify_thread)
notify_thread_(notify_thread) {}
void ThreadNotifier::Notify(int type,
- const NotificationDetails& details) {
+ const content::NotificationDetails& details) {
Notify(type, NotificationService::AllSources(), details);
}
void ThreadNotifier::Notify(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
notify_thread_->message_loop()->PostTask(
FROM_HERE,
@@ -71,8 +71,8 @@ void ThreadNotifier::Notify(int type,
ThreadNotifier::~ThreadNotifier() {}
void ThreadNotifier::NotifyTask(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
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 3da28bc..8aaeed3 100644
--- a/chrome/browser/sync/profile_sync_test_util.h
+++ b/chrome/browser/sync/profile_sync_test_util.h
@@ -15,7 +15,7 @@
#include "chrome/browser/sync/profile_sync_service_observer.h"
#include "content/browser/browser_thread.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -67,19 +67,19 @@ class ThreadNotifier : // NOLINT
public:
explicit ThreadNotifier(base::Thread* notify_thread);
- void Notify(int type, const NotificationDetails& details);
+ void Notify(int type, const content::NotificationDetails& details);
void Notify(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
friend class base::RefCountedThreadSafe<ThreadNotifier>;
virtual ~ThreadNotifier();
void NotifyTask(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
base::WaitableEvent done_event_;
base::Thread* notify_thread_;
diff --git a/chrome/browser/sync/signin_manager.cc b/chrome/browser/sync/signin_manager.cc
index 9932d54..05adf8b 100644
--- a/chrome/browser/sync/signin_manager.cc
+++ b/chrome/browser/sync/signin_manager.cc
@@ -53,7 +53,7 @@ bool SigninManager::IsInitialized() const {
void SigninManager::CleanupNotificationRegistration() {
#if !defined(OS_CHROMEOS)
- Source<TokenService> token_service(profile_->GetTokenService());
+ content::Source<TokenService> token_service(profile_->GetTokenService());
if (registrar_.IsRegistered(this,
chrome::NOTIFICATION_TOKEN_AVAILABLE,
token_service)) {
@@ -139,7 +139,7 @@ void SigninManager::StartSignIn(const std::string& username,
#if !defined(OS_CHROMEOS)
registrar_.Add(this,
chrome::NOTIFICATION_TOKEN_AVAILABLE,
- Source<TokenService>(profile_->GetTokenService()));
+ content::Source<TokenService>(profile_->GetTokenService()));
#endif
}
@@ -200,8 +200,8 @@ void SigninManager::OnGetUserInfoSuccess(const std::string& key,
GoogleServiceSigninSuccessDetails details(username_, password_);
NotificationService::current()->Notify(
chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL,
- Source<Profile>(profile_),
- Details<const GoogleServiceSigninSuccessDetails>(&details));
+ content::Source<Profile>(profile_),
+ content::Details<const GoogleServiceSigninSuccessDetails>(&details));
password_.clear(); // Don't need it anymore.
@@ -237,8 +237,8 @@ void SigninManager::OnClientLoginFailure(const GoogleServiceAuthError& error) {
DCHECK(!browser_sync::IsUsingOAuth());
NotificationService::current()->Notify(
chrome::NOTIFICATION_GOOGLE_SIGNIN_FAILED,
- Source<Profile>(profile_),
- Details<const GoogleServiceAuthError>(&error));
+ content::Source<Profile>(profile_),
+ content::Details<const GoogleServiceAuthError>(&error));
// We don't sign-out if the password was valid and we're just dealing with
// a second factor error, and we don't sign out if we're dealing with
@@ -304,8 +304,8 @@ void SigninManager::OnUserInfoSuccess(const std::string& email) {
GoogleServiceSigninSuccessDetails details(oauth_username_, "");
NotificationService::current()->Notify(
chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL,
- Source<Profile>(profile_),
- Details<const GoogleServiceSigninSuccessDetails>(&details));
+ content::Source<Profile>(profile_),
+ content::Details<const GoogleServiceSigninSuccessDetails>(&details));
DCHECK(token_service->HasOAuthCredentials());
token_service->StartFetchingOAuthTokens();
@@ -317,12 +317,12 @@ void SigninManager::OnUserInfoFailure(const GoogleServiceAuthError& error) {
}
void SigninManager::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
#if !defined(OS_CHROMEOS)
DCHECK(type == chrome::NOTIFICATION_TOKEN_AVAILABLE);
TokenService::TokenAvailableDetails* tok_details =
- Details<TokenService::TokenAvailableDetails>(details).ptr();
+ content::Details<TokenService::TokenAvailableDetails>(details).ptr();
// If a GAIA service token has become available, use it to pre-login the
// user to other services that depend on GAIA credentials.
diff --git a/chrome/browser/sync/signin_manager.h b/chrome/browser/sync/signin_manager.h
index e591bdf..3a34f45 100644
--- a/chrome/browser/sync/signin_manager.h
+++ b/chrome/browser/sync/signin_manager.h
@@ -18,8 +18,8 @@
#include "chrome/browser/net/gaia/gaia_oauth_fetcher.h"
#include "chrome/common/net/gaia/gaia_auth_consumer.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class GaiaAuthFetcher;
class Profile;
@@ -39,7 +39,7 @@ struct GoogleServiceSigninSuccessDetails {
class SigninManager : public GaiaAuthConsumer,
public GaiaOAuthConsumer,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
SigninManager();
virtual ~SigninManager();
@@ -107,10 +107,10 @@ class SigninManager : public GaiaAuthConsumer,
virtual void OnUserInfoSuccess(const std::string& email) OVERRIDE;
virtual void OnUserInfoFailure(const GoogleServiceAuthError& error) OVERRIDE;
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
void PrepareForSignin();
@@ -140,7 +140,7 @@ class SigninManager : public GaiaAuthConsumer,
scoped_ptr<GaiaOAuthFetcher> oauth_login_;
// Register for notifications from the TokenService.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(SigninManager);
};
diff --git a/chrome/browser/sync/signin_manager_unittest.cc b/chrome/browser/sync/signin_manager_unittest.cc
index 26cf2ae..f8a0cbd 100644
--- a/chrome/browser/sync/signin_manager_unittest.cc
+++ b/chrome/browser/sync/signin_manager_unittest.cc
@@ -26,9 +26,9 @@ class SigninManagerTest : public TokenServiceTestHarness {
manager_.reset(new SigninManager());
google_login_success_.ListenFor(
chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL,
- Source<Profile>(profile_.get()));
+ content::Source<Profile>(profile_.get()));
google_login_failure_.ListenFor(chrome::NOTIFICATION_GOOGLE_SIGNIN_FAILED,
- Source<Profile>(profile_.get()));
+ content::Source<Profile>(profile_.get()));
originally_using_oauth_ = browser_sync::IsUsingOAuth();
}
diff --git a/chrome/browser/sync/sync_prefs.cc b/chrome/browser/sync/sync_prefs.cc
index 4a3dcd4..18d7456 100644
--- a/chrome/browser/sync/sync_prefs.cc
+++ b/chrome/browser/sync/sync_prefs.cc
@@ -11,8 +11,8 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
namespace browser_sync {
@@ -291,14 +291,14 @@ void SyncPrefs::AcknowledgeSyncedTypes(
}
void SyncPrefs::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(non_thread_safe_.CalledOnValidThread());
- DCHECK(Source<PrefService>(pref_service_) == source);
+ DCHECK(content::Source<PrefService>(pref_service_) == source);
switch (type) {
case chrome::NOTIFICATION_PREF_CHANGED: {
const std::string* pref_name =
- Details<const std::string>(details).ptr();
+ content::Details<const std::string>(details).ptr();
if (*pref_name == prefs::kSyncManaged) {
FOR_EACH_OBSERVER(SyncPrefObserver, sync_pref_observers_,
OnSyncManagedPrefChange(*pref_sync_managed_));
diff --git a/chrome/browser/sync/sync_prefs.h b/chrome/browser/sync/sync_prefs.h
index 052304a..38b05c3 100644
--- a/chrome/browser/sync/sync_prefs.h
+++ b/chrome/browser/sync/sync_prefs.h
@@ -15,7 +15,7 @@
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/sync/notifier/invalidation_version_tracker.h"
#include "chrome/browser/sync/syncable/model_type.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
class PrefService;
@@ -46,7 +46,7 @@ class SyncPrefObserver {
// two_client_preferences_sync_test.cc
class SyncPrefs : public base::SupportsWeakPtr<SyncPrefs>,
public sync_notifier::InvalidationVersionTracker,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// |pref_service| may be NULL (for unit tests), but in that case no
// setter methods should be called. Does not take ownership of
@@ -105,10 +105,10 @@ class SyncPrefs : public base::SupportsWeakPtr<SyncPrefs>,
// Merges the given set of types with the set of acknowledged types.
void AcknowledgeSyncedTypes(const syncable::ModelTypeSet& types);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// For testing.
diff --git a/chrome/browser/sync/test_profile_sync_service.cc b/chrome/browser/sync/test_profile_sync_service.cc
index 586cb0d..dbd7bbd 100644
--- a/chrome/browser/sync/test_profile_sync_service.cc
+++ b/chrome/browser/sync/test_profile_sync_service.cc
@@ -215,9 +215,10 @@ void TestProfileSyncService::OnBackendInitialized(
}
}
-void TestProfileSyncService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void TestProfileSyncService::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
ProfileSyncService::Observe(type, source, details);
if (type == chrome::NOTIFICATION_SYNC_CONFIGURE_DONE &&
!synchronous_sync_configuration_) {
diff --git a/chrome/browser/sync/test_profile_sync_service.h b/chrome/browser/sync/test_profile_sync_service.h
index 406c9cc..246df47 100644
--- a/chrome/browser/sync/test_profile_sync_service.h
+++ b/chrome/browser/sync/test_profile_sync_service.h
@@ -82,8 +82,8 @@ class TestProfileSyncService : public ProfileSyncService {
bool success) OVERRIDE;
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// If this is called, configuring data types will require a syncer
// nudge.
diff --git a/chrome/browser/sync/util/extensions_activity_monitor.cc b/chrome/browser/sync/util/extensions_activity_monitor.cc
index d00a0b4..6a7cdcf 100644
--- a/chrome/browser/sync/util/extensions_activity_monitor.cc
+++ b/chrome/browser/sync/util/extensions_activity_monitor.cc
@@ -20,7 +20,7 @@ namespace {
class RegistrationTask : public Task {
public:
RegistrationTask(ExtensionsActivityMonitor* monitor,
- NotificationRegistrar* registrar)
+ content::NotificationRegistrar* registrar)
: monitor_(monitor), registrar_(registrar) {}
virtual ~RegistrationTask() {}
@@ -39,7 +39,7 @@ class RegistrationTask : public Task {
private:
ExtensionsActivityMonitor* monitor_;
- NotificationRegistrar* registrar_;
+ content::NotificationRegistrar* registrar_;
DISALLOW_COPY_AND_ASSIGN(RegistrationTask);
};
} // namespace
@@ -80,13 +80,15 @@ void ExtensionsActivityMonitor::PutRecords(const Records& records) {
}
}
-void ExtensionsActivityMonitor::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ExtensionsActivityMonitor::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
base::AutoLock lock(records_lock_);
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- const Extension* extension = Source<const Extension>(source).ptr();
- const BookmarksFunction* f = Details<const BookmarksFunction>(details).ptr();
+ const Extension* extension = content::Source<const Extension>(source).ptr();
+ const BookmarksFunction* f =
+ content::Details<const BookmarksFunction>(details).ptr();
if (f->name() == "bookmarks.update" ||
f->name() == "bookmarks.move" ||
f->name() == "bookmarks.create" ||
diff --git a/chrome/browser/sync/util/extensions_activity_monitor.h b/chrome/browser/sync/util/extensions_activity_monitor.h
index 9166b70..0b76ce1 100644
--- a/chrome/browser/sync/util/extensions_activity_monitor.h
+++ b/chrome/browser/sync/util/extensions_activity_monitor.h
@@ -10,8 +10,8 @@
#include "base/message_loop.h"
#include "base/synchronization/lock.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
namespace browser_sync {
@@ -26,7 +26,7 @@ namespace browser_sync {
//
// Consider using MessageLoop::DeleteSoon. (Yes, this means if you allocate
// an ExtensionsActivityMonitor on a thread other than UI, you must 'new' it).
-class ExtensionsActivityMonitor : public NotificationObserver {
+class ExtensionsActivityMonitor : public content::NotificationObserver {
public:
// A data record of activity performed by extension |extension_id|.
struct Record {
@@ -56,16 +56,16 @@ class ExtensionsActivityMonitor : public NotificationObserver {
// This is done mutually exclusively w.r.t the methods of this class.
void PutRecords(const Records& records);
- // NotificationObserver implementation. Called on |ui_loop_|.
+ // content::NotificationObserver implementation. Called on |ui_loop_|.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
Records records_;
mutable base::Lock records_lock_;
// Used only from UI loop.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
} // namespace browser_sync
diff --git a/chrome/browser/sync/util/extensions_activity_monitor_unittest.cc b/chrome/browser/sync/util/extensions_activity_monitor_unittest.cc
index 3631a77..7213af0 100644
--- a/chrome/browser/sync/util/extensions_activity_monitor_unittest.cc
+++ b/chrome/browser/sync/util/extensions_activity_monitor_unittest.cc
@@ -48,8 +48,8 @@ class BookmarkAPIEventTask : public Task {
for (size_t i = 0; i < repeats_; i++) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_BOOKMARKS_API_INVOKED,
- Source<Extension>(extension_.get()),
- Details<const BookmarksFunction>(function_.get()));
+ content::Source<Extension>(extension_.get()),
+ content::Details<const BookmarksFunction>(function_.get()));
}
done_->Signal();
}
diff --git a/chrome/browser/tab_contents/background_contents.cc b/chrome/browser/tab_contents/background_contents.cc
index 0060799..191c97a 100644
--- a/chrome/browser/tab_contents/background_contents.cc
+++ b/chrome/browser/tab_contents/background_contents.cc
@@ -41,7 +41,7 @@ BackgroundContents::BackgroundContents(SiteInstance* site_instance,
// as well (should only be called for OTR profiles, as we should receive
// APP_TERMINATING before non-OTR profiles are destroyed).
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
}
// Exposed to allow creating mocks.
@@ -57,8 +57,8 @@ BackgroundContents::~BackgroundContents() {
render_view_host_->process()->browser_context());
NotificationService::current()->Notify(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED,
- Source<Profile>(profile),
- Details<BackgroundContents>(this));
+ content::Source<Profile>(profile),
+ content::Details<BackgroundContents>(this));
render_view_host_->Shutdown(); // deletes render_view_host
}
@@ -98,8 +98,8 @@ void BackgroundContents::DidNavigate(
render_view_host->process()->browser_context());
NotificationService::current()->Notify(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED,
- Source<Profile>(profile),
- Details<BackgroundContents>(this));
+ content::Source<Profile>(profile),
+ content::Details<BackgroundContents>(this));
}
void BackgroundContents::RunJavaScriptMessage(
@@ -120,8 +120,8 @@ void BackgroundContents::RunJavaScriptMessage(
}
void BackgroundContents::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
// TODO(rafaelw): Implement pagegroup ref-counting so that non-persistent
// background pages are closed when the last referencing frame is closed.
switch (type) {
@@ -154,8 +154,8 @@ void BackgroundContents::Close(RenderViewHost* render_view_host) {
render_view_host->process()->browser_context());
NotificationService::current()->Notify(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_CLOSED,
- Source<Profile>(profile),
- Details<BackgroundContents>(this));
+ content::Source<Profile>(profile),
+ content::Details<BackgroundContents>(this));
delete this;
}
@@ -166,8 +166,8 @@ void BackgroundContents::RenderViewGone(RenderViewHost* rvh,
Profile::FromBrowserContext(rvh->process()->browser_context());
NotificationService::current()->Notify(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_TERMINATED,
- Source<Profile>(profile),
- Details<BackgroundContents>(this));
+ content::Source<Profile>(profile),
+ content::Details<BackgroundContents>(this));
// Our RenderView went away, so we should go away also, so killing the process
// via the TaskManager doesn't permanently leave a BackgroundContents hanging
diff --git a/chrome/browser/tab_contents/background_contents.h b/chrome/browser/tab_contents/background_contents.h
index e41199c..e0e091b 100644
--- a/chrome/browser/tab_contents/background_contents.h
+++ b/chrome/browser/tab_contents/background_contents.h
@@ -13,9 +13,9 @@
#include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
#include "content/browser/javascript_dialogs.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
#include "content/common/window_container_type.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "webkit/glue/window_open_disposition.h"
class TabContents;
@@ -32,7 +32,7 @@ class Rect;
// it is never allowed to navigate across a SiteInstance boundary.
class BackgroundContents : public RenderViewHostDelegate,
public RenderViewHostDelegate::View,
- public NotificationObserver,
+ public content::NotificationObserver,
public content::JavaScriptDialogDelegate {
public:
class Delegate {
@@ -109,10 +109,10 @@ class BackgroundContents : public RenderViewHostDelegate,
virtual void GotFocus() {}
virtual void TakeFocus(bool reverse) {}
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Overridden from JavaScriptDialogDelegate:
virtual void OnDialogClosed(IPC::Message* reply_msg,
@@ -144,7 +144,7 @@ class BackgroundContents : public RenderViewHostDelegate,
// The URL being hosted.
GURL url_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(BackgroundContents);
};
diff --git a/chrome/browser/tab_contents/chrome_interstitial_page.cc b/chrome/browser/tab_contents/chrome_interstitial_page.cc
index a089432..49fad1d 100644
--- a/chrome/browser/tab_contents/chrome_interstitial_page.cc
+++ b/chrome/browser/tab_contents/chrome_interstitial_page.cc
@@ -10,7 +10,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
ChromeInterstitialPage::ChromeInterstitialPage(TabContents* tab,
bool new_navigation,
@@ -30,15 +30,16 @@ void ChromeInterstitialPage::Show() {
notification_registrar_.Add(
this, chrome::NOTIFICATION_DOM_OPERATION_RESPONSE,
- Source<RenderViewHost>(render_view_host()));
+ content::Source<RenderViewHost>(render_view_host()));
}
-void ChromeInterstitialPage::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ChromeInterstitialPage::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (chrome::NOTIFICATION_DOM_OPERATION_RESPONSE == type) {
if (enabled()) {
- Details<DomOperationNotificationDetails> dom_op_details(details);
+ content::Details<DomOperationNotificationDetails> dom_op_details(details);
CommandReceived(dom_op_details->json());
}
return;
diff --git a/chrome/browser/tab_contents/chrome_interstitial_page.h b/chrome/browser/tab_contents/chrome_interstitial_page.h
index 6c712f6..4fd3e54 100644
--- a/chrome/browser/tab_contents/chrome_interstitial_page.h
+++ b/chrome/browser/tab_contents/chrome_interstitial_page.h
@@ -10,7 +10,7 @@
#include <string>
#include "content/browser/tab_contents/interstitial_page.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "googleurl/src/gurl.h"
class TabContents;
@@ -28,10 +28,10 @@ class ChromeInterstitialPage : public InterstitialPage {
virtual void Show();
protected:
- // NotificationObserver method:
+ // content::NotificationObserver method:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Invoked when the page sent a command through DOMAutomation.
virtual void CommandReceived(const std::string& command) {}
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index e21ff5c..a5e1351 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -1937,9 +1937,9 @@ void RenderViewContextMenu::OpenURL(
details.target_tab_contents = new_contents;
NotificationService::current()->Notify(
content::NOTIFICATION_RETARGETING,
- Source<content::BrowserContext>(
+ content::Source<content::BrowserContext>(
source_tab_contents_->browser_context()),
- Details<content::RetargetingDetails>(&details));
+ content::Details<content::RetargetingDetails>(&details));
}
}
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 0e0ae36..baf54eb 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -67,10 +67,10 @@ RenderViewHostDelegateViewHelper::~RenderViewHostDelegateViewHelper() {}
void RenderViewHostDelegateViewHelper::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(type, content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED);
- RenderWidgetHost* host = Source<RenderWidgetHost>(source).ptr();
+ RenderWidgetHost* host = content::Source<RenderWidgetHost>(source).ptr();
for (PendingWidgetViews::iterator i = pending_widget_views_.begin();
i != pending_widget_views_.end(); ++i) {
if (host->view() == i->second) {
@@ -270,16 +270,17 @@ TabContents* RenderViewHostDelegateViewHelper::CreateNewWindowFromTabContents(
details.target_tab_contents = new_contents;
NotificationService::current()->Notify(
content::NOTIFICATION_RETARGETING,
- Source<content::BrowserContext>(tab_contents->browser_context()),
- Details<content::RetargetingDetails>(&details));
+ content::Source<content::BrowserContext>(
+ tab_contents->browser_context()),
+ content::Details<content::RetargetingDetails>(&details));
if (tab_contents->delegate())
tab_contents->delegate()->TabContentsCreated(new_contents);
} else {
NotificationService::current()->Notify(
content::NOTIFICATION_CREATING_NEW_WINDOW_CANCELLED,
- Source<TabContents>(tab_contents),
- Details<const ViewHostMsg_CreateWindow_Params>(&params));
+ content::Source<TabContents>(tab_contents),
+ content::Details<const ViewHostMsg_CreateWindow_Params>(&params));
}
return new_contents;
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.h b/chrome/browser/tab_contents/render_view_host_delegate_helper.h
index c2508f6..cc84643 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.h
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.h
@@ -10,9 +10,9 @@
#include "base/basictypes.h"
#include "content/browser/webui/web_ui.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
#include "content/common/window_container_type.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h"
#include "ui/gfx/rect.h"
#include "webkit/glue/webpreferences.h"
@@ -35,7 +35,7 @@ class BrowserContext;
// Provides helper methods that provide common implementations of some
// RenderViewHostDelegate::View methods.
-class RenderViewHostDelegateViewHelper : public NotificationObserver {
+class RenderViewHostDelegateViewHelper : public content::NotificationObserver {
public:
RenderViewHostDelegateViewHelper();
virtual ~RenderViewHostDelegateViewHelper();
@@ -92,10 +92,10 @@ class RenderViewHostDelegateViewHelper : public NotificationObserver {
int route_id);
private:
- // NotificationObserver implementation
+ // content::NotificationObserver implementation
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
BackgroundContents* MaybeCreateBackgroundContents(
int route_id,
@@ -115,7 +115,7 @@ class RenderViewHostDelegateViewHelper : public NotificationObserver {
PendingWidgetViews pending_widget_views_;
// Registers and unregisters us for notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(RenderViewHostDelegateViewHelper);
};
diff --git a/chrome/browser/tab_contents/tab_contents_ssl_helper.cc b/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
index 7ad8be3..51fae9a 100644
--- a/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
+++ b/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
@@ -25,8 +25,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "content/browser/ssl/ssl_client_auth_handler.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources_standard.h"
#include "net/base/net_errors.h"
@@ -124,7 +124,8 @@ bool SSLCertAddedInfoBarDelegate::Accept() {
// TabContentsSSLHelper::SSLAddCertData ---------------------------------------
-class TabContentsSSLHelper::SSLAddCertData : public NotificationObserver {
+class TabContentsSSLHelper::SSLAddCertData
+ : public content::NotificationObserver {
public:
explicit SSLAddCertData(TabContentsWrapper* tab_contents);
virtual ~SSLAddCertData();
@@ -138,14 +139,14 @@ class TabContentsSSLHelper::SSLAddCertData : public NotificationObserver {
void ShowErrorInfoBar(const string16& message);
private:
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
TabContentsWrapper* tab_contents_;
InfoBarDelegate* infobar_delegate_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(SSLAddCertData);
};
@@ -154,7 +155,7 @@ TabContentsSSLHelper::SSLAddCertData::SSLAddCertData(
TabContentsWrapper* tab_contents)
: tab_contents_(tab_contents),
infobar_delegate_(NULL) {
- Source<InfoBarTabHelper> source(tab_contents_->infobar_tab_helper());
+ content::Source<InfoBarTabHelper> source(tab_contents_->infobar_tab_helper());
registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
source);
registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REPLACED,
@@ -182,14 +183,14 @@ void TabContentsSSLHelper::SSLAddCertData::ShowErrorInfoBar(
void TabContentsSSLHelper::SSLAddCertData::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED ||
type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REPLACED);
if (infobar_delegate_ ==
((type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED) ?
- Details<InfoBarRemovedDetails>(details)->first :
- Details<InfoBarReplacedDetails>(details)->first))
+ content::Details<InfoBarRemovedDetails>(details)->first :
+ content::Details<InfoBarReplacedDetails>(details)->first))
infobar_delegate_ = NULL;
}
diff --git a/chrome/browser/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/tab_contents/tab_contents_view_gtk.cc
index 00a7c7b..4cdb997 100644
--- a/chrome/browser/tab_contents/tab_contents_view_gtk.cc
+++ b/chrome/browser/tab_contents/tab_contents_view_gtk.cc
@@ -27,7 +27,7 @@
#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/web_drag_dest_gtk.h"
#include "content/browser/tab_contents/web_drag_source_gtk.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "ui/base/gtk/gtk_expanded_container.h"
#include "ui/base/gtk/gtk_floating_container.h"
@@ -95,7 +95,7 @@ TabContentsViewGtk::TabContentsViewGtk(TabContents* tab_contents)
gtk_widget_show(expanded_);
gtk_widget_show(floating_.get());
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
drag_source_.reset(new TabContentsDragSource(tab_contents));
}
@@ -303,8 +303,8 @@ void TabContentsViewGtk::TakeFocus(bool reverse) {
}
void TabContentsViewGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_TAB_CONTENTS_CONNECTED: {
// No need to remove the SadTabGtk's widget from the container since
diff --git a/chrome/browser/tab_contents/tab_contents_view_gtk.h b/chrome/browser/tab_contents/tab_contents_view_gtk.h
index e360fa6..1d9a9d9 100644
--- a/chrome/browser/tab_contents/tab_contents_view_gtk.h
+++ b/chrome/browser/tab_contents/tab_contents_view_gtk.h
@@ -14,8 +14,8 @@
#include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
#include "chrome/browser/ui/gtk/focus_store_gtk.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/gtk/owned_widget_gtk.h"
@@ -30,7 +30,7 @@ class WebDragDestGtk;
}
class TabContentsViewGtk : public TabContentsView,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// The corresponding TabContents is passed in the constructor, and manages our
// lifetime. This doesn't need to be the case, but is this way currently
@@ -99,11 +99,11 @@ class TabContentsViewGtk : public TabContentsView,
virtual void GotFocus();
virtual void TakeFocus(bool reverse);
- // NotificationObserver implementation ---------------------------------------
+ // content::NotificationObserver implementation ------------------------------
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// Insert the given widget into the content area. Should only be used for
@@ -149,7 +149,7 @@ class TabContentsViewGtk : public TabContentsView,
scoped_ptr<RenderViewContextMenuGtk> context_menu_;
// Used to get notifications about renderers coming and going.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
scoped_ptr<SadTabGtk> sad_tab_;
diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.h b/chrome/browser/tab_contents/tab_contents_view_mac.h
index c2aeadb..4804d49 100644
--- a/chrome/browser/tab_contents/tab_contents_view_mac.h
+++ b/chrome/browser/tab_contents/tab_contents_view_mac.h
@@ -17,8 +17,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/cocoa/base_view.h"
#include "ui/gfx/size.h"
@@ -47,7 +47,7 @@ class Point;
// Mac-specific implementation of the TabContentsView. It owns an NSView that
// contains all of the contents of the tab and associated child views.
class TabContentsViewMac : public TabContentsView,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// The corresponding TabContents is passed in the constructor, and manages our
// lifetime. This doesn't need to be the case, but is this way currently
@@ -106,11 +106,11 @@ class TabContentsViewMac : public TabContentsView,
virtual void GotFocus();
virtual void TakeFocus(bool reverse);
- // NotificationObserver implementation ---------------------------------------
+ // content::NotificationObserver implementation ------------------------------
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// A helper method for closing the tab in the
// CloseTabAfterEventTracking() implementation.
@@ -134,7 +134,7 @@ class TabContentsViewMac : public TabContentsView,
scoped_nsobject<FocusTracker> focus_tracker_;
// Used to get notifications about renderers coming and going.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Used to render the sad tab. This will be non-NULL only when the sad tab is
// visible.
diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.mm b/chrome/browser/tab_contents/tab_contents_view_mac.mm
index 72f4634..f0dedc8 100644
--- a/chrome/browser/tab_contents/tab_contents_view_mac.mm
+++ b/chrome/browser/tab_contents/tab_contents_view_mac.mm
@@ -24,9 +24,9 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
#import "content/common/chrome_application_mac.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.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"
#include "skia/ext/skia_utils_mac.h"
#import "third_party/mozilla/NSPasteboard+Utils.h"
@@ -71,7 +71,7 @@ TabContentsViewMac::TabContentsViewMac(TabContents* tab_contents)
: tab_contents_(tab_contents),
preferred_width_(0) {
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
}
TabContentsViewMac::~TabContentsViewMac() {
@@ -400,8 +400,8 @@ void TabContentsViewMac::CloseTab() {
}
void TabContentsViewMac::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_TAB_CONTENTS_CONNECTED: {
sad_tab_.reset();
diff --git a/chrome/browser/tab_contents/thumbnail_generator.cc b/chrome/browser/tab_contents/thumbnail_generator.cc
index d1bb19a..4e23ac6 100644
--- a/chrome/browser/tab_contents/thumbnail_generator.cc
+++ b/chrome/browser/tab_contents/thumbnail_generator.cc
@@ -157,15 +157,16 @@ void ThumbnailGenerator::StartThumbnailing(TabContents* tab_contents) {
// for RenderViewHosts that aren't in tabs, or RenderWidgetHosts that
// aren't views like select popups.
registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DISCONNECTED,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
}
}
void ThumbnailGenerator::MonitorRenderer(RenderWidgetHost* renderer,
bool monitor) {
- Source<RenderWidgetHost> renderer_source = Source<RenderWidgetHost>(renderer);
+ content::Source<RenderWidgetHost> renderer_source =
+ content::Source<RenderWidgetHost>(renderer);
bool currently_monitored =
registrar_.IsRegistered(
this,
@@ -325,33 +326,35 @@ void ThumbnailGenerator::WidgetDidReceivePaintAtSizeAck(
}
void ThumbnailGenerator::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB: {
// Install our observer for all new RVHs.
- RenderViewHost* renderer = Details<RenderViewHost>(details).ptr();
+ RenderViewHost* renderer =
+ content::Details<RenderViewHost>(details).ptr();
MonitorRenderer(renderer, true);
break;
}
case content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED:
- if (!*Details<bool>(details).ptr())
- WidgetHidden(Source<RenderWidgetHost>(source).ptr());
+ if (!*content::Details<bool>(details).ptr())
+ WidgetHidden(content::Source<RenderWidgetHost>(source).ptr());
break;
case content::NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK: {
RenderWidgetHost::PaintAtSizeAckDetails* size_ack_details =
- Details<RenderWidgetHost::PaintAtSizeAckDetails>(details).ptr();
+ content::Details<RenderWidgetHost::PaintAtSizeAckDetails>(details).
+ ptr();
WidgetDidReceivePaintAtSizeAck(
- Source<RenderWidgetHost>(source).ptr(),
+ content::Source<RenderWidgetHost>(source).ptr(),
size_ack_details->tag,
size_ack_details->size);
break;
}
case content::NOTIFICATION_TAB_CONTENTS_DISCONNECTED:
- TabContentsDisconnected(Source<TabContents>(source).ptr());
+ TabContentsDisconnected(content::Source<TabContents>(source).ptr());
break;
default:
diff --git a/chrome/browser/tab_contents/thumbnail_generator.h b/chrome/browser/tab_contents/thumbnail_generator.h
index 8329f29..c05f670 100644
--- a/chrome/browser/tab_contents/thumbnail_generator.h
+++ b/chrome/browser/tab_contents/thumbnail_generator.h
@@ -16,8 +16,8 @@
#include "base/timer.h"
#include "content/browser/renderer_host/backing_store.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class GURL;
class Profile;
@@ -29,7 +29,7 @@ namespace history {
class TopSites;
}
-class ThumbnailGenerator : public NotificationObserver,
+class ThumbnailGenerator : public content::NotificationObserver,
public TabContentsObserver {
public:
typedef base::Callback<void(const SkBitmap&)> ThumbnailReadyCallback;
@@ -133,10 +133,10 @@ class ThumbnailGenerator : public NotificationObserver,
int tag,
const gfx::Size& size);
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Indicates that the given widget has changed is visibility.
void WidgetHidden(RenderWidgetHost* widget);
@@ -145,7 +145,7 @@ class ThumbnailGenerator : public NotificationObserver,
// through being closed, or because the renderer is no longer there).
void TabContentsDisconnected(TabContents* contents);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Map of callback objects by sequence number.
struct AsyncRequestInfo;
diff --git a/chrome/browser/tab_contents/thumbnail_generator_unittest.cc b/chrome/browser/tab_contents/thumbnail_generator_unittest.cc
index dedc586..7843916 100644
--- a/chrome/browser/tab_contents/thumbnail_generator_unittest.cc
+++ b/chrome/browser/tab_contents/thumbnail_generator_unittest.cc
@@ -70,8 +70,8 @@ class ThumbnailGeneratorTest : public testing::Test {
// will want a RenderWidget, so it works out OK.
NotificationService::current()->Notify(
content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB,
- Source<RenderViewHostManager>(NULL),
- Details<RenderViewHost>(reinterpret_cast<RenderViewHost*>(
+ content::Source<RenderViewHostManager>(NULL),
+ content::Details<RenderViewHost>(reinterpret_cast<RenderViewHost*>(
widget_.get())));
transport_dib_.reset(TransportDIB::Create(kBitmapWidth * kBitmapHeight * 4,
diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc
index bb3f22c..70d55de 100644
--- a/chrome/browser/tab_contents/web_contents_unittest.cc
+++ b/chrome/browser/tab_contents/web_contents_unittest.cc
@@ -23,8 +23,8 @@
#include "content/browser/tab_contents/test_tab_contents.h"
#include "content/common/content_constants.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/common/bindings_policy.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/message_box_flags.h"
@@ -97,8 +97,8 @@ class TestInterstitialPage : public ChromeInterstitialPage {
void TestDomOperationResponse(const std::string& json_string) {
DomOperationNotificationDetails details(json_string, 1);
Observe(chrome::NOTIFICATION_DOM_OPERATION_RESPONSE,
- Source<RenderViewHost>(render_view_host()),
- Details<DomOperationNotificationDetails>(&details));
+ content::Source<RenderViewHost>(render_view_host()),
+ content::Details<DomOperationNotificationDetails>(&details));
}
void TestDidNavigate(int page_id, const GURL& url) {
diff --git a/chrome/browser/tab_contents/web_drag_source_win.cc b/chrome/browser/tab_contents/web_drag_source_win.cc
index e884894..d38adb7 100644
--- a/chrome/browser/tab_contents/web_drag_source_win.cc
+++ b/chrome/browser/tab_contents/web_drag_source_win.cc
@@ -9,7 +9,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/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
using WebKit::WebDragOperationNone;
@@ -37,9 +37,9 @@ WebDragSource::WebDragSource(gfx::NativeWindow source_wnd,
render_view_host_(tab_contents->render_view_host()),
effect_(DROPEFFECT_NONE) {
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_SWAPPED,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DISCONNECTED,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
}
WebDragSource::~WebDragSource() {
@@ -108,7 +108,8 @@ void WebDragSource::OnDragSourceMove() {
}
void WebDragSource::Observe(int type,
- const NotificationSource& source, const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (content::NOTIFICATION_TAB_CONTENTS_SWAPPED == type) {
// When the tab contents get swapped, our render view host goes away.
// That's OK, we can continue the drag, we just can't send messages back to
diff --git a/chrome/browser/tab_contents/web_drag_source_win.h b/chrome/browser/tab_contents/web_drag_source_win.h
index 0c6ebe07..25a24e3 100644
--- a/chrome/browser/tab_contents/web_drag_source_win.h
+++ b/chrome/browser/tab_contents/web_drag_source_win.h
@@ -7,8 +7,8 @@
#pragma once
#include "base/basictypes.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/dragdrop/drag_source.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/point.h"
@@ -21,16 +21,16 @@ class TabContents;
// on their system. This object tells Windows whether or not the drag should
// continue, and supplies the appropriate cursors.
class WebDragSource : public ui::DragSource,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// Create a new DragSource for a given HWND and TabContents.
WebDragSource(gfx::NativeWindow source_wnd, TabContents* tab_contents);
virtual ~WebDragSource();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
void set_effect(DWORD effect) { effect_ = effect; }
@@ -56,7 +56,7 @@ class WebDragSource : public ui::DragSource,
// initiated terminates).
RenderViewHost* render_view_host_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DWORD effect_;
diff --git a/chrome/browser/tabs/pinned_tab_service.cc b/chrome/browser/tabs/pinned_tab_service.cc
index 9f43dce..6c988c5 100644
--- a/chrome/browser/tabs/pinned_tab_service.cc
+++ b/chrome/browser/tabs/pinned_tab_service.cc
@@ -35,14 +35,14 @@ PinnedTabService::PinnedTabService(Profile* profile)
}
void PinnedTabService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (got_exiting_)
return;
switch (type) {
case chrome::NOTIFICATION_BROWSER_OPENED: {
- Browser* browser = Source<Browser>(source).ptr();
+ Browser* browser = content::Source<Browser>(source).ptr();
if (!has_normal_browser_ && browser->is_type_tabbed() &&
browser->profile() == profile_) {
has_normal_browser_ = true;
@@ -51,9 +51,9 @@ void PinnedTabService::Observe(int type,
}
case chrome::NOTIFICATION_BROWSER_CLOSING: {
- Browser* browser = Source<Browser>(source).ptr();
+ Browser* browser = content::Source<Browser>(source).ptr();
if (has_normal_browser_ && browser->profile() == profile_) {
- if (*(Details<bool>(details)).ptr()) {
+ if (*(content::Details<bool>(details)).ptr()) {
GotExit();
} else if (IsLastNormalBrowser(browser)) {
has_normal_browser_ = false;
diff --git a/chrome/browser/tabs/pinned_tab_service.h b/chrome/browser/tabs/pinned_tab_service.h
index 41e997e..c4b528b 100644
--- a/chrome/browser/tabs/pinned_tab_service.h
+++ b/chrome/browser/tabs/pinned_tab_service.h
@@ -7,15 +7,15 @@
#pragma once
#include "chrome/browser/profiles/profile_keyed_service.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class Profile;
// PinnedTabService is responsible for updating preferences with the set of
// pinned tabs to restore at startup. PinnedTabService listens for the
// appropriate set of notifications to know it should update preferences.
-class PinnedTabService : public NotificationObserver,
+class PinnedTabService : public content::NotificationObserver,
public ProfileKeyedService {
public:
explicit PinnedTabService(Profile* profile);
@@ -24,10 +24,10 @@ class PinnedTabService : public NotificationObserver,
// Invoked when we're about to exit.
void GotExit();
- // NotificationObserver.
+ // content::NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
Profile* profile_;
@@ -38,7 +38,7 @@ class PinnedTabService : public NotificationObserver,
// True if there is at least one normal browser for our profile.
bool has_normal_browser_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(PinnedTabService);
};
diff --git a/chrome/browser/tabs/tab_finder.cc b/chrome/browser/tabs/tab_finder.cc
index 4ff02ea..cb8488a 100644
--- a/chrome/browser/tabs/tab_finder.cc
+++ b/chrome/browser/tabs/tab_finder.cc
@@ -19,8 +19,8 @@
#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/common/notification_source.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/public/common/page_transition_types.h"
@@ -112,12 +112,12 @@ TabContents* TabFinder::FindTab(Browser* browser,
}
void TabFinder::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(type, content::NOTIFICATION_TAB_PARENTED);
// The tab was added to a browser. Query for its state now.
- TabContentsWrapper* tab = Source<TabContentsWrapper>(source).ptr();
+ TabContentsWrapper* tab = content::Source<TabContentsWrapper>(source).ptr();
TrackTab(tab->tab_contents());
}
diff --git a/chrome/browser/tabs/tab_finder.h b/chrome/browser/tabs/tab_finder.h
index 7314edb..e9e6e7e 100644
--- a/chrome/browser/tabs/tab_finder.h
+++ b/chrome/browser/tabs/tab_finder.h
@@ -13,8 +13,8 @@
#include "base/memory/singleton.h"
#include "chrome/browser/history/history_types.h"
#include "content/browser/cancelable_request.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class Browser;
class GURL;
@@ -30,7 +30,7 @@ struct LoadCommittedDetails;
//
// TODO: if we end up keeping this (moving it out of about:flags) then we
// should persist the start of the redirect chain in the navigation entry.
-class TabFinder : public NotificationObserver {
+class TabFinder : public content::NotificationObserver {
public:
// Returns the TabFinder, or NULL if TabFinder is not enabled.
static TabFinder* GetInstance();
@@ -45,10 +45,10 @@ class TabFinder : public NotificationObserver {
const GURL& url,
Browser** existing_browser);
- // NotificationObserver overrides:
+ // content::NotificationObserver overrides:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
friend struct DefaultSingletonTraits<TabFinder>;
@@ -100,7 +100,7 @@ class TabFinder : public NotificationObserver {
CancelableRequestConsumerTSimple<TabContents*> callback_consumer_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
TabContentsObservers tab_contents_observers_;
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index 6b78229..cc28c61 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -71,7 +71,7 @@ TabStripModel::TabStripModel(TabStripModelDelegate* delegate, Profile* profile)
NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this,
chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
order_controller_ = new TabStripModelOrderController(this);
}
@@ -990,17 +990,17 @@ bool TabStripModel::WillContextMenuPin(int index) {
}
///////////////////////////////////////////////////////////////////////////////
-// TabStripModel, NotificationObserver implementation:
+// TabStripModel, content::NotificationObserver implementation:
void TabStripModel::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_TAB_CONTENTS_DESTROYED: {
// Sometimes, on qemu, it seems like a TabContents object can be destroyed
// while we still have a reference to it. We need to break this reference
// here so we don't crash later.
- int index = GetWrapperIndex(Source<TabContents>(source).ptr());
+ int index = GetWrapperIndex(content::Source<TabContents>(source).ptr());
if (index != TabStripModel::kNoTab) {
// Note that we only detach the contents here, not close it - it's
// already been closed. We just want to undo our bookkeeping.
@@ -1011,7 +1011,7 @@ void TabStripModel::Observe(int type,
case chrome::NOTIFICATION_EXTENSION_UNLOADED: {
const Extension* extension =
- Details<UnloadedExtensionInfo>(details)->extension;
+ content::Details<UnloadedExtensionInfo>(details)->extension;
// Iterate backwards as we may remove items while iterating.
for (int i = count() - 1; i >= 0; i--) {
TabContentsWrapper* contents = GetTabContentsAt(i);
diff --git a/chrome/browser/tabs/tab_strip_model.h b/chrome/browser/tabs/tab_strip_model.h
index 106f7ad..5a7a89e 100644
--- a/chrome/browser/tabs/tab_strip_model.h
+++ b/chrome/browser/tabs/tab_strip_model.h
@@ -11,8 +11,8 @@
#include "base/observer_list.h"
#include "chrome/browser/tabs/tab_strip_model_observer.h"
#include "chrome/browser/tabs/tab_strip_selection_model.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/common/page_transition_types.h"
class NavigationController;
@@ -58,7 +58,7 @@ class TabStripModelOrderController;
// its bookkeeping when such events happen.
//
////////////////////////////////////////////////////////////////////////////////
-class TabStripModel : public NotificationObserver {
+class TabStripModel : public content::NotificationObserver {
public:
// Policy for how new tabs are inserted.
enum InsertionPolicy {
@@ -469,10 +469,10 @@ class TabStripModel : public NotificationObserver {
// supplied to |ExecuteContextMenuCommand|.
bool WillContextMenuPin(int index);
- // Overridden from notificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Convert a ContextMenuCommand into a browser command. Returns true if a
// corresponding browser command exists, false otherwise.
@@ -652,7 +652,7 @@ class TabStripModel : public NotificationObserver {
TabStripModelObservers observers_;
// A scoped container for notification registries.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
TabStripSelectionModel selection_model_;
diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc
index 2ae74ef..5366586 100644
--- a/chrome/browser/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/tabs/tab_strip_model_unittest.cc
@@ -32,12 +32,12 @@
#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_details.h"
-#include "content/common/notification_observer_mock.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
#include "content/common/property_bag.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
+#include "content/test/notification_observer_mock.h"
#include "testing/gtest/include/gtest/gtest.h"
using testing::_;
@@ -45,7 +45,8 @@ using testing::_;
namespace {
// Class used to delete a TabContents when another TabContents is destroyed.
-class DeleteTabContentsOnDestroyedObserver : public NotificationObserver {
+class DeleteTabContentsOnDestroyedObserver
+ : public content::NotificationObserver {
public:
DeleteTabContentsOnDestroyedObserver(TabContentsWrapper* source,
TabContentsWrapper* tab_to_delete)
@@ -53,12 +54,12 @@ class DeleteTabContentsOnDestroyedObserver : public NotificationObserver {
tab_to_delete_(tab_to_delete) {
registrar_.Add(this,
content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(source->tab_contents()));
+ content::Source<TabContents>(source->tab_contents()));
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
TabContentsWrapper* tab_to_delete = tab_to_delete_;
tab_to_delete_ = NULL;
delete tab_to_delete;
@@ -67,7 +68,7 @@ class DeleteTabContentsOnDestroyedObserver : public NotificationObserver {
private:
TabContentsWrapper* source_;
TabContentsWrapper* tab_to_delete_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(DeleteTabContentsOnDestroyedObserver);
};
diff --git a/chrome/browser/task_manager/task_manager_browsertest.cc b/chrome/browser/task_manager/task_manager_browsertest.cc
index 1158713..bf7a425 100644
--- a/chrome/browser/task_manager/task_manager_browsertest.cc
+++ b/chrome/browser/task_manager/task_manager_browsertest.cc
@@ -148,7 +148,7 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, KillBGContents) {
ui_test_utils::WindowedNotificationObserver observer(
chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED,
- Source<Profile>(browser()->profile()));
+ content::Source<Profile>(browser()->profile()));
BackgroundContentsService* service =
BackgroundContentsServiceFactory::GetForProfile(browser()->profile());
diff --git a/chrome/browser/task_manager/task_manager_browsertest_util.cc b/chrome/browser/task_manager/task_manager_browsertest_util.cc
index 6dd16a7..5ddd304 100644
--- a/chrome/browser/task_manager/task_manager_browsertest_util.cc
+++ b/chrome/browser/task_manager/task_manager_browsertest_util.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
namespace {
@@ -76,7 +76,7 @@ void TaskManagerBrowserTestUtil::ShowTaskManagerAndWaitForReady(
#if defined(WEBUI_TASK_MANAGER)
ui_test_utils::WindowedNotificationObserver observer(
chrome::NOTIFICATION_TASK_MANAGER_WINDOW_READY,
- Source<TaskManagerModel>(TaskManager::GetInstance()->model()));
+ content::Source<TaskManagerModel>(TaskManager::GetInstance()->model()));
browser->window()->ShowTaskManager();
observer.Wait();
#else
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 f8c2745..c8dd647 100644
--- a/chrome/browser/task_manager/task_manager_notification_resource_provider.cc
+++ b/chrome/browser/task_manager/task_manager_notification_resource_provider.cc
@@ -132,14 +132,14 @@ void TaskManagerNotificationResourceProvider::StopUpdating() {
void TaskManagerNotificationResourceProvider::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_NOTIFY_BALLOON_CONNECTED:
- AddToTaskManager(Source<BalloonHost>(source).ptr());
+ AddToTaskManager(content::Source<BalloonHost>(source).ptr());
break;
case chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED:
- RemoveFromTaskManager(Source<BalloonHost>(source).ptr());
+ RemoveFromTaskManager(content::Source<BalloonHost>(source).ptr());
break;
default:
NOTREACHED() << "Unexpected notification.";
diff --git a/chrome/browser/task_manager/task_manager_resource_providers.cc b/chrome/browser/task_manager/task_manager_resource_providers.cc
index 5985354..42befbc 100644
--- a/chrome/browser/task_manager/task_manager_resource_providers.cc
+++ b/chrome/browser/task_manager/task_manager_resource_providers.cc
@@ -442,11 +442,11 @@ void TaskManagerTabContentsResourceProvider::Remove(
}
void TaskManagerTabContentsResourceProvider::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
TabContentsWrapper* tab_contents =
TabContentsWrapper::GetCurrentWrapperForContents(
- Source<TabContents>(source).ptr());
+ content::Source<TabContents>(source).ptr());
// A background page does not have a TabContentsWrapper.
if (!tab_contents)
return;
@@ -673,8 +673,8 @@ void TaskManagerBackgroundContentsResourceProvider::Remove(
void TaskManagerBackgroundContentsResourceProvider::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_BACKGROUND_CONTENTS_OPENED: {
// Get the name from the parent application. If no parent application is
@@ -684,17 +684,18 @@ void TaskManagerBackgroundContentsResourceProvider::Observe(
// exiting while the task manager is displayed.
string16 application_name;
ExtensionService* service =
- Source<Profile>(source)->GetExtensionService();
+ content::Source<Profile>(source)->GetExtensionService();
if (service) {
std::string application_id = UTF16ToUTF8(
- Details<BackgroundContentsOpenedDetails>(details)->application_id);
+ content::Details<BackgroundContentsOpenedDetails>(details)->
+ application_id);
const Extension* extension =
service->GetExtensionById(application_id, false);
// Extension can be NULL when running unit tests.
if (extension)
application_name = UTF8ToUTF16(extension->name());
}
- Add(Details<BackgroundContentsOpenedDetails>(details)->contents,
+ Add(content::Details<BackgroundContentsOpenedDetails>(details)->contents,
application_name);
// Opening a new BackgroundContents needs to force the display to refresh
// (applications may now be considered "background" that weren't before).
@@ -702,7 +703,8 @@ void TaskManagerBackgroundContentsResourceProvider::Observe(
break;
}
case chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED: {
- BackgroundContents* contents = Details<BackgroundContents>(details).ptr();
+ BackgroundContents* contents =
+ content::Details<BackgroundContents>(details).ptr();
// Should never get a NAVIGATED before OPENED.
DCHECK(resources_.find(contents) != resources_.end());
// Preserve the application name.
@@ -713,7 +715,7 @@ void TaskManagerBackgroundContentsResourceProvider::Observe(
break;
}
case chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED:
- Remove(Details<BackgroundContents>(details).ptr());
+ Remove(content::Details<BackgroundContents>(details).ptr());
// Closing a BackgroundContents needs to force the display to refresh
// (applications may now be considered "foreground" that weren't before).
task_manager_->ModelChanged();
@@ -936,14 +938,14 @@ void TaskManagerChildProcessResourceProvider::StopUpdating() {
void TaskManagerChildProcessResourceProvider::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_CHILD_PROCESS_HOST_CONNECTED:
- Add(*Details<ChildProcessInfo>(details).ptr());
+ Add(*content::Details<ChildProcessInfo>(details).ptr());
break;
case content::NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED:
- Remove(*Details<ChildProcessInfo>(details).ptr());
+ Remove(*content::Details<ChildProcessInfo>(details).ptr());
break;
default:
NOTREACHED() << "Unexpected notification.";
@@ -1185,15 +1187,15 @@ void TaskManagerExtensionProcessResourceProvider::StopUpdating() {
void TaskManagerExtensionProcessResourceProvider::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_PROCESS_CREATED:
- AddToTaskManager(Details<ExtensionHost>(details).ptr());
+ AddToTaskManager(content::Details<ExtensionHost>(details).ptr());
break;
case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED:
case chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED:
- RemoveFromTaskManager(Details<ExtensionHost>(details).ptr());
+ RemoveFromTaskManager(content::Details<ExtensionHost>(details).ptr());
break;
default:
NOTREACHED() << "Unexpected notification.";
diff --git a/chrome/browser/task_manager/task_manager_resource_providers.h b/chrome/browser/task_manager/task_manager_resource_providers.h
index d99588f..e4b7aee 100644
--- a/chrome/browser/task_manager/task_manager_resource_providers.h
+++ b/chrome/browser/task_manager/task_manager_resource_providers.h
@@ -14,8 +14,8 @@
#include "base/process_util.h"
#include "chrome/browser/task_manager/task_manager.h"
#include "content/common/child_process_info.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
class BackgroundContents;
@@ -115,7 +115,7 @@ class TaskManagerTabContentsResource : public TaskManagerRendererResource {
class TaskManagerTabContentsResourceProvider
: public TaskManager::ResourceProvider,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit TaskManagerTabContentsResourceProvider(TaskManager* task_manager);
@@ -125,10 +125,10 @@ class TaskManagerTabContentsResourceProvider
virtual void StartUpdating();
virtual void StopUpdating();
- // NotificationObserver method:
+ // content::NotificationObserver method:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
virtual ~TaskManagerTabContentsResourceProvider();
@@ -149,7 +149,7 @@ class TaskManagerTabContentsResourceProvider
std::map<TabContentsWrapper*, TaskManagerTabContentsResource*> resources_;
// A scoped container for notification registries.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(TaskManagerTabContentsResourceProvider);
};
@@ -184,7 +184,7 @@ class TaskManagerBackgroundContentsResource
class TaskManagerBackgroundContentsResourceProvider
: public TaskManager::ResourceProvider,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit TaskManagerBackgroundContentsResourceProvider(
TaskManager* task_manager);
@@ -195,10 +195,10 @@ class TaskManagerBackgroundContentsResourceProvider
virtual void StartUpdating();
virtual void StopUpdating();
- // NotificationObserver method:
+ // content::NotificationObserver method:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
virtual ~TaskManagerBackgroundContentsResourceProvider();
@@ -221,7 +221,7 @@ class TaskManagerBackgroundContentsResourceProvider
resources_;
// A scoped container for notification registries.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(TaskManagerBackgroundContentsResourceProvider);
};
@@ -263,7 +263,7 @@ class TaskManagerChildProcessResource : public TaskManager::Resource {
class TaskManagerChildProcessResourceProvider
: public TaskManager::ResourceProvider,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit TaskManagerChildProcessResourceProvider(TaskManager* task_manager);
@@ -273,10 +273,10 @@ class TaskManagerChildProcessResourceProvider
virtual void StartUpdating();
virtual void StopUpdating();
- // NotificationObserver method:
+ // content::NotificationObserver method:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Retrieves the current ChildProcessInfo (performed in the IO thread).
virtual void RetrieveChildProcessInfo();
@@ -310,7 +310,7 @@ class TaskManagerChildProcessResourceProvider
std::map<int, TaskManagerChildProcessResource*> pid_to_resources_;
// A scoped container for notification registries.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(TaskManagerChildProcessResourceProvider);
};
@@ -352,7 +352,7 @@ class TaskManagerExtensionProcessResource : public TaskManager::Resource {
class TaskManagerExtensionProcessResourceProvider
: public TaskManager::ResourceProvider,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit TaskManagerExtensionProcessResourceProvider(
TaskManager* task_manager);
@@ -363,10 +363,10 @@ class TaskManagerExtensionProcessResourceProvider
virtual void StartUpdating();
virtual void StopUpdating();
- // NotificationObserver method:
+ // content::NotificationObserver method:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
virtual ~TaskManagerExtensionProcessResourceProvider();
@@ -384,7 +384,7 @@ class TaskManagerExtensionProcessResourceProvider
std::map<int, TaskManagerExtensionProcessResource*> pid_to_resources_;
// A scoped container for notification registries.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
bool updating_;
@@ -422,7 +422,7 @@ class TaskManagerNotificationResource : public TaskManager::Resource {
class TaskManagerNotificationResourceProvider
: public TaskManager::ResourceProvider,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
static TaskManagerNotificationResourceProvider* Create(
TaskManager* task_manager);
@@ -434,10 +434,10 @@ class TaskManagerNotificationResourceProvider
virtual void StartUpdating();
virtual void StopUpdating();
- // NotificationObserver interface
+ // content::NotificationObserver interface
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
explicit TaskManagerNotificationResourceProvider(TaskManager* task_manager);
@@ -452,7 +452,7 @@ class TaskManagerNotificationResourceProvider
std::map<BalloonHost*, TaskManagerNotificationResource*> resources_;
// A scoped container for notification registries.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
bool updating_;
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
index 69f6338..671d7b9 100644
--- a/chrome/browser/themes/theme_service.cc
+++ b/chrome/browser/themes/theme_service.cc
@@ -216,7 +216,7 @@ void ThemeService::Init(Profile* profile) {
// BROWSER_THEME_CHANGED).
registrar_.Add(this,
chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
LoadThemePrefs();
}
@@ -599,7 +599,7 @@ void ThemeService::NotifyThemeChanged() {
// Redraw!
NotificationService* service = NotificationService::current();
service->Notify(chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(this),
+ content::Source<ThemeService>(this),
NotificationService::NoDetails());
#if defined(OS_MACOSX)
NotifyPlatformThemeChanged();
@@ -613,10 +613,10 @@ void ThemeService::FreePlatformCaches() {
#endif
void ThemeService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_EXTENSION_LOADED);
- const Extension* extension = Details<const Extension>(details).ptr();
+ const Extension* extension = content::Details<const Extension>(details).ptr();
if (!extension->is_theme()) {
return;
}
diff --git a/chrome/browser/themes/theme_service.h b/chrome/browser/themes/theme_service.h
index 4b8a3ca..6dc8913 100644
--- a/chrome/browser/themes/theme_service.h
+++ b/chrome/browser/themes/theme_service.h
@@ -13,8 +13,8 @@
#include "base/memory/ref_counted.h"
#include "base/threading/non_thread_safe.h"
#include "chrome/browser/profiles/profile_keyed_service.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/theme_provider.h"
class BrowserThemePack;
@@ -40,7 +40,7 @@ extern "C" NSString* const kBrowserThemeDidChangeNotification;
#endif // __OBJC__
class ThemeService : public base::NonThreadSafe,
- public NotificationObserver,
+ public content::NotificationObserver,
public ProfileKeyedService,
public ui::ThemeProvider {
public:
@@ -248,10 +248,10 @@ class ThemeService : public base::NonThreadSafe,
Profile* profile() { return profile_; }
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
friend class ThemeServiceTest;
@@ -294,7 +294,7 @@ class ThemeService : public base::NonThreadSafe,
// The number of infobars currently displayed.
int number_of_infobars_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(ThemeService);
};
diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc
index 6f5d663..a3ab0e1 100644
--- a/chrome/browser/translate/translate_manager.cc
+++ b/chrome/browser/translate/translate_manager.cc
@@ -39,9 +39,9 @@
#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_details.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/browser_resources.h"
#include "net/base/escape.h"
@@ -252,14 +252,14 @@ bool TranslateManager::IsSupportedLanguage(const std::string& page_language) {
}
void TranslateManager::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_NAV_ENTRY_COMMITTED: {
NavigationController* controller =
- Source<NavigationController>(source).ptr();
+ content::Source<NavigationController>(source).ptr();
content::LoadCommittedDetails* load_details =
- Details<content::LoadCommittedDetails>(details).ptr();
+ content::Details<content::LoadCommittedDetails>(details).ptr();
NavigationEntry* entry = controller->GetActiveEntry();
if (!entry) {
NOTREACHED();
@@ -300,7 +300,7 @@ void TranslateManager::Observe(int type,
break;
}
case chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED: {
- TabContents* tab = Source<TabContents>(source).ptr();
+ TabContents* tab = content::Source<TabContents>(source).ptr();
// We may get this notifications multiple times. Make sure to translate
// only once.
TabContentsWrapper* wrapper =
@@ -314,7 +314,7 @@ void TranslateManager::Observe(int type,
!language_state.translation_pending() &&
!language_state.translation_declined() &&
!language_state.IsPageTranslated()) {
- std::string language = *(Details<std::string>(details).ptr());
+ std::string language = *(content::Details<std::string>(details).ptr());
InitiateTranslation(tab, language);
}
break;
@@ -323,14 +323,15 @@ void TranslateManager::Observe(int type,
// Only add translate infobar if it doesn't exist; if it already exists,
// just update the state, the actual infobar would have received the same
// notification and update the visual display accordingly.
- TabContents* tab = Source<TabContents>(source).ptr();
+ TabContents* tab = content::Source<TabContents>(source).ptr();
PageTranslatedDetails* page_translated_details =
- Details<PageTranslatedDetails>(details).ptr();
+ content::Details<PageTranslatedDetails>(details).ptr();
PageTranslated(tab, page_translated_details);
break;
}
case chrome::NOTIFICATION_PROFILE_DESTROYED: {
- PrefService* pref_service = Source<Profile>(source).ptr()->GetPrefs();
+ PrefService* pref_service =
+ content::Source<Profile>(source).ptr()->GetPrefs();
notification_registrar_.Remove(this,
chrome::NOTIFICATION_PROFILE_DESTROYED,
source);
@@ -346,8 +347,9 @@ void TranslateManager::Observe(int type,
break;
}
case chrome::NOTIFICATION_PREF_CHANGED: {
- DCHECK(*Details<std::string>(details).ptr() == prefs::kAcceptLanguages);
- PrefService* prefs = Source<PrefService>(source).ptr();
+ DCHECK(*content::Details<std::string>(details).ptr() ==
+ prefs::kAcceptLanguages);
+ PrefService* prefs = content::Source<PrefService>(source).ptr();
InitAcceptLanguages(prefs);
break;
}
@@ -694,7 +696,7 @@ bool TranslateManager::IsAcceptLanguage(TabContents* tab,
// Listen for this profile going away, in which case we would need to clear
// the accepted languages for the profile.
notification_registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
// Also start listening for changes in the accept languages.
DCHECK(pref_change_registrars_.find(pref_service) ==
pref_change_registrars_.end());
diff --git a/chrome/browser/translate/translate_manager.h b/chrome/browser/translate/translate_manager.h
index 0ebc5f4..bf06f48 100644
--- a/chrome/browser/translate/translate_manager.h
+++ b/chrome/browser/translate/translate_manager.h
@@ -17,8 +17,8 @@
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/common/translate_errors.h"
#include "content/common/net/url_fetcher.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
template <typename T> struct DefaultSingletonTraits;
class GURL;
@@ -32,7 +32,7 @@ class TranslateInfoBarDelegate;
// page translation the user requests.
// It is a singleton.
-class TranslateManager : public NotificationObserver,
+class TranslateManager : public content::NotificationObserver,
public URLFetcher::Delegate {
public:
// Returns the singleton instance.
@@ -69,10 +69,10 @@ class TranslateManager : public NotificationObserver,
// Clears the translate script, so it will be fetched next time we translate.
void ClearTranslateScript() { translate_script_.clear(); }
- // NotificationObserver implementation:
+ // content::NotificationObserver implementation:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// URLFetcher::Delegate implementation:
virtual void OnURLFetchComplete(const URLFetcher* source,
@@ -180,7 +180,7 @@ class TranslateManager : public NotificationObserver,
static TranslateInfoBarDelegate* GetTranslateInfoBarDelegate(
TabContents* tab);
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
// Each PrefChangeRegistrar only tracks a single PrefService, so a map from
// each PrefService used to its registrar is needed.
diff --git a/chrome/browser/translate/translate_manager_browsertest.cc b/chrome/browser/translate/translate_manager_browsertest.cc
index c3acd10e..a0cba92 100644
--- a/chrome/browser/translate/translate_manager_browsertest.cc
+++ b/chrome/browser/translate/translate_manager_browsertest.cc
@@ -29,10 +29,10 @@
#include "content/browser/renderer_host/mock_render_process_host.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/test_tab_contents.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_observer_mock.h"
-#include "content/common/notification_registrar.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/test/notification_observer_mock.h"
#include "content/test/test_url_fetcher_factory.h"
#include "grit/generated_resources.h"
#include "ipc/ipc_test_sink.h"
@@ -46,7 +46,7 @@ using testing::Property;
using WebKit::WebContextMenuData;
class TranslateManagerTest : public TabContentsWrapperTestHarness,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
TranslateManagerTest()
: ui_thread_(BrowserThread::UI, &message_loop_) {
@@ -144,10 +144,11 @@ class TranslateManagerTest : public TabContentsWrapperTestHarness,
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, type);
- removed_infobars_.insert(Details<InfoBarRemovedDetails>(details)->first);
+ removed_infobars_.insert(
+ content::Details<InfoBarRemovedDetails>(details)->first);
}
protected:
@@ -168,7 +169,8 @@ class TranslateManagerTest : public TabContentsWrapperTestHarness,
notification_registrar_.Add(this,
chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
- Source<InfoBarTabHelper>(contents_wrapper()->infobar_tab_helper()));
+ content::Source<InfoBarTabHelper>(
+ contents_wrapper()->infobar_tab_helper()));
}
virtual void TearDown() {
@@ -176,7 +178,8 @@ class TranslateManagerTest : public TabContentsWrapperTestHarness,
notification_registrar_.Remove(this,
chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
- Source<InfoBarTabHelper>(contents_wrapper()->infobar_tab_helper()));
+ content::Source<InfoBarTabHelper>(
+ contents_wrapper()->infobar_tab_helper()));
TabContentsWrapperTestHarness::TearDown();
}
@@ -226,13 +229,13 @@ class TranslateManagerTest : public TabContentsWrapperTestHarness,
pref_observer_,
Observe(int(chrome::NOTIFICATION_PREF_CHANGED),
_,
- Property(&Details<std::string>::ptr, Pointee(path))));
+ Property(&content::Details<std::string>::ptr, Pointee(path))));
}
- NotificationObserverMock pref_observer_;
+ content::NotificationObserverMock pref_observer_;
private:
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
TestURLFetcherFactory url_fetcher_factory_;
BrowserThread ui_thread_;
@@ -244,19 +247,20 @@ class TranslateManagerTest : public TabContentsWrapperTestHarness,
};
// An observer that keeps track of whether a navigation entry was committed.
-class NavEntryCommittedObserver : public NotificationObserver {
+class NavEntryCommittedObserver : public content::NotificationObserver {
public:
explicit NavEntryCommittedObserver(TabContents* tab_contents) {
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(&tab_contents->controller()));
+ content::Source<NavigationController>(
+ &tab_contents->controller()));
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == content::NOTIFICATION_NAV_ENTRY_COMMITTED);
details_ =
- *(Details<content::LoadCommittedDetails>(details).ptr());
+ *(content::Details<content::LoadCommittedDetails>(details).ptr());
}
const content::LoadCommittedDetails&
@@ -266,7 +270,7 @@ class NavEntryCommittedObserver : public NotificationObserver {
private:
content::LoadCommittedDetails details_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(NavEntryCommittedObserver);
};
diff --git a/chrome/browser/translate/translate_tab_helper.cc b/chrome/browser/translate/translate_tab_helper.cc
index b4a1018..ced575a 100644
--- a/chrome/browser/translate/translate_tab_helper.cc
+++ b/chrome/browser/translate/translate_tab_helper.cc
@@ -44,8 +44,8 @@ void TranslateTabHelper::OnLanguageDetermined(const std::string& language,
std::string lang = language;
NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED,
- Source<TabContents>(tab_contents()),
- Details<std::string>(&lang));
+ content::Source<TabContents>(tab_contents()),
+ content::Details<std::string>(&lang));
}
void TranslateTabHelper::OnPageTranslated(int32 page_id,
@@ -57,6 +57,6 @@ void TranslateTabHelper::OnPageTranslated(int32 page_id,
PageTranslatedDetails details(original_lang, translated_lang, error_type);
NotificationService::current()->Notify(
chrome::NOTIFICATION_PAGE_TRANSLATED,
- Source<TabContents>(tab_contents()),
- Details<PageTranslatedDetails>(&details));
+ 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 54c09d0..3d7a778 100644
--- a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc
+++ b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc
@@ -30,7 +30,7 @@ void AppModalDialog::ShowModalDialog() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN,
- Source<AppModalDialog>(this),
+ content::Source<AppModalDialog>(this),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/ui/auto_login_prompter.cc b/chrome/browser/ui/auto_login_prompter.cc
index 8fac79c..0e16490 100644
--- a/chrome/browser/ui/auto_login_prompter.cc
+++ b/chrome/browser/ui/auto_login_prompter.cc
@@ -26,10 +26,10 @@
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/url_canon.h"
#include "googleurl/src/url_util.h"
@@ -45,7 +45,7 @@
// auto-login. It holds context information needed while re-issuing service
// tokens using the TokenService, gets the browser cookies with the TokenAuth
// API, and finally redirects the user to the correct page.
-class AutoLoginRedirector : public NotificationObserver {
+class AutoLoginRedirector : public content::NotificationObserver {
public:
AutoLoginRedirector(TokenService* token_service,
NavigationController* navigation_controller,
@@ -53,10 +53,10 @@ class AutoLoginRedirector : public NotificationObserver {
virtual ~AutoLoginRedirector();
private:
- // NotificationObserver override.
+ // content::NotificationObserver override.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Redirect tab to MergeSession URL, logging the user in and navigating
// to the desired page.
@@ -64,7 +64,7 @@ class AutoLoginRedirector : public NotificationObserver {
NavigationController* navigation_controller_;
const std::string args_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(AutoLoginRedirector);
};
@@ -81,10 +81,10 @@ AutoLoginRedirector::AutoLoginRedirector(
// the other, allow AutoLoginRedirector to delete itself correctly.
registrar_.Add(this,
chrome::NOTIFICATION_TOKEN_AVAILABLE,
- Source<TokenService>(token_service));
+ content::Source<TokenService>(token_service));
registrar_.Add(this,
chrome::NOTIFICATION_TOKEN_REQUEST_FAILED,
- Source<TokenService>(token_service));
+ content::Source<TokenService>(token_service));
token_service->StartFetchingTokens();
}
@@ -92,22 +92,23 @@ AutoLoginRedirector::~AutoLoginRedirector() {
}
void AutoLoginRedirector::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_TOKEN_AVAILABLE ||
type == chrome::NOTIFICATION_TOKEN_REQUEST_FAILED);
// We are only interested in GAIA tokens.
if (type == chrome::NOTIFICATION_TOKEN_AVAILABLE) {
TokenService::TokenAvailableDetails* tok_details =
- Details<TokenService::TokenAvailableDetails>(details).ptr();
+ content::Details<TokenService::TokenAvailableDetails>(details).ptr();
if (tok_details->service() == GaiaConstants::kGaiaService) {
RedirectToMergeSession(tok_details->token());
delete this;
}
} else {
TokenService::TokenRequestFailedDetails* tok_details =
- Details<TokenService::TokenRequestFailedDetails>(details).ptr();
+ content::Details<TokenService::TokenRequestFailedDetails>(details).
+ ptr();
if (tok_details->service() == GaiaConstants::kGaiaService) {
LOG(WARNING) << "AutoLoginRedirector: token request failed";
delete this;
@@ -221,9 +222,10 @@ AutoLoginPrompter::AutoLoginPrompter(
username_(username),
args_(args) {
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab_contents_->controller()));
+ content::Source<NavigationController>(
+ &tab_contents_->controller()));
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents_));
+ content::Source<TabContents>(tab_contents_));
}
AutoLoginPrompter::~AutoLoginPrompter() {
@@ -316,8 +318,8 @@ void AutoLoginPrompter::ShowInfoBarUIThread(const std::string& account,
}
void AutoLoginPrompter::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_LOAD_STOP) {
TabContentsWrapper* wrapper =
TabContentsWrapper::GetCurrentWrapperForContents(tab_contents_);
diff --git a/chrome/browser/ui/auto_login_prompter.h b/chrome/browser/ui/auto_login_prompter.h
index 0cdb1b9..11900ff 100644
--- a/chrome/browser/ui/auto_login_prompter.h
+++ b/chrome/browser/ui/auto_login_prompter.h
@@ -7,8 +7,8 @@
#include <string>
#include "base/compiler_specific.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class TabContents;
namespace net {
@@ -19,7 +19,7 @@ class URLRequest;
// the currently loaded page with one click. This is used when the browser
// detects that the user has navigated to a login page and that there are stored
// tokens that would allow a one-click login.
-class AutoLoginPrompter : public NotificationObserver {
+class AutoLoginPrompter : public content::NotificationObserver {
public:
AutoLoginPrompter(TabContents* tab_contents,
const std::string& username,
@@ -41,15 +41,15 @@ class AutoLoginPrompter : public NotificationObserver {
int child_id,
int route_id);
- // NotificationObserver override.
+ // content::NotificationObserver override.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
TabContents* tab_contents_;
const std::string username_;
const std::string args_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(AutoLoginPrompter);
};
diff --git a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.h b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.h
index 321d74a..9ebe242 100644
--- a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.h
+++ b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.h
@@ -9,7 +9,7 @@
#include "chrome/browser/ui/find_bar/find_bar_controller.h"
#include "chrome/browser/ui/find_bar/find_notification_details.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "webkit/glue/window_open_disposition.h"
class BlockedContentContainer;
diff --git a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
index d72077f..ab56535 100644
--- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
@@ -67,15 +67,15 @@ void BookmarkTabHelper::DidNavigateMainFramePostCommit(
}
void BookmarkTabHelper::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED:
// BookmarkModel finished loading, fall through to update starred state.
case chrome::NOTIFICATION_URLS_STARRED: {
// Somewhere, a URL has been starred.
// Ignore notifications for profiles other than our current one.
- Profile* source_profile = Source<Profile>(source).ptr();
+ Profile* source_profile = content::Source<Profile>(source).ptr();
if (!source_profile ||
!source_profile->IsSameProfile(tab_contents_wrapper_->profile()))
return;
diff --git a/chrome/browser/ui/bookmarks/bookmark_tab_helper.h b/chrome/browser/ui/bookmarks/bookmark_tab_helper.h
index 53d45d8..20a521a 100644
--- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.h
+++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.h
@@ -7,15 +7,15 @@
#pragma once
#include "content/browser/tab_contents/tab_contents_observer.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class BookmarkTabHelperDelegate;
class TabContentsWrapper;
struct BookmarkNodeData;
// Per-tab class to manage bookmarks.
-class BookmarkTabHelper : public NotificationObserver,
+class BookmarkTabHelper : public content::NotificationObserver,
public TabContentsObserver {
public:
// BookmarkDrag --------------------------------------------------------------
@@ -47,10 +47,10 @@ class BookmarkTabHelper : public NotificationObserver,
const content::LoadCommittedDetails& details,
const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE;
- // NotificationObserver overrides:
+ // content::NotificationObserver overrides:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// It is up to callers to call SetBookmarkDragDelegate(NULL) when
// |bookmark_drag| is deleted since this class does not take ownership of
@@ -70,7 +70,7 @@ class BookmarkTabHelper : public NotificationObserver,
bool is_starred_;
// Registers and unregisters us for notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Owning TabContentsWrapper.
TabContentsWrapper* tab_contents_wrapper_;
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 8a8ae92..6374676 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -149,9 +149,9 @@
#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_details.h"
#include "content/common/notification_service.h"
#include "content/common/page_zoom.h"
+#include "content/public/browser/notification_details.h"
#include "content/public/common/content_switches.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -296,18 +296,19 @@ Browser::Browser(Type type, Profile* profile)
registrar_.Add(this, content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED,
NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
NotificationService::AllSources());
registrar_.Add(
this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(ThemeServiceFactory::GetForProfile(profile_)));
+ content::Source<ThemeService>(
+ ThemeServiceFactory::GetForProfile(profile_)));
registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED,
NotificationService::AllSources());
@@ -500,7 +501,7 @@ void Browser::InitBrowserWindow() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_BROWSER_WINDOW_READY,
- Source<Browser>(this),
+ content::Source<Browser>(this),
NotificationService::NoDetails());
PrefService* local_state = g_browser_process->local_state();
@@ -1013,8 +1014,8 @@ void Browser::OnWindowClosing() {
// TODO(sky): convert session/tab restore to use notification.
NotificationService::current()->Notify(
chrome::NOTIFICATION_BROWSER_CLOSING,
- Source<Browser>(this),
- Details<bool>(&exiting));
+ content::Source<Browser>(this),
+ content::Details<bool>(&exiting));
CloseAllTabs();
}
@@ -1321,7 +1322,7 @@ void Browser::WindowFullscreenStateChanged() {
void Browser::NotifyFullscreenChange() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- Source<Browser>(this),
+ content::Source<Browser>(this),
NotificationService::NoDetails());
}
@@ -3190,10 +3191,10 @@ void Browser::TabInsertedAt(TabContentsWrapper* contents,
// If the tab crashes in the beforeunload or unload handler, it won't be
// able to ack. But we know we can close it.
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DISCONNECTED,
- Source<TabContents>(contents->tab_contents()));
+ content::Source<TabContents>(contents->tab_contents()));
registrar_.Add(this, content::NOTIFICATION_INTERSTITIAL_ATTACHED,
- Source<TabContents>(contents->tab_contents()));
+ content::Source<TabContents>(contents->tab_contents()));
}
void Browser::TabClosingAt(TabStripModel* tab_strip_model,
@@ -3201,7 +3202,7 @@ void Browser::TabClosingAt(TabStripModel* tab_strip_model,
int index) {
NotificationService::current()->Notify(
content::NOTIFICATION_TAB_CLOSING,
- Source<NavigationController>(&contents->controller()),
+ content::Source<NavigationController>(&contents->controller()),
NotificationService::NoDetails());
// Sever the TabContents' connection back to us.
@@ -3584,7 +3585,7 @@ void Browser::TabContentsFocused(TabContents* tab_content) {
bool Browser::TakeFocus(bool reverse) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_FOCUS_RETURNED_TO_BROWSER,
- Source<Browser>(this),
+ content::Source<Browser>(this),
NotificationService::NoDetails());
return false;
}
@@ -4113,18 +4114,18 @@ void Browser::FileSelected(const FilePath& path, int index, void* params) {
}
///////////////////////////////////////////////////////////////////////////////
-// Browser, NotificationObserver implementation:
+// Browser, content::NotificationObserver implementation:
void Browser::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_TAB_CONTENTS_DISCONNECTED:
if (is_attempting_to_close_browser_) {
// Pass in false so that we delay processing. We need to delay the
// processing as it may close the tab, which is currently on the call
// stack above us.
- ClearUnloadState(Source<TabContents>(source).ptr(), false);
+ ClearUnloadState(content::Source<TabContents>(source).ptr(), false);
}
break;
@@ -4137,17 +4138,18 @@ void Browser::Observe(int type,
// closing of this one.
if (GetSelectedTabContents() &&
&GetSelectedTabContents()->controller() ==
- Source<NavigationController>(source).ptr())
+ content::Source<NavigationController>(source).ptr())
UpdateToolbar(false);
break;
case chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED: {
// Show the UI if the extension was disabled for escalated permissions.
- Profile* profile = Source<Profile>(source).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
if (profile_->IsSameProfile(profile)) {
ExtensionService* service = profile->GetExtensionService();
DCHECK(service);
- const Extension* extension = Details<const Extension>(details).ptr();
+ const Extension* extension =
+ content::Details<const Extension>(details).ptr();
if (service->extension_prefs()->DidExtensionEscalatePermissions(
extension->id()))
ShowExtensionDisabledUI(service, profile_, extension);
@@ -4161,7 +4163,7 @@ void Browser::Observe(int type,
// Close any tabs from the unloaded extension.
const Extension* extension =
- Details<UnloadedExtensionInfo>(details)->extension;
+ content::Details<UnloadedExtensionInfo>(details)->extension;
TabStripModel* model = tab_handler_->GetTabStripModel();
for (int i = model->count() - 1; i >= 0; --i) {
TabContents* tc = model->GetTabContentsAt(i)->tab_contents();
@@ -4175,7 +4177,7 @@ void Browser::Observe(int type,
}
case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED: {
- Profile* profile = Source<Profile>(source).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
if (profile_->IsSameProfile(profile) && window()->GetLocationBar())
window()->GetLocationBar()->InvalidatePageActions();
break;
@@ -4196,7 +4198,7 @@ void Browser::Observe(int type,
break;
case chrome::NOTIFICATION_EXTENSION_READY_FOR_INSTALL: {
- Profile* profile = Source<Profile>(source).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
if (profile_->IsSameProfile(profile)) {
// Handle EXTENSION_READY_FOR_INSTALL for last active tabbed browser.
if (BrowserList::FindTabbedBrowser(profile, true) == this) {
@@ -4204,7 +4206,7 @@ void Browser::Observe(int type,
// want to wait until unpack to find out an extension is a theme, so
// we test the download_url GURL instead. This means that themes in
// the extensions gallery won't get the loading dialog.
- GURL download_url = *(Details<GURL>(details).ptr());
+ GURL download_url = *(content::Details<GURL>(details).ptr());
if (ExtensionService::IsDownloadFromMiniGallery(download_url))
window()->ShowThemeInstallBubble();
}
@@ -4213,7 +4215,8 @@ void Browser::Observe(int type,
}
case chrome::NOTIFICATION_PREF_CHANGED: {
- const std::string& pref_name = *Details<std::string>(details).ptr();
+ const std::string& pref_name =
+ *content::Details<std::string>(details).ptr();
if (pref_name == prefs::kPrintingEnabled) {
UpdatePrintingState(GetContentRestrictionsForSelectedTab());
} else if (pref_name == prefs::kInstantEnabled ||
@@ -4247,7 +4250,7 @@ void Browser::Observe(int type,
UpdateCommandsForBookmarkBar();
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_PREF_CHANGE);
} else if (pref_name == prefs::kHomePage) {
- PrefService* pref_service = Source<PrefService>(source).ptr();
+ PrefService* pref_service = content::Source<PrefService>(source).ptr();
MarkHomePageAsChanged(pref_service);
} else if (pref_name == prefs::kAllowFileSelectionDialogs) {
UpdateSaveAsState(GetContentRestrictionsForSelectedTab());
@@ -4259,7 +4262,7 @@ void Browser::Observe(int type,
}
case chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED: {
- TabContents* tab_contents = Source<TabContents>(source).ptr();
+ TabContents* tab_contents = content::Source<TabContents>(source).ptr();
if (tab_contents == GetSelectedTabContents()) {
LocationBar* location_bar = window()->GetLocationBar();
if (location_bar)
@@ -5202,9 +5205,9 @@ void Browser::TabDetachedAtImpl(TabContentsWrapper* contents, int index,
}
registrar_.Remove(this, content::NOTIFICATION_INTERSTITIAL_ATTACHED,
- Source<TabContents>(contents->tab_contents()));
+ content::Source<TabContents>(contents->tab_contents()));
registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DISCONNECTED,
- Source<TabContents>(contents->tab_contents()));
+ content::Source<TabContents>(contents->tab_contents()));
}
// static
@@ -5260,7 +5263,7 @@ bool Browser::OpenInstant(WindowOpenDisposition disposition) {
if (disposition == CURRENT_TAB) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_INSTANT_COMMITTED,
- Source<TabContentsWrapper>(instant()->CommitCurrentPreview(
+ content::Source<TabContentsWrapper>(instant()->CommitCurrentPreview(
INSTANT_COMMIT_PRESSED_ENTER)),
NotificationService::NoDetails());
return true;
@@ -5280,7 +5283,7 @@ bool Browser::OpenInstant(WindowOpenDisposition disposition) {
instant()->CompleteRelease(preview_contents);
NotificationService::current()->Notify(
chrome::NOTIFICATION_INSTANT_COMMITTED,
- Source<TabContentsWrapper>(preview_contents),
+ content::Source<TabContentsWrapper>(preview_contents),
NotificationService::NoDetails());
return true;
}
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index a0fdacc..cc88061 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -44,8 +44,8 @@
#include "chrome/common/extensions/extension_constants.h"
#include "content/browser/tab_contents/page_navigator.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
-#include "content/common/notification_registrar.h"
#include "content/common/page_zoom.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/common/page_transition_types.h"
#include "ui/base/ui_base_types.h"
#include "ui/gfx/rect.h"
@@ -80,7 +80,7 @@ class Browser : public TabHandlerDelegate,
public BookmarkTabHelperDelegate,
public PageNavigator,
public CommandUpdater::CommandUpdaterDelegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public SelectFileDialog::Listener,
public TabRestoreServiceObserver,
public ProfileSyncServiceObserver,
@@ -1038,10 +1038,10 @@ class Browser : public TabHandlerDelegate,
// Overridden from SelectFileDialog::Listener:
virtual void FileSelected(const FilePath& path, int index, void* params);
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Overridden from ProfileSyncServiceObserver:
virtual void OnStateChanged();
@@ -1284,7 +1284,7 @@ class Browser : public TabHandlerDelegate,
// Data members /////////////////////////////////////////////////////////////
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
PrefChangeRegistrar profile_pref_registrar_;
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index fc434bf..02bbd56 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -40,7 +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/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/common/page_transition_types.h"
#include "content/public/common/url_constants.h"
#include "grit/chromium_strings.h"
@@ -780,7 +780,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_PageLanguageDetection) {
TabContents* current_tab = browser()->GetSelectedTabContents();
TabContentsWrapper* wrapper = browser()->GetSelectedTabContentsWrapper();
TranslateTabHelper* helper = wrapper->translate_tab_helper();
- Source<TabContents> source(current_tab);
+ content::Source<TabContents> source(current_tab);
ui_test_utils::WindowedNotificationObserverWithDetails<std::string>
en_language_detected_signal(chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED,
@@ -1139,7 +1139,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, ForwardDisabledOnForward) {
ui_test_utils::WindowedNotificationObserver back_nav_load_observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContents()->controller()));
browser()->GoBack(CURRENT_TAB);
back_nav_load_observer.Wait();
@@ -1147,7 +1147,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, ForwardDisabledOnForward) {
ui_test_utils::WindowedNotificationObserver forward_nav_load_observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContents()->controller()));
browser()->GoForward(CURRENT_TAB);
// This check will happen before the navigation completes, since the browser
diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc
index eca3e72..244b3b1 100644
--- a/chrome/browser/ui/browser_list.cc
+++ b/chrome/browser/ui/browser_list.cc
@@ -20,9 +20,9 @@
#include "chrome/common/pref_names.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/tab_contents/navigation_details.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_service.h"
#include "content/common/result_codes.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/common/notification_service.h"
#if defined(OS_MACOSX)
#include "chrome/browser/chrome_browser_application_mac.h"
@@ -44,7 +44,7 @@ namespace {
// This object is instantiated when the first Browser object is added to the
// list and delete when the last one is removed. It watches for loads and
// creates histograms of some global object counts.
-class BrowserActivityObserver : public NotificationObserver {
+class BrowserActivityObserver : public content::NotificationObserver {
public:
BrowserActivityObserver() {
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
@@ -53,13 +53,13 @@ class BrowserActivityObserver : public NotificationObserver {
~BrowserActivityObserver() {}
private:
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == content::NOTIFICATION_NAV_ENTRY_COMMITTED);
const content::LoadCommittedDetails& load =
- *Details<content::LoadCommittedDetails>(details).ptr();
+ *content::Details<content::LoadCommittedDetails>(details).ptr();
if (!load.is_navigation_to_different_page())
return; // Don't log for subframes or other trivial types.
@@ -101,7 +101,7 @@ class BrowserActivityObserver : public NotificationObserver {
}
}
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(BrowserActivityObserver);
};
@@ -250,7 +250,7 @@ void BrowserList::AddBrowser(Browser* browser) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_BROWSER_OPENED,
- Source<Browser>(browser),
+ content::Source<Browser>(browser),
NotificationService::NoDetails());
// Send out notifications after add has occurred. Do some basic checking to
@@ -329,7 +329,8 @@ void BrowserList::RemoveBrowser(Browser* browser) {
bool closing_last_browser = (browsers_.size() == 1);
NotificationService::current()->Notify(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(browser), Details<bool>(&closing_last_browser));
+ content::Source<Browser>(browser),
+ content::Details<bool>(&closing_last_browser));
RemoveBrowserFrom(browser, &browsers_);
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index 1fb028f..60b0e5a 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -567,8 +567,8 @@ void Navigate(NavigateParams* params) {
if (params->disposition != CURRENT_TAB) {
NotificationService::current()->Notify(
content::NOTIFICATION_TAB_ADDED,
- Source<TabContentsDelegate>(params->browser),
- Details<TabContents>(params->target_contents->tab_contents()));
+ 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 e11d8cd..2ac3d38 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.cc
+++ b/chrome/browser/ui/browser_navigator_browsertest.cc
@@ -98,9 +98,10 @@ void BrowserNavigatorTest::RunSuppressTest(WindowOpenDisposition disposition) {
EXPECT_EQ(old_url, browser()->GetSelectedTabContents()->GetURL());
}
-void BrowserNavigatorTest::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void BrowserNavigatorTest::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB: {
++this->created_tab_contents_count_;
@@ -132,7 +133,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_SingletonTabExisting) {
// Register for a notification if an additional tab_contents was instantiated.
// Opening a Singleton tab that is already opened should not be opening a new
// tab nor be creating a new TabContents object
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
// As the registrar object goes out of scope, this will get unregistered
registrar.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB,
diff --git a/chrome/browser/ui/browser_navigator_browsertest.h b/chrome/browser/ui/browser_navigator_browsertest.h
index ba81697..4beeca6 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.h
+++ b/chrome/browser/ui/browser_navigator_browsertest.h
@@ -10,8 +10,6 @@
#include "content/public/browser/notification_types.h"
class GURL;
-class NotificationDetails;
-class NotificationSource;
class Profile;
class TabContentsWrapper;
@@ -23,7 +21,7 @@ struct NavigateParams;
// for the |BrowserGuestModeNavigation| which tests navigation while in guest
// mode.
class BrowserNavigatorTest : public InProcessBrowserTest,
- public NotificationObserver {
+ public content::NotificationObserver {
protected:
browser::NavigateParams MakeNavigateParams() const;
browser::NavigateParams MakeNavigateParams(Browser* browser) const;
@@ -35,9 +33,9 @@ class BrowserNavigatorTest : public InProcessBrowserTest,
void RunSuppressTest(WindowOpenDisposition disposition);
- // NotificationObserver:
- virtual void Observe(int type, const NotificationSource& source,
- const NotificationDetails& details);
+ // content::NotificationObserver:
+ virtual void Observe(int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details);
size_t created_tab_contents_count_;
};
diff --git a/chrome/browser/ui/cocoa/base_bubble_controller.mm b/chrome/browser/ui/cocoa/base_bubble_controller.mm
index 2bb39d6..168fa71 100644
--- a/chrome/browser/ui/cocoa/base_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/base_bubble_controller.mm
@@ -9,8 +9,8 @@
#include "base/memory/scoped_nsobject.h"
#include "base/string_util.h"
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.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 "grit/generated_resources.h"
@@ -24,23 +24,23 @@ namespace BaseBubbleControllerInternal {
// This bridge listens for notifications so that the bubble closes when a user
// switches tabs (including by opening a new one).
-class Bridge : public NotificationObserver {
+class Bridge : public content::NotificationObserver {
public:
explicit Bridge(BaseBubbleController* controller) : controller_(controller) {
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_HIDDEN,
NotificationService::AllSources());
}
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
[controller_ close];
}
private:
BaseBubbleController* controller_; // Weak, owns this.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
} // namespace BaseBubbleControllerInternal
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
index 4885054..201f852 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
@@ -12,8 +12,8 @@
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util_mac.h"
@@ -21,16 +21,16 @@
// Simple class to watch for tab creation/destruction and close the bubble.
// Bridge between Chrome-style notifications and ObjC-style notifications.
-class BookmarkBubbleNotificationBridge : public NotificationObserver {
+class BookmarkBubbleNotificationBridge : public content::NotificationObserver {
public:
BookmarkBubbleNotificationBridge(BookmarkBubbleController* controller,
SEL selector);
virtual ~BookmarkBubbleNotificationBridge() {}
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
BookmarkBubbleController* controller_; // weak; owns us.
SEL selector_; // SEL sent to controller_ on notification.
};
@@ -50,8 +50,8 @@ BookmarkBubbleNotificationBridge::BookmarkBubbleNotificationBridge(
// away) so we don't bother checking which notification came in.
void BookmarkBubbleNotificationBridge::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
[controller_ performSelector:selector_ withObject:controller_];
}
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 a3ea24f..641e2b5 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm
@@ -474,7 +474,7 @@ TEST_F(BookmarkBubbleControllerTest, BubbleGoesAwayOnNewTab) {
// creation. See TabContents::NotifyConnected().
NotificationService::current()->Notify(
content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
- Source<TabContents>(NULL),
+ content::Source<TabContents>(NULL),
NotificationService::NoDetails());
// Confirm bubble going bye-bye.
diff --git a/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm b/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
index aab48c7..42192f6 100644
--- a/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
+++ b/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
@@ -36,7 +36,7 @@
namespace AvatarButtonControllerInternal {
-class Observer : public NotificationObserver {
+class Observer : public content::NotificationObserver {
public:
Observer(AvatarButtonController* button) : button_(button) {
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
@@ -45,8 +45,8 @@ class Observer : public NotificationObserver {
// NotificationObserver:
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE {
switch (type) {
case chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED:
[button_ updateAvatar];
@@ -59,7 +59,7 @@ class Observer : public NotificationObserver {
}
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
AvatarButtonController* button_; // Weak; owns this.
};
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.h b/chrome/browser/ui/cocoa/browser_window_cocoa.h
index 7d2ba5f..7f60a7a 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.h
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.h
@@ -11,7 +11,7 @@
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/browser/ui/browser_window.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/ui_base_types.h"
class Browser;
@@ -26,7 +26,7 @@ class Browser;
// it needs to manipulate the window.
class BrowserWindowCocoa : public BrowserWindow,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
BrowserWindowCocoa(Browser* browser,
BrowserWindowController* controller);
@@ -126,8 +126,8 @@ class BrowserWindowCocoa : public BrowserWindow,
// Overridden from NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Adds the given FindBar cocoa controller to this browser window.
void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller);
@@ -142,7 +142,7 @@ class BrowserWindowCocoa : public BrowserWindow,
NSWindow* window() const; // Accessor for the (current) |NSWindow|.
void UpdateSidebarForContents(TabContents* tab_contents);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
PrefChangeRegistrar pref_change_registrar_;
Browser* browser_; // weak, owned by controller
BrowserWindowController* controller_; // weak, owns us
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
index 6bba6cf..9f15251 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -42,9 +42,9 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_details.h"
#include "content/common/notification_service.h"
#include "content/public/browser/native_web_keyboard_event.h"
+#include "content/public/browser/notification_details.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util_mac.h"
@@ -75,8 +75,9 @@ BrowserWindowCocoa::BrowserWindowCocoa(Browser* browser,
: browser_(browser),
controller_(controller),
confirm_close_factory_(browser) {
- registrar_.Add(this, chrome::NOTIFICATION_SIDEBAR_CHANGED,
- Source<SidebarManager>(SidebarManager::GetInstance()));
+ registrar_.Add(
+ this, chrome::NOTIFICATION_SIDEBAR_CHANGED,
+ content::Source<SidebarManager>(SidebarManager::GetInstance()));
pref_change_registrar_.Init(browser_->profile()->GetPrefs());
pref_change_registrar_.Add(prefs::kShowBookmarkBar, this);
@@ -563,8 +564,8 @@ FindBar* BrowserWindowCocoa::CreateFindBar() {
}
void BrowserWindowCocoa::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_PREF_CHANGED: {
const std::string& pref_name = *Details<std::string>(details).ptr();
@@ -574,7 +575,7 @@ void BrowserWindowCocoa::Observe(int type,
}
case chrome::NOTIFICATION_SIDEBAR_CHANGED:
UpdateSidebarForContents(
- Details<SidebarContainer>(details)->tab_contents());
+ content::Details<SidebarContainer>(details)->tab_contents());
break;
default:
NOTREACHED(); // we don't ask for anything else!
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm b/chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm
index 756b632..79fbbfb 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm
@@ -11,7 +11,7 @@
#include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_details.h"
+#include "content/public/browser/notification_details.h"
#include "testing/gtest/include/gtest/gtest.h"
// A BrowserWindowCocoa that goes PONG when
@@ -27,8 +27,8 @@ class BrowserWindowCocoaPong : public BrowserWindowCocoa {
virtual ~BrowserWindowCocoaPong() { }
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED) {
const std::string& pref_name = *Details<std::string>(details).ptr();
if (pref_name == prefs::kShowBookmarkBar)
diff --git a/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h b/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h
index acb636e..64648c8 100644
--- a/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h
+++ b/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h
@@ -10,7 +10,7 @@
#include "chrome/browser/cookies_tree_model.h"
#include "chrome/browser/ui/cocoa/constrained_window_mac.h"
#import "chrome/browser/ui/cocoa/content_settings/cookie_tree_node.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
@class CollectedCookiesWindowController;
@class CookieDetailsViewController;
@@ -20,7 +20,7 @@ class TabContentsWrapper;
// The constrained window delegate reponsible for managing the collected
// cookies dialog.
class CollectedCookiesMac : public ConstrainedWindowMacDelegateCustomSheet,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
CollectedCookiesMac(NSWindow* parent, TabContentsWrapper* wrapper);
@@ -34,10 +34,10 @@ class CollectedCookiesMac : public ConstrainedWindowMacDelegateCustomSheet,
// NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
ConstrainedWindow* window_;
diff --git a/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm b/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm
index df9c0e2..358fbbf 100644
--- a/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm
+++ b/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm
@@ -19,8 +19,8 @@
#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_details.h"
-#include "content/common/notification_source.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 "skia/ext/skia_utils_mac.h"
@@ -85,7 +85,7 @@ CollectedCookiesMac::CollectedCookiesMac(NSWindow* parent,
@selector(sheetDidEnd:returnCode:contextInfo:)) {
TabSpecificContentSettings* content_settings = wrapper->content_settings();
registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN,
- Source<TabSpecificContentSettings>(content_settings));
+ content::Source<TabSpecificContentSettings>(content_settings));
sheet_controller_ = [[CollectedCookiesWindowController alloc]
initWithTabContentsWrapper:wrapper];
@@ -108,8 +108,8 @@ void CollectedCookiesMac::DeleteDelegate() {
}
void CollectedCookiesMac::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN);
window_->CloseConstrainedWindow();
}
diff --git a/chrome/browser/ui/cocoa/download/download_started_animation_mac.mm b/chrome/browser/ui/cocoa/download/download_started_animation_mac.mm
index acadd54..86029cc 100644
--- a/chrome/browser/ui/cocoa/download/download_started_animation_mac.mm
+++ b/chrome/browser/ui/cocoa/download/download_started_animation_mac.mm
@@ -14,9 +14,9 @@
#include "chrome/browser/tab_contents/tab_contents_view_mac.h"
#import "chrome/browser/ui/cocoa/animatable_image.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/theme_resources.h"
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
@@ -45,7 +45,7 @@ class DownloadAnimationTabObserver;
// A helper class to monitor tab hidden and closed notifications. If we receive
// such a notification, we stop the animation.
-class DownloadAnimationTabObserver : public NotificationObserver {
+class DownloadAnimationTabObserver : public content::NotificationObserver {
public:
DownloadAnimationTabObserver(DownloadStartedAnimationMac* owner,
TabContents* tab_contents)
@@ -53,17 +53,17 @@ class DownloadAnimationTabObserver : public NotificationObserver {
tab_contents_(tab_contents) {
registrar_.Add(this,
content::NOTIFICATION_TAB_CONTENTS_HIDDEN,
- Source<TabContents>(tab_contents_));
+ content::Source<TabContents>(tab_contents_));
registrar_.Add(this,
content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents_));
+ content::Source<TabContents>(tab_contents_));
}
// Runs when a tab is hidden or destroyed. Let our owner know we should end
// the animation.
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
// This ends up deleting us.
[owner_ closeAnimation];
}
@@ -76,7 +76,7 @@ class DownloadAnimationTabObserver : public NotificationObserver {
TabContents* tab_contents_;
// Used for registering to receive notifications and automatic clean up.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(DownloadAnimationTabObserver);
};
diff --git a/chrome/browser/ui/cocoa/extensions/browser_action_button.mm b/chrome/browser/ui/cocoa/extensions/browser_action_button.mm
index f72a087..836262e 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_action_button.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_action_button.mm
@@ -16,9 +16,9 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_action.h"
#include "chrome/common/extensions/extension_resource.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "skia/ext/skia_utils_mac.h"
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
#include "ui/gfx/canvas_skia_paint.h"
@@ -42,7 +42,7 @@ const CGFloat kAnimationDuration = 0.2;
// A helper class to bridge the asynchronous Skia bitmap loading mechanism to
// the extension's button.
-class ExtensionImageTrackerBridge : public NotificationObserver,
+class ExtensionImageTrackerBridge : public content::NotificationObserver,
public ImageLoadingTracker::Observer {
public:
ExtensionImageTrackerBridge(BrowserActionButton* owner,
@@ -58,8 +58,9 @@ class ExtensionImageTrackerBridge : public NotificationObserver,
Extension::kBrowserActionIconMaxSize),
ImageLoadingTracker::DONT_CACHE);
}
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
- Source<ExtensionAction>(extension->browser_action()));
+ registrar_.Add(
+ this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
+ content::Source<ExtensionAction>(extension->browser_action()));
}
~ExtensionImageTrackerBridge() {}
@@ -72,10 +73,10 @@ class ExtensionImageTrackerBridge : public NotificationObserver,
[owner_ updateState];
}
- // Overridden from NotificationObserver.
+ // Overridden from content::NotificationObserver.
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED)
[owner_ updateState];
else
@@ -90,7 +91,7 @@ class ExtensionImageTrackerBridge : public NotificationObserver,
ImageLoadingTracker tracker_;
// Used for registering to receive notifications and automatic clean up.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(ExtensionImageTrackerBridge);
};
diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
index 7aedd03..08ea24a 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
@@ -26,10 +26,10 @@
#include "chrome/common/extensions/extension_action.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
@@ -179,19 +179,19 @@ const CGFloat kBrowserActionBubbleYOffset = 3.0;
// A helper class to proxy extension notifications to the view controller's
// appropriate methods.
-class ExtensionServiceObserverBridge : public NotificationObserver,
- public ExtensionToolbarModel::Observer {
+class ExtensionServiceObserverBridge : public content::NotificationObserver,
+ public ExtensionToolbarModel::Observer {
public:
ExtensionServiceObserverBridge(BrowserActionsController* owner,
Profile* profile) : owner_(owner) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
}
- // Overridden from NotificationObserver.
+ // Overridden from content::NotificationObserver.
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE: {
ExtensionPopupController* popup = [ExtensionPopupController popup];
@@ -221,7 +221,7 @@ class ExtensionServiceObserverBridge : public NotificationObserver,
BrowserActionsController* owner_;
// Used for registering to receive notifications and automatic clean up.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(ExtensionServiceObserverBridge);
};
diff --git a/chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm b/chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm
index eb79178..cbaffd2 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm
@@ -26,9 +26,9 @@
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util_mac.h"
@@ -68,7 +68,7 @@ class AsyncUninstaller : public ExtensionUninstallDialog::Delegate {
namespace extension_action_context_menu {
-class DevmodeObserver : public NotificationObserver {
+class DevmodeObserver : public content::NotificationObserver {
public:
DevmodeObserver(ExtensionActionContextMenu* menu,
PrefService* service)
@@ -79,8 +79,8 @@ class DevmodeObserver : public NotificationObserver {
virtual ~DevmodeObserver() {}
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED)
[menu_ updateInspectorItem];
else
@@ -93,24 +93,24 @@ class DevmodeObserver : public NotificationObserver {
PrefChangeRegistrar registrar_;
};
-class ProfileObserverBridge : public NotificationObserver {
+class ProfileObserverBridge : public content::NotificationObserver {
public:
ProfileObserverBridge(ExtensionActionContextMenu* owner,
const Profile* profile)
: owner_(owner),
profile_(profile) {
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
}
~ProfileObserverBridge() {}
- // Overridden from NotificationObserver
+ // Overridden from content::NotificationObserver
void Observe(int type,
- const NotificationSource& source,
+ const content::NotificationSource& source,
const NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PROFILE_DESTROYED &&
- source == Source<Profile>(profile_)) {
+ source == content::Source<Profile>(profile_)) {
[owner_ invalidateProfile];
}
}
@@ -118,7 +118,7 @@ class ProfileObserverBridge : public NotificationObserver {
private:
ExtensionActionContextMenu* owner_;
const Profile* profile_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
} // namespace extension_action_context_menu
diff --git a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm
index e0df44e..9a9f324 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm
@@ -20,9 +20,9 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_action.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#import "skia/ext/skia_utils_mac.h"
#import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
@@ -31,32 +31,35 @@
// C++ class that receives EXTENSION_LOADED notifications and proxies them back
// to |controller|.
-class ExtensionLoadedNotificationObserver : public NotificationObserver {
+class ExtensionLoadedNotificationObserver
+ : public content::NotificationObserver {
public:
ExtensionLoadedNotificationObserver(
ExtensionInstalledBubbleController* controller, Profile* profile)
: controller_(controller) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
}
private:
// NotificationObserver implementation. Tells the controller to start showing
// its window on the main thread when the extension has finished loading.
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_EXTENSION_LOADED) {
- const Extension* extension = Details<const Extension>(details).ptr();
+ const Extension* extension =
+ content::Details<const Extension>(details).ptr();
if (extension == [controller_ extension]) {
[controller_ performSelectorOnMainThread:@selector(showWindow:)
withObject:controller_
waitUntilDone:NO];
}
} else if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) {
- const Extension* extension = Details<const Extension>(details).ptr();
+ const Extension* extension =
+ content::Details<const Extension>(details).ptr();
if (extension == [controller_ extension]) {
[controller_ performSelectorOnMainThread:@selector(extensionUnloaded:)
withObject:controller_
@@ -67,7 +70,7 @@ class ExtensionLoadedNotificationObserver : public NotificationObserver {
}
}
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
ExtensionInstalledBubbleController* controller_; // weak, owns us
};
diff --git a/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
index a42c63e..fec8da0 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
@@ -15,9 +15,9 @@
#import "chrome/browser/ui/cocoa/extensions/extension_view_mac.h"
#import "chrome/browser/ui/cocoa/info_bubble_window.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
namespace {
// The duration for any animations that might be invoked by this controller.
@@ -34,14 +34,14 @@ CGFloat Clamp(CGFloat value, CGFloat min, CGFloat max) {
} // namespace
-class DevtoolsNotificationBridge : public NotificationObserver {
+class DevtoolsNotificationBridge : public content::NotificationObserver {
public:
explicit DevtoolsNotificationBridge(ExtensionPopupController* controller)
: controller_(controller) {}
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING: {
if (Details<ExtensionHost>([controller_ extensionHost]) == details)
@@ -128,13 +128,13 @@ class DevtoolsNotificationBridge : public NotificationObserver {
if (beingInspected_) {
// Listen for the the devtools window closing.
notificationBridge_.reset(new DevtoolsNotificationBridge(self));
- registrar_.reset(new NotificationRegistrar);
+ registrar_.reset(new content::NotificationRegistrar);
registrar_->Add(notificationBridge_.get(),
content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING,
- Source<content::BrowserContext>(host->profile()));
+ content::Source<content::BrowserContext>(host->profile()));
registrar_->Add(notificationBridge_.get(),
chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
- Source<Profile>(host->profile()));
+ content::Source<Profile>(host->profile()));
}
return self;
}
diff --git a/chrome/browser/ui/cocoa/history_menu_bridge.h b/chrome/browser/ui/cocoa/history_menu_bridge.h
index f0ae1bd..99bd372 100644
--- a/chrome/browser/ui/cocoa/history_menu_bridge.h
+++ b/chrome/browser/ui/cocoa/history_menu_bridge.h
@@ -18,7 +18,7 @@
#include "chrome/browser/sessions/tab_restore_service_observer.h"
#import "chrome/browser/ui/cocoa/main_menu_item.h"
#include "content/browser/cancelable_request.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
class NavigationEntry;
class NotificationRegistrar;
@@ -56,7 +56,7 @@ class HistoryMenuBridgeTest;
// unlike the typical ownership model, this bridge owns its controller. The
// controller is very thin and only exists to interact with Cocoa, but this
// class does the bulk of the work.
-class HistoryMenuBridge : public NotificationObserver,
+class HistoryMenuBridge : public content::NotificationObserver,
public TabRestoreServiceObserver,
public MainMenuItem {
public:
@@ -125,10 +125,10 @@ class HistoryMenuBridge : public NotificationObserver,
explicit HistoryMenuBridge(Profile* profile);
virtual ~HistoryMenuBridge();
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// TabRestoreServiceObserver:
virtual void TabRestoreServiceChanged(TabRestoreService* service);
@@ -209,7 +209,7 @@ class HistoryMenuBridge : public NotificationObserver,
HistoryService* history_service_; // weak
TabRestoreService* tab_restore_service_; // weak
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
CancelableRequestConsumer cancelable_request_consumer_;
// Mapping of NSMenuItems to HistoryItems. This owns the HistoryItems until
diff --git a/chrome/browser/ui/cocoa/history_menu_bridge.mm b/chrome/browser/ui/cocoa/history_menu_bridge.mm
index 6c54b81..56eae82 100644
--- a/chrome/browser/ui/cocoa/history_menu_bridge.mm
+++ b/chrome/browser/ui/cocoa/history_menu_bridge.mm
@@ -19,7 +19,7 @@
#import "chrome/browser/ui/cocoa/history_menu_cocoa_controller.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/url_constants.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -105,7 +105,8 @@ HistoryMenuBridge::HistoryMenuBridge(Profile* profile)
// The service is not ready for use yet, so become notified when it does.
if (!history_service_) {
registrar_.Add(
- this, chrome::NOTIFICATION_HISTORY_LOADED, Source<Profile>(profile_));
+ this, chrome::NOTIFICATION_HISTORY_LOADED,
+ content::Source<Profile>(profile_));
}
}
@@ -117,14 +118,14 @@ HistoryMenuBridge::~HistoryMenuBridge() {
DCHECK(profile_);
if (history_service_) {
registrar_.Remove(this, chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
registrar_.Remove(this, chrome::NOTIFICATION_HISTORY_URL_VISITED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
registrar_.Remove(this, chrome::NOTIFICATION_HISTORY_URLS_DELETED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
} else {
registrar_.Remove(this, chrome::NOTIFICATION_HISTORY_LOADED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
if (tab_restore_service_)
@@ -140,8 +141,8 @@ HistoryMenuBridge::~HistoryMenuBridge() {
}
void HistoryMenuBridge::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
// A history service is now ready. Check to see if it's the one for the main
// profile. If so, perform final initialization.
if (type == chrome::NOTIFICATION_HISTORY_LOADED) {
@@ -154,7 +155,7 @@ void HistoryMenuBridge::Observe(int type,
// Found our HistoryService, so stop listening for this notification.
registrar_.Remove(this,
chrome::NOTIFICATION_HISTORY_LOADED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
}
@@ -368,11 +369,11 @@ NSMenuItem* HistoryMenuBridge::AddItemToMenu(HistoryItem* item,
void HistoryMenuBridge::Init() {
registrar_.Add(this, chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URL_VISITED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URLS_DELETED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
void HistoryMenuBridge::CreateMenu() {
diff --git a/chrome/browser/ui/cocoa/info_bubble_window.mm b/chrome/browser/ui/cocoa/info_bubble_window.mm
index 7514606..044055a 100644
--- a/chrome/browser/ui/cocoa/info_bubble_window.mm
+++ b/chrome/browser/ui/cocoa/info_bubble_window.mm
@@ -7,8 +7,8 @@
#include "base/basictypes.h"
#include "base/logging.h"
#include "base/memory/scoped_nsobject.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.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"
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
@@ -30,17 +30,17 @@ const NSTimeInterval kMinimumTimeInterval =
@end
// A helper class to proxy app notifications to the window.
-class AppNotificationBridge : public NotificationObserver {
+class AppNotificationBridge : public content::NotificationObserver {
public:
explicit AppNotificationBridge(InfoBubbleWindow* owner) : owner_(owner) {
registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING,
NotificationService::AllSources());
}
- // Overridden from NotificationObserver.
+ // Overridden from content::NotificationObserver.
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_APP_TERMINATING:
[owner_ appIsTerminating];
@@ -55,7 +55,7 @@ class AppNotificationBridge : public NotificationObserver {
InfoBubbleWindow* owner_;
// Used for registering to receive notifications and automatic clean up.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(AppNotificationBridge);
};
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_container_controller.h b/chrome/browser/ui/cocoa/infobars/infobar_container_controller.h
index ed77111..00da833 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_container_controller.h
+++ b/chrome/browser/ui/cocoa/infobars/infobar_container_controller.h
@@ -11,7 +11,7 @@
#include "base/memory/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#import "chrome/browser/ui/cocoa/view_resizer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
@class BrowserWindowController;
@class InfoBarController;
@@ -64,7 +64,7 @@ const CGFloat kTipHeight = 12.0;
// Lets us registers for INFOBAR_ADDED/INFOBAR_REMOVED
// notifications. The actual notifications are sent to the
// InfoBarNotificationObserver object, which proxies them back to us.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
scoped_ptr<InfoBarNotificationObserver> infoBarObserver_;
}
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm b/chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm
index 7f2483d..7d9adab 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm
+++ b/chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm
@@ -14,13 +14,13 @@
#import "chrome/browser/ui/cocoa/view_id_util.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "skia/ext/skia_utils_mac.h"
// C++ class that receives INFOBAR_ADDED and INFOBAR_REMOVED
// notifications and proxies them back to |controller|.
-class InfoBarNotificationObserver : public NotificationObserver {
+class InfoBarNotificationObserver : public content::NotificationObserver {
public:
InfoBarNotificationObserver(InfoBarContainerController* controller)
: controller_(controller) {
@@ -29,9 +29,10 @@ class InfoBarNotificationObserver : public NotificationObserver {
private:
// NotificationObserver implementation
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
- InfoBarTabHelper* infobar_helper = Source<InfoBarTabHelper>(source).ptr();
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ InfoBarTabHelper* infobar_helper =
+ content::Source<InfoBarTabHelper>(source).ptr();
switch (type) {
case chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED:
[controller_ addInfoBar:Details<InfoBarAddedDetails>(details)->
@@ -41,7 +42,7 @@ class InfoBarNotificationObserver : public NotificationObserver {
case chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED: {
InfoBarRemovedDetails* removed_details =
- Details<InfoBarRemovedDetails>(details).ptr();
+ content::Details<InfoBarRemovedDetails>(details).ptr();
[controller_
closeInfoBarsForDelegate:removed_details->first
animate:(removed_details->second ? YES : NO)];
@@ -50,7 +51,7 @@ class InfoBarNotificationObserver : public NotificationObserver {
case chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REPLACED: {
InfoBarReplacedDetails* replaced_details =
- Details<InfoBarReplacedDetails>(details).ptr();
+ content::Details<InfoBarReplacedDetails>(details).ptr();
[controller_ closeInfoBarsForDelegate:replaced_details->first
animate:NO];
[controller_ addInfoBar:replaced_details->second->
@@ -148,7 +149,7 @@ class InfoBarNotificationObserver : public NotificationObserver {
[self addInfoBar:infobar animate:NO];
}
- Source<InfoBarTabHelper> source(infobar_helper);
+ content::Source<InfoBarTabHelper> source(infobar_helper);
registrar_.Add(infoBarObserver_.get(),
chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, source);
registrar_.Add(infoBarObserver_.get(),
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
index 35141d4..0b7f7ca 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
@@ -45,7 +45,7 @@ class ToolbarModel;
class LocationBarViewMac : public AutocompleteEditController,
public LocationBar,
public LocationBarTesting,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
LocationBarViewMac(AutocompleteTextField* field,
CommandUpdater* command_updater,
@@ -149,8 +149,8 @@ class LocationBarViewMac : public AutocompleteEditController,
// Overridden from NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// Posts |notification| to the default notification center.
@@ -221,7 +221,7 @@ class LocationBarViewMac : public AutocompleteEditController,
content::PageTransition transition_;
// Used to register for notifications received by NotificationObserver.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Used to schedule a task for the first run info bubble.
base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_;
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 a8f5092..33e5d0d 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
@@ -186,7 +186,7 @@ void LocationBarViewMac::UpdatePageActions() {
if (page_action_decorations_.size() != count_before) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
- Source<LocationBar>(this),
+ content::Source<LocationBar>(this),
NotificationService::NoDetails());
}
}
@@ -198,7 +198,7 @@ void LocationBarViewMac::InvalidatePageActions() {
if (page_action_decorations_.size() != count_before) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
- Source<LocationBar>(this),
+ content::Source<LocationBar>(this),
NotificationService::NoDetails());
}
}
@@ -480,8 +480,8 @@ NSImage* LocationBarViewMac::GetKeywordImage(const string16& keyword) {
}
void LocationBarViewMac::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED: {
TabContents* contents = GetTabContents();
diff --git a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h
index 39bb38c..8325a60 100644
--- a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h
@@ -21,7 +21,7 @@ class TabContents;
class PageActionDecoration : public ImageDecoration,
public ImageLoadingTracker::Observer,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
PageActionDecoration(LocationBarViewMac* owner,
Profile* profile,
@@ -60,8 +60,8 @@ class PageActionDecoration : public ImageDecoration,
private:
// Overridden from NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// The location bar view that owns us.
LocationBarViewMac* owner_;
@@ -102,7 +102,7 @@ class PageActionDecoration : public ImageDecoration,
// Used to register for notifications received by
// NotificationObserver.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(PageActionDecoration);
};
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 40425f1..00c19b9 100644
--- a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
@@ -61,7 +61,7 @@ PageActionDecoration::PageActionDecoration(
}
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
// We set the owner last of all so that we can determine whether we are in
// the process of initializing this class or not.
@@ -188,8 +188,8 @@ void PageActionDecoration::UpdateVisibility(TabContents* contents,
SetVisible(visible);
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
- Source<ExtensionAction>(page_action_),
- Details<TabContents>(contents));
+ content::Source<ExtensionAction>(page_action_),
+ content::Details<TabContents>(contents));
}
}
@@ -242,8 +242,8 @@ NSMenu* PageActionDecoration::GetMenu() {
void PageActionDecoration::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE: {
ExtensionPopupController* popup = [ExtensionPopupController popup];
diff --git a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
index 8d4db4a..db10dc9 100644
--- a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
@@ -9,10 +9,10 @@
#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_details.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
@interface TabContentsController(Private)
@@ -26,18 +26,18 @@
// A supporting C++ bridge object to register for TabContents notifications.
-class TabContentsNotificationBridge : public NotificationObserver {
+class TabContentsNotificationBridge : public content::NotificationObserver {
public:
explicit TabContentsNotificationBridge(TabContentsController* controller);
- // Overriden from NotificationObserver.
+ // Overriden from content::NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Register for |contents|'s notifications, remove all prior registrations.
void ChangeTabContents(TabContents* contents);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
TabContentsController* controller_; // weak, owns us
};
@@ -48,11 +48,11 @@ TabContentsNotificationBridge::TabContentsNotificationBridge(
void TabContentsNotificationBridge::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED) {
RenderViewHostSwitchedDetails* switched_details =
- Details<RenderViewHostSwitchedDetails>(details).ptr();
+ content::Details<RenderViewHostSwitchedDetails>(details).ptr();
[controller_ tabContentsRenderViewHostChanged:switched_details->old_host
newHost:switched_details->new_host];
} else {
@@ -63,9 +63,10 @@ void TabContentsNotificationBridge::Observe(
void TabContentsNotificationBridge::ChangeTabContents(TabContents* contents) {
registrar_.RemoveAll();
if (contents) {
- registrar_.Add(this,
- content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
- Source<NavigationController>(&contents->controller()));
+ registrar_.Add(
+ this,
+ content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
+ content::Source<NavigationController>(&contents->controller()));
}
}
diff --git a/chrome/browser/ui/cocoa/theme_install_bubble_view.h b/chrome/browser/ui/cocoa/theme_install_bubble_view.h
index 83f2cc2..8d1c9ec 100644
--- a/chrome/browser/ui/cocoa/theme_install_bubble_view.h
+++ b/chrome/browser/ui/cocoa/theme_install_bubble_view.h
@@ -6,8 +6,8 @@
#define CHROME_BROWSER_UI_COCOA_THEME_INSTALL_BUBBLE_VIEW_H_
#pragma once
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
@class NSWindow;
@class ThemeInstallBubbleViewCocoa;
@@ -25,14 +25,14 @@
// between install begin and theme caching seizing the UI thread), the loading
// bubble will only appear over the first window, as there is only ever one
// instance of the bubble.
-class ThemeInstallBubbleView : public NotificationObserver {
+class ThemeInstallBubbleView : public content::NotificationObserver {
public:
virtual ~ThemeInstallBubbleView();
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Show the loading bubble.
static void Show(NSWindow* window);
@@ -44,7 +44,7 @@ class ThemeInstallBubbleView : public NotificationObserver {
static ThemeInstallBubbleView* view_;
// A scoped container for notification registries.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Shut down the popup and remove our notifications.
void Close();
diff --git a/chrome/browser/ui/cocoa/theme_install_bubble_view.mm b/chrome/browser/ui/cocoa/theme_install_bubble_view.mm
index bd23add..60d433e 100644
--- a/chrome/browser/ui/cocoa/theme_install_bubble_view.mm
+++ b/chrome/browser/ui/cocoa/theme_install_bubble_view.mm
@@ -113,9 +113,10 @@ void ThemeInstallBubbleView::Close() {
}
}
-void ThemeInstallBubbleView::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ThemeInstallBubbleView::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
Close();
}
diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
index 150b69e..b9d2a8c 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
@@ -48,9 +48,9 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -99,20 +99,20 @@ namespace ToolbarControllerInternal {
// A class registered for C++ notifications. This is used to detect changes in
// preferences and upgrade available notifications. Bridges the notification
// back to the ToolbarController.
-class NotificationBridge : public NotificationObserver {
+class NotificationBridge : public content::NotificationObserver {
public:
explicit NotificationBridge(ToolbarController* controller)
: controller_(controller) {
registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED,
- Source<Profile>([controller browser]->profile()));
+ content::Source<Profile>([controller browser]->profile()));
}
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_PREF_CHANGED:
[controller_ prefChanged:Details<std::string>(details).ptr()];
@@ -129,7 +129,7 @@ class NotificationBridge : public NotificationObserver {
private:
ToolbarController* controller_; // weak, owns us
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
} // namespace ToolbarControllerInternal
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 928447a..c993587 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
+++ b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
@@ -20,9 +20,9 @@
#include "chrome/browser/ui/toolbar/wrench_menu_model.h"
#include "chrome/browser/profiles/profile.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -60,7 +60,7 @@ class AcceleratorDelegate : public ui::AcceleratorProvider {
}
};
-class ZoomLevelObserver : public NotificationObserver {
+class ZoomLevelObserver : public content::NotificationObserver {
public:
explicit ZoomLevelObserver(WrenchMenuController* controller)
: controller_(controller) {
@@ -69,12 +69,12 @@ class ZoomLevelObserver : public NotificationObserver {
}
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(type, content::NOTIFICATION_ZOOM_LEVEL_CHANGED);
WrenchMenuModel* wrenchMenuModel = [controller_ wrenchMenuModel];
if (wrenchMenuModel->browser()->profile()->GetHostZoomMap() !=
- Source<HostZoomMap>(source).ptr()) {
+ content::Source<HostZoomMap>(source).ptr()) {
return;
}
@@ -85,7 +85,7 @@ class ZoomLevelObserver : public NotificationObserver {
}
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
WrenchMenuController* controller_; // Weak; owns this.
};
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 c2b8439..5c7ffd3 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -329,7 +329,8 @@ class ContentSettingCookiesBubbleModel : public ContentSettingSingleRadioGroup {
return;
NotificationService::current()->Notify(
chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN,
- Source<TabSpecificContentSettings>(tab_contents()->content_settings()),
+ content::Source<TabSpecificContentSettings>(
+ tab_contents()->content_settings()),
NotificationService::NoDetails());
browser()->ShowCollectedCookiesDialog(tab_contents());
}
@@ -513,9 +514,9 @@ ContentSettingBubbleModel::ContentSettingBubbleModel(
profile_(profile),
content_type_(content_type) {
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents->tab_contents()));
+ content::Source<TabContents>(tab_contents->tab_contents()));
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
- Source<Profile>(profile_));
+ content::Source<Profile>(profile_));
}
ContentSettingBubbleModel::~ContentSettingBubbleModel() {
@@ -541,16 +542,18 @@ void ContentSettingBubbleModel::AddBlockedResource(
bubble_content_.resource_identifiers.insert(resource_identifier);
}
-void ContentSettingBubbleModel::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ContentSettingBubbleModel::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_TAB_CONTENTS_DESTROYED:
- DCHECK(source == Source<TabContents>(tab_contents_->tab_contents()));
+ DCHECK(source ==
+ content::Source<TabContents>(tab_contents_->tab_contents()));
tab_contents_ = NULL;
break;
case chrome::NOTIFICATION_PROFILE_DESTROYED:
- DCHECK(source == Source<Profile>(profile_));
+ DCHECK(source == content::Source<Profile>(profile_));
profile_ = NULL;
break;
default:
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.h b/chrome/browser/ui/content_settings/content_setting_bubble_model.h
index f3130af..ff787fb 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.h
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.h
@@ -12,8 +12,8 @@
#include "base/compiler_specific.h"
#include "chrome/common/content_settings.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -23,7 +23,7 @@ class TabContentsWrapper;
// This model provides data for ContentSettingBubble, and also controls
// the action triggered when the allow / block radio buttons are triggered.
-class ContentSettingBubbleModel : public NotificationObserver {
+class ContentSettingBubbleModel : public content::NotificationObserver {
public:
virtual ~ContentSettingBubbleModel();
@@ -80,10 +80,10 @@ class ContentSettingBubbleModel : public NotificationObserver {
const BubbleContent& bubble_content() const { return bubble_content_; }
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
virtual void OnRadioClicked(int radio_index) {}
virtual void OnPopupClicked(int index) {}
@@ -124,7 +124,7 @@ class ContentSettingBubbleModel : public NotificationObserver {
ContentSettingsType content_type_;
BubbleContent bubble_content_;
// A registrar for listening for TAB_CONTENTS_DESTROYED notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(ContentSettingBubbleModel);
};
diff --git a/chrome/browser/ui/find_bar/find_bar_controller.cc b/chrome/browser/ui/find_bar/find_bar_controller.cc
index 3a251f0..87bed69 100644
--- a/chrome/browser/ui/find_bar/find_bar_controller.cc
+++ b/chrome/browser/ui/find_bar/find_bar_controller.cc
@@ -15,8 +15,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/navigation_entry.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "ui/gfx/rect.h"
// The minimum space between the FindInPage window and the search result.
@@ -86,9 +86,10 @@ void FindBarController::ChangeTabContents(TabContentsWrapper* contents) {
return;
registrar_.Add(this, chrome::NOTIFICATION_FIND_RESULT_AVAILABLE,
- Source<TabContents>(tab_contents_->tab_contents()));
- registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(&tab_contents_->controller()));
+ content::Source<TabContents>(tab_contents_->tab_contents()));
+ registrar_.Add(
+ this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
+ content::Source<NavigationController>(&tab_contents_->controller()));
MaybeSetPrepopulateText();
@@ -105,16 +106,17 @@ void FindBarController::ChangeTabContents(TabContentsWrapper* contents) {
}
////////////////////////////////////////////////////////////////////////////////
-// FindBarHost, NotificationObserver implementation:
+// FindBarHost, content::NotificationObserver implementation:
void FindBarController::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
FindTabHelper* find_tab_helper = tab_contents_->find_tab_helper();
if (type == chrome::NOTIFICATION_FIND_RESULT_AVAILABLE) {
// Don't update for notifications from TabContentses other than the one we
// are actively tracking.
- if (Source<TabContents>(source).ptr() == tab_contents_->tab_contents()) {
+ if (content::Source<TabContents>(source).ptr() ==
+ tab_contents_->tab_contents()) {
UpdateFindBarForCurrentResult();
if (find_tab_helper->find_result().final_update() &&
find_tab_helper->find_result().number_of_matches() == 0) {
@@ -126,10 +128,10 @@ void FindBarController::Observe(int type,
}
} else if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
NavigationController* source_controller =
- Source<NavigationController>(source).ptr();
+ content::Source<NavigationController>(source).ptr();
if (source_controller == &tab_contents_->controller()) {
content::LoadCommittedDetails* commit_details =
- Details<content::LoadCommittedDetails>(details).ptr();
+ content::Details<content::LoadCommittedDetails>(details).ptr();
content::PageTransition transition_type =
commit_details->entry->transition_type();
// We hide the FindInPage window when the user navigates away, except on
diff --git a/chrome/browser/ui/find_bar/find_bar_controller.h b/chrome/browser/ui/find_bar/find_bar_controller.h
index 6a8e01b..e9ccd3a 100644
--- a/chrome/browser/ui/find_bar/find_bar_controller.h
+++ b/chrome/browser/ui/find_bar/find_bar_controller.h
@@ -8,8 +8,8 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
namespace gfx {
class Rect;
@@ -18,7 +18,7 @@ class Rect;
class FindBar;
class TabContentsWrapper;
-class FindBarController : public NotificationObserver {
+class FindBarController : public content::NotificationObserver {
public:
// An enum listing the possible actions to take on a find-in-page selection.
enum SelectionAction {
@@ -45,10 +45,10 @@ class FindBarController : public NotificationObserver {
// the user switches tabs in the Browser window. |contents| can be NULL.
void ChangeTabContents(TabContentsWrapper* contents);
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
FindBar* find_bar() const { return find_bar_.get(); }
@@ -72,7 +72,7 @@ class FindBarController : public NotificationObserver {
// Mac.
void MaybeSetPrepopulateText();
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
scoped_ptr<FindBar> find_bar_;
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 3053366..a0966ec 100644
--- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
+++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
@@ -584,7 +584,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindDisappearOnNavigate) {
// Reload the tab and make sure Find window doesn't go away.
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
@@ -1109,7 +1109,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, ActivateLinkNavigatesPage) {
// End the find session, click on the link.
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->controller()));
tab->find_tab_helper()->StopFinding(FindBarController::kActivateSelection);
observer.Wait();
}
diff --git a/chrome/browser/ui/find_bar/find_tab_helper.cc b/chrome/browser/ui/find_bar/find_tab_helper.cc
index d2eba07..3fff646 100644
--- a/chrome/browser/ui/find_bar/find_tab_helper.cc
+++ b/chrome/browser/ui/find_bar/find_tab_helper.cc
@@ -148,7 +148,7 @@ void FindTabHelper::HandleFindReply(int request_id,
final_update);
NotificationService::current()->Notify(
chrome::NOTIFICATION_FIND_RESULT_AVAILABLE,
- Source<TabContents>(tab_contents()),
- Details<FindNotificationDetails>(&last_search_result_));
+ 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 995020b9..30a4b7bb 100644
--- a/chrome/browser/ui/global_error_service.cc
+++ b/chrome/browser/ui/global_error_service.cc
@@ -62,6 +62,6 @@ GlobalError* GlobalErrorService::GetFirstGlobalErrorWithBubbleView() const {
void GlobalErrorService::NotifyErrorsChanged(GlobalError* error) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED,
- Source<Profile>(profile_),
- Details<GlobalError>(error));
+ 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 f03aed3..625975c 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
@@ -158,7 +158,7 @@ BookmarkBarGtk::BookmarkBarGtk(BrowserWindowGtk* window,
BookmarkBar::DONT_ANIMATE_STATE_CHANGE);
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
edit_bookmarks_enabled_.Init(prefs::kEditBookmarksEnabled,
profile->GetPrefs(), this);
@@ -954,8 +954,8 @@ void BookmarkBarGtk::BookmarkNodeChildrenReordered(BookmarkModel* model,
}
void BookmarkBarGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) {
if (model_ && model_->IsLoaded()) {
// Regenerate the bookmark bar with all new objects with their theme
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h
index 4bb10f4..5469cb9 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h
@@ -21,8 +21,8 @@
#include "chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h"
#include "chrome/browser/ui/gtk/menu_bar_helper.h"
#include "chrome/browser/ui/gtk/view_id_util.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/animation/animation.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/slide_animation.h"
@@ -44,7 +44,7 @@ class BookmarkBarGtk : public ui::AnimationDelegate,
public ProfileSyncServiceObserver,
public BookmarkModelObserver,
public MenuBarHelper::Delegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public BookmarkBarInstructionsGtk::Delegate,
public BookmarkContextMenuControllerDelegate {
public:
@@ -233,10 +233,10 @@ class BookmarkBarGtk : public ui::AnimationDelegate,
virtual void BookmarkNodeChildrenReordered(BookmarkModel* model,
const BookmarkNode* node) OVERRIDE;
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
GtkWidget* CreateBookmarkButton(const BookmarkNode* node);
GtkToolItem* CreateBookmarkToolItem(const BookmarkNode* node);
@@ -395,7 +395,7 @@ class BookmarkBarGtk : public ui::AnimationDelegate,
// need to respond to.
int last_allocation_width_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The size of the tab contents last time we forced a paint. We keep track
// of this so we don't force too many paints.
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 fc070ec..395f929b 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc
@@ -49,13 +49,14 @@ BookmarkBarInstructionsGtk::BookmarkBarInstructionsGtk(Delegate* delegate,
NULL);
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
}
-void BookmarkBarInstructionsGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void BookmarkBarInstructionsGtk::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED)
UpdateColors();
}
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h
index 07cddc8..44d2d6e 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h
@@ -7,15 +7,15 @@
#pragma once
#include "base/basictypes.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/gtk/gtk_signal.h"
typedef struct _GtkWidget GtkWidget;
class GtkThemeService;
class Profile;
-class BookmarkBarInstructionsGtk : public NotificationObserver {
+class BookmarkBarInstructionsGtk : public content::NotificationObserver {
public:
// The delegate is notified once the user clicks on the link to import
// bookmarks.
@@ -33,10 +33,10 @@ class BookmarkBarInstructionsGtk : public NotificationObserver {
GtkWidget* widget() const { return instructions_hbox_; }
private:
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
CHROMEGTK_CALLBACK_0(BookmarkBarInstructionsGtk, void, OnButtonClick);
@@ -54,7 +54,7 @@ class BookmarkBarInstructionsGtk : public NotificationObserver {
GtkWidget* instructions_label_;
GtkWidget* instructions_link_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(BookmarkBarInstructionsGtk);
};
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
index 558efef..3a148a8 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
@@ -61,13 +61,13 @@ void BookmarkBubbleGtk::BubbleClosing(BubbleGtk* bubble,
NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_BUBBLE_HIDDEN,
- Source<Profile>(profile_->GetOriginalProfile()),
+ content::Source<Profile>(profile_->GetOriginalProfile()),
NotificationService::NoDetails());
}
void BookmarkBubbleGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
if (theme_service_->UsingNativeTheme()) {
@@ -190,7 +190,7 @@ BookmarkBubbleGtk::BookmarkBubbleGtk(GtkWidget* anchor,
G_CALLBACK(&OnRemoveClickedThunk), this);
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
}
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h
index 247fcdb..7d9cf53 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h
@@ -22,8 +22,8 @@
#include "base/memory/weak_ptr.h"
#include "base/task.h"
#include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
#include "ui/base/gtk/gtk_signal.h"
@@ -35,7 +35,7 @@ typedef struct _GtkWidget GtkWidget;
typedef struct _GParamSpec GParamSpec;
class BookmarkBubbleGtk : public BubbleDelegateGtk,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// Shows the bookmark bubble, pointing at |anchor_widget|.
static void Show(GtkWidget* anchor_widget,
@@ -46,10 +46,10 @@ class BookmarkBubbleGtk : public BubbleDelegateGtk,
// BubbleDelegateGtk:
virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE;
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
BookmarkBubbleGtk(GtkWidget* anchor,
@@ -120,7 +120,7 @@ class BookmarkBubbleGtk : public BubbleDelegateGtk,
bool apply_edits_;
bool remove_bookmark_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleGtk);
};
diff --git a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
index 3567ce3..6209bf9 100644
--- a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
@@ -32,9 +32,9 @@
#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_details.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
#include "grit/ui_resources.h"
@@ -82,7 +82,7 @@ gint WidthForIconCount(gint icon_count) {
using ui::SimpleMenuModel;
-class BrowserActionButton : public NotificationObserver,
+class BrowserActionButton : public content::NotificationObserver,
public ImageLoadingTracker::Observer,
public ExtensionContextMenuModel::PopupDelegate,
public MenuGtk::Delegate {
@@ -130,8 +130,9 @@ class BrowserActionButton : public NotificationObserver,
signals_.ConnectAfter(widget(), "expose-event",
G_CALLBACK(OnExposeEvent), this);
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
- Source<ExtensionAction>(extension->browser_action()));
+ registrar_.Add(
+ this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
+ content::Source<ExtensionAction>(extension->browser_action()));
}
~BrowserActionButton() {
@@ -152,8 +153,8 @@ class BrowserActionButton : public NotificationObserver,
// NotificationObserver implementation.
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED)
UpdateState();
else
@@ -354,7 +355,7 @@ class BrowserActionButton : public NotificationObserver,
SkBitmap default_skbitmap_;
ui::GtkSignalRegistrar signals_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The context menu view and model for this extension action.
scoped_ptr<MenuGtk> context_menu_;
@@ -452,7 +453,7 @@ BrowserActionsToolbarGtk::BrowserActionsToolbarGtk(Browser* browser)
registrar_.Add(this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
}
@@ -478,9 +479,10 @@ void BrowserActionsToolbarGtk::Update() {
}
}
-void BrowserActionsToolbarGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void BrowserActionsToolbarGtk::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(chrome::NOTIFICATION_BROWSER_THEME_CHANGED == type);
gtk_widget_set_visible(separator_, theme_service_->UsingNativeTheme());
}
diff --git a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h
index ab04fea..2dae108 100644
--- a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h
+++ b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h
@@ -15,8 +15,8 @@
#include "chrome/browser/ui/gtk/custom_button.h"
#include "chrome/browser/ui/gtk/menu_gtk.h"
#include "chrome/browser/ui/gtk/overflow_button.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/gtk/gtk_signal.h"
@@ -37,7 +37,7 @@ class BrowserActionsToolbarGtk : public ExtensionToolbarModel::Observer,
public ui::AnimationDelegate,
public MenuGtk::Delegate,
public ui::SimpleMenuModel::Delegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit BrowserActionsToolbarGtk(Browser* browser);
virtual ~BrowserActionsToolbarGtk();
@@ -60,10 +60,10 @@ class BrowserActionsToolbarGtk : public ExtensionToolbarModel::Observer,
// Update the display of all buttons.
void Update();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
bool animating() {
return resize_animation_.is_animating();
@@ -213,7 +213,7 @@ class BrowserActionsToolbarGtk : public ExtensionToolbarModel::Observer,
ui::GtkSignalRegistrar signals_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtrFactory<BrowserActionsToolbarGtk> weak_factory_;
diff --git a/chrome/browser/ui/gtk/browser_titlebar.cc b/chrome/browser/ui/gtk/browser_titlebar.cc
index a1231f6..87a0f79 100644
--- a/chrome/browser/ui/gtk/browser_titlebar.cc
+++ b/chrome/browser/ui/gtk/browser_titlebar.cc
@@ -406,7 +406,7 @@ void BrowserTitlebar::Init() {
theme_service_ = GtkThemeService::GetFrom(
browser_window_->browser()->profile());
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
UpdateTitleAndIcon();
}
@@ -991,8 +991,8 @@ bool BrowserTitlebar::GetAcceleratorForCommandId(
}
void BrowserTitlebar::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_BROWSER_THEME_CHANGED:
UpdateTextColor();
diff --git a/chrome/browser/ui/gtk/browser_titlebar.h b/chrome/browser/ui/gtk/browser_titlebar.h
index bb4c6fb..d929278 100644
--- a/chrome/browser/ui/gtk/browser_titlebar.h
+++ b/chrome/browser/ui/gtk/browser_titlebar.h
@@ -15,8 +15,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/prefs/pref_member.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/models/simple_menu_model.h"
#include "ui/base/x/active_window_watcher_x.h"
@@ -29,7 +29,7 @@ class MenuGtk;
class PopupPageMenuModel;
class TabContents;
-class BrowserTitlebar : public NotificationObserver,
+class BrowserTitlebar : public content::NotificationObserver,
public ui::ActiveWindowWatcherX::Observer,
public ui::SimpleMenuModel::Delegate {
public:
@@ -166,10 +166,10 @@ class BrowserTitlebar : public NotificationObserver,
virtual bool GetAcceleratorForCommandId(int command_id,
ui::Accelerator* accelerator);
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Overriden from ActiveWindowWatcher::Observer.
virtual void ActiveWindowChanged(GdkWindow* active_window);
@@ -274,7 +274,7 @@ class BrowserTitlebar : public NotificationObserver,
// Theme provider for building buttons.
GtkThemeService* theme_service_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
#endif // CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_
diff --git a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
index 2b2cd692..1380dc2 100644
--- a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
@@ -44,8 +44,8 @@
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_details.h"
#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -105,7 +105,7 @@ BrowserToolbarGtk::BrowserToolbarGtk(Browser* browser, BrowserWindowGtk* window)
NotificationService::AllSources());
registrar_.Add(this,
chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED,
- Source<Profile>(browser_->profile()));
+ content::Source<Profile>(browser_->profile()));
}
BrowserToolbarGtk::~BrowserToolbarGtk() {
@@ -124,7 +124,7 @@ void BrowserToolbarGtk::Init(GtkWindow* top_level_window) {
theme_service_ = GtkThemeService::GetFrom(profile);
registrar_.Add(this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
offscreen_entry_.Own(gtk_entry_new());
@@ -228,7 +228,7 @@ void BrowserToolbarGtk::Init(GtkWindow* top_level_window) {
wrench_menu_model_->bookmark_sub_menu_model()->SetMenuGtk(wrench_menu_.get());
registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
- Source<HostZoomMap>(profile->GetHostZoomMap()));
+ content::Source<HostZoomMap>(profile->GetHostZoomMap()));
if (ShouldOnlyShowLocation()) {
gtk_widget_show(event_box_);
@@ -354,13 +354,13 @@ bool BrowserToolbarGtk::GetAcceleratorForCommandId(
return !!accelerator_gtk;
}
-// NotificationObserver --------------------------------------------------------
+// content::NotificationObserver -----------------------------------------------
void BrowserToolbarGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED) {
- NotifyPrefChanged(Details<std::string>(details).ptr());
+ NotifyPrefChanged(content::Details<std::string>(details).ptr());
} else if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) {
// Update the spacing around the menu buttons
bool use_gtk = theme_service_->UsingNativeTheme();
diff --git a/chrome/browser/ui/gtk/browser_toolbar_gtk.h b/chrome/browser/ui/gtk/browser_toolbar_gtk.h
index e66dd30..e51b1721 100644
--- a/chrome/browser/ui/gtk/browser_toolbar_gtk.h
+++ b/chrome/browser/ui/gtk/browser_toolbar_gtk.h
@@ -15,8 +15,8 @@
#include "chrome/browser/ui/gtk/custom_button.h"
#include "chrome/browser/ui/gtk/menu_gtk.h"
#include "chrome/browser/ui/toolbar/wrench_menu_model.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/gtk/gtk_signal_registrar.h"
#include "ui/base/gtk/owned_widget_gtk.h"
@@ -40,7 +40,7 @@ class ToolbarModel;
class BrowserToolbarGtk : public CommandUpdater::CommandObserver,
public ui::AcceleratorProvider,
public MenuGtk::Delegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
BrowserToolbarGtk(Browser* browser, BrowserWindowGtk* window);
virtual ~BrowserToolbarGtk();
@@ -95,10 +95,10 @@ class BrowserToolbarGtk : public CommandUpdater::CommandObserver,
virtual bool GetAcceleratorForCommandId(int id,
ui::Accelerator* accelerator);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Message that we should react to a state change.
void UpdateTabContents(TabContents* contents, bool should_restore_state);
@@ -204,7 +204,7 @@ class BrowserToolbarGtk : public CommandUpdater::CommandObserver,
StringPrefMember home_page_;
BooleanPrefMember home_page_is_new_tab_page_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// A GtkEntry that isn't part of the hierarchy. We keep this for native
// rendering.
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc
index 5a2d325..dd196c0 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc
@@ -1201,11 +1201,11 @@ void BrowserWindowGtk::ConfirmBrowserCloseWithPendingDownloads() {
}
void BrowserWindowGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_PREF_CHANGED: {
- std::string* pref_name = Details<std::string>(details).ptr();
+ std::string* pref_name = content::Details<std::string>(details).ptr();
if (*pref_name == prefs::kUseCustomChromeFrame) {
UpdateCustomFrame();
} else {
@@ -1531,7 +1531,7 @@ bool BrowserWindowGtk::CanClose() const {
// Empty TabStripModel, it's now safe to allow the Window to be closed.
NotificationService::current()->Notify(
chrome::NOTIFICATION_WINDOW_CLOSED,
- Source<GtkWindow>(window_),
+ content::Source<GtkWindow>(window_),
NotificationService::NoDetails());
return true;
}
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.h b/chrome/browser/ui/gtk/browser_window_gtk.h
index 30e50de..f1af45e 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.h
+++ b/chrome/browser/ui/gtk/browser_window_gtk.h
@@ -43,7 +43,7 @@ class TabStripGtk;
// it needs to manipulate the window.
class BrowserWindowGtk : public BrowserWindow,
- public NotificationObserver,
+ public content::NotificationObserver,
public TabStripModelObserver,
public ui::ActiveWindowWatcherX::Observer,
public InfoBarContainer::Delegate {
@@ -156,8 +156,8 @@ class BrowserWindowGtk : public BrowserWindow,
// Overridden from NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Overridden from TabStripModelObserver:
virtual void TabDetachedAt(TabContentsWrapper* contents, int index);
diff --git a/chrome/browser/ui/gtk/bubble/bubble_gtk.cc b/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
index e93506a..3a3962a 100644
--- a/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
@@ -178,7 +178,7 @@ void BubbleGtk::Init(GtkWidget* anchor_widget,
}
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
}
@@ -342,8 +342,8 @@ void BubbleGtk::StackWindow() {
}
void BubbleGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(type, chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
if (theme_service_->UsingNativeTheme() && match_system_theme_) {
gtk_widget_modify_bg(window_, GTK_STATE_NORMAL, NULL);
diff --git a/chrome/browser/ui/gtk/bubble/bubble_gtk.h b/chrome/browser/ui/gtk/bubble/bubble_gtk.h
index d5d5958..c9ad7d3 100644
--- a/chrome/browser/ui/gtk/bubble/bubble_gtk.h
+++ b/chrome/browser/ui/gtk/bubble/bubble_gtk.h
@@ -12,8 +12,8 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/gtk/gtk_signal_registrar.h"
#include "ui/gfx/point.h"
@@ -46,7 +46,7 @@ class BubbleDelegateGtk {
// BubbleDelegateGtk::BubbleClosing(). Then the widgets and the underlying
// object will be destroyed. You can also close and destroy the bubble by
// calling Close().
-class BubbleGtk : public NotificationObserver {
+class BubbleGtk : public content::NotificationObserver {
public:
// Where should the arrow be placed relative to the bubble?
enum ArrowLocationGtk {
@@ -76,10 +76,10 @@ class BubbleGtk : public NotificationObserver {
// so you shouldn't hold a BubbleGtk pointer after calling Close().
void Close();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// If the content contains widgets that can steal our pointer and keyboard
// grabs (e.g. GtkComboBox), this method should be called after a widget
@@ -206,7 +206,7 @@ class BubbleGtk : public NotificationObserver {
bool closed_by_escape_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
ui::GtkSignalRegistrar signals_;
diff --git a/chrome/browser/ui/gtk/collected_cookies_gtk.cc b/chrome/browser/ui/gtk/collected_cookies_gtk.cc
index e175f60..21425f6 100644
--- a/chrome/browser/ui/gtk/collected_cookies_gtk.cc
+++ b/chrome/browser/ui/gtk/collected_cookies_gtk.cc
@@ -17,7 +17,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "ui/base/gtk/gtk_hig_constants.h"
#include "ui/base/l10n/l10n_util.h"
@@ -85,7 +85,7 @@ CollectedCookiesGtk::CollectedCookiesGtk(GtkWindow* parent,
: wrapper_(wrapper),
status_changed_(false) {
registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN,
- Source<TabSpecificContentSettings>(
+ content::Source<TabSpecificContentSettings>(
wrapper->content_settings()));
Init();
@@ -420,8 +420,8 @@ void CollectedCookiesGtk::EnableControls() {
}
void CollectedCookiesGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN);
window_->CloseConstrainedWindow();
}
diff --git a/chrome/browser/ui/gtk/collected_cookies_gtk.h b/chrome/browser/ui/gtk/collected_cookies_gtk.h
index 18d739e..9b1754d 100644
--- a/chrome/browser/ui/gtk/collected_cookies_gtk.h
+++ b/chrome/browser/ui/gtk/collected_cookies_gtk.h
@@ -14,8 +14,8 @@
#include "chrome/browser/ui/gtk/constrained_window_gtk.h"
#include "chrome/browser/ui/gtk/gtk_tree.h"
#include "chrome/common/content_settings.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/gtk/gtk_signal.h"
class CookiesTreeModel;
@@ -28,7 +28,7 @@ class TabContentsWrapper;
class CollectedCookiesGtk : public ConstrainedWindowGtkDelegate,
public gtk_tree::TreeAdapter::Delegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
CollectedCookiesGtk(GtkWindow* parent, TabContentsWrapper* wrapper);
@@ -57,8 +57,8 @@ class CollectedCookiesGtk : public ConstrainedWindowGtkDelegate,
// Notification Observer implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Create the information panes for the allowed and blocked cookies.
GtkWidget* CreateAllowedPane();
@@ -82,7 +82,7 @@ class CollectedCookiesGtk : public ConstrainedWindowGtkDelegate,
CHROMEGTK_CALLBACK_2(CollectedCookiesGtk, void, OnSwitchPage,
gpointer, guint);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
ConstrainedWindow* window_;
diff --git a/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc b/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc
index 2ce72b3..a27fb3f 100644
--- a/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc
+++ b/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/ui/webui/html_dialog_ui.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "ui/base/gtk/gtk_hig_constants.h"
#include "ui/gfx/rect.h"
diff --git a/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc b/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc
index b8e4622..821bf32 100644
--- a/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc
@@ -18,7 +18,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/common/content_settings.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/generated_resources.h"
#include "grit/ui_resources.h"
@@ -60,7 +60,7 @@ ContentSettingBubbleGtk::ContentSettingBubbleGtk(
content_setting_bubble_model_(content_setting_bubble_model),
bubble_(NULL) {
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
BuildBubble();
}
@@ -78,11 +78,12 @@ void ContentSettingBubbleGtk::BubbleClosing(BubbleGtk* bubble,
delete this;
}
-void ContentSettingBubbleGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ContentSettingBubbleGtk::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED);
- DCHECK(source == Source<TabContents>(tab_contents_));
+ DCHECK(source == content::Source<TabContents>(tab_contents_));
tab_contents_ = NULL;
}
diff --git a/chrome/browser/ui/gtk/content_setting_bubble_gtk.h b/chrome/browser/ui/gtk/content_setting_bubble_gtk.h
index edad286..b6b2b6a 100644
--- a/chrome/browser/ui/gtk/content_setting_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/content_setting_bubble_gtk.h
@@ -12,8 +12,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
#include "chrome/common/content_settings_types.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/gtk/gtk_signal.h"
class ContentSettingBubbleModel;
@@ -25,7 +25,7 @@ class TabContents;
// and when clicked, an instance of this class is created specialized for the
// type of content being blocked.
class ContentSettingBubbleGtk : public BubbleDelegateGtk,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
ContentSettingBubbleGtk(
GtkWidget* anchor,
@@ -43,10 +43,10 @@ class ContentSettingBubbleGtk : public BubbleDelegateGtk,
// BubbleDelegateGtk:
virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE;
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Builds the bubble and all the widgets that it displays.
void BuildBubble();
@@ -70,7 +70,7 @@ class ContentSettingBubbleGtk : public BubbleDelegateGtk,
TabContents* tab_contents_;
// A registrar for listening for TAB_CONTENTS_DESTROYED notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Pass on delegate messages to this.
BubbleDelegateGtk* delegate_;
diff --git a/chrome/browser/ui/gtk/custom_button.cc b/chrome/browser/ui/gtk/custom_button.cc
index 0deabf3..1d7f8e4 100644
--- a/chrome/browser/ui/gtk/custom_button.cc
+++ b/chrome/browser/ui/gtk/custom_button.cc
@@ -41,7 +41,7 @@ CustomDrawButtonBase::CustomDrawButtonBase(GtkThemeService* theme_provider,
registrar_.Add(this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_provider));
+ content::Source<ThemeService>(theme_provider));
} else {
// Load the button images from the resource bundle.
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
@@ -142,7 +142,8 @@ void CustomDrawButtonBase::SetBackground(SkColor color,
}
void CustomDrawButtonBase::Observe(int type,
- const NotificationSource& source, const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(theme_service_);
DCHECK(chrome::NOTIFICATION_BROWSER_THEME_CHANGED == type);
@@ -248,7 +249,7 @@ CustomDrawButton::CustomDrawButton(GtkThemeService* theme_provider,
theme_service_->InitThemesFor(this);
registrar_.Add(this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_provider));
+ content::Source<ThemeService>(theme_provider));
}
CustomDrawButton::CustomDrawButton(GtkThemeService* theme_provider,
@@ -267,7 +268,7 @@ CustomDrawButton::CustomDrawButton(GtkThemeService* theme_provider,
theme_service_->InitThemesFor(this);
registrar_.Add(this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_provider));
+ content::Source<ThemeService>(theme_provider));
}
CustomDrawButton::~CustomDrawButton() {
@@ -289,7 +290,8 @@ void CustomDrawButton::ForceChromeTheme() {
}
void CustomDrawButton::Observe(int type,
- const NotificationSource& source, const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(chrome::NOTIFICATION_BROWSER_THEME_CHANGED == type);
SetBrowserTheme();
}
diff --git a/chrome/browser/ui/gtk/custom_button.h b/chrome/browser/ui/gtk/custom_button.h
index b56945c..e76aaab 100644
--- a/chrome/browser/ui/gtk/custom_button.h
+++ b/chrome/browser/ui/gtk/custom_button.h
@@ -9,8 +9,8 @@
#include <gtk/gtk.h>
#include "base/memory/scoped_ptr.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/slide_animation.h"
@@ -28,7 +28,7 @@ class SkBitmap;
// CustomDrawButtonBase provides the base for building a custom drawn button.
// It handles managing the pixbufs containing all the static images used to draw
// the button. It also manages painting these pixbufs.
-class CustomDrawButtonBase : public NotificationObserver {
+class CustomDrawButtonBase : public content::NotificationObserver {
public:
// If the images come from ResourceBundle rather than the theme provider,
// pass in NULL for |theme_provider|.
@@ -56,10 +56,10 @@ class CustomDrawButtonBase : public NotificationObserver {
// Set the background details.
void SetBackground(SkColor color, SkBitmap* image, SkBitmap* mask);
- // Provide NotificationObserver implementation.
+ // Provide content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// Get the CairoCachedSurface from |surfaces_| for |state|.
@@ -89,7 +89,7 @@ class CustomDrawButtonBase : public NotificationObserver {
bool flipped_;
// Used to listen for theme change notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(CustomDrawButtonBase);
};
@@ -126,7 +126,7 @@ class CustomDrawHoverController : public ui::AnimationDelegate {
// CustomDrawButton is a plain button where all its various states are drawn
// with static images. In GTK rendering mode, it will show the standard button
// with GTK |stock_id|.
-class CustomDrawButton : public NotificationObserver {
+class CustomDrawButton : public content::NotificationObserver {
public:
// The constructor takes 4 resource ids. If a resource doesn't exist for a
// button, pass in 0.
@@ -192,10 +192,10 @@ class CustomDrawButton : public NotificationObserver {
// Set the background details.
void SetBackground(SkColor color, SkBitmap* image, SkBitmap* mask);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Returns a standard close button. Pass a |theme_provider| to use Gtk icons
// in Gtk rendering mode.
@@ -230,7 +230,7 @@ class CustomDrawButton : public NotificationObserver {
bool forcing_chrome_theme_;
// Used to listen for theme change notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(CustomDrawButton);
};
diff --git a/chrome/browser/ui/gtk/download/download_item_gtk.cc b/chrome/browser/ui/gtk/download/download_item_gtk.cc
index ea3a30e..4449d5c 100644
--- a/chrome/browser/ui/gtk/download/download_item_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_item_gtk.cc
@@ -250,7 +250,7 @@ DownloadItemGtk::DownloadItemGtk(DownloadShelfGtk* parent_shelf,
}
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
// Set the initial width of the widget to be animated.
@@ -381,8 +381,8 @@ void DownloadItemGtk::AnimationProgressed(const ui::Animation* animation) {
}
void DownloadItemGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) {
// Our GtkArrow is only visible in gtk mode. Otherwise, we let the custom
// rendering code do whatever it wants.
diff --git a/chrome/browser/ui/gtk/download/download_item_gtk.h b/chrome/browser/ui/gtk/download/download_item_gtk.h
index 9543150..6895fb3 100644
--- a/chrome/browser/ui/gtk/download/download_item_gtk.h
+++ b/chrome/browser/ui/gtk/download/download_item_gtk.h
@@ -14,8 +14,8 @@
#include "base/time.h"
#include "chrome/browser/icon_manager.h"
#include "content/browser/download/download_item.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/gtk/gtk_signal.h"
@@ -38,7 +38,7 @@ class SlideAnimation;
class DownloadItemGtk : public DownloadItem::Observer,
public ui::AnimationDelegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// DownloadItemGtk takes ownership of |download_item_model|.
DownloadItemGtk(DownloadShelfGtk* parent_shelf,
@@ -54,10 +54,10 @@ class DownloadItemGtk : public DownloadItem::Observer,
// ui::AnimationDelegate implementation.
virtual void AnimationProgressed(const ui::Animation* animation);
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Called when the icon manager has finished loading the icon. We take
// ownership of |icon_bitmap|.
@@ -228,7 +228,7 @@ class DownloadItemGtk : public DownloadItem::Observer,
// The last download file path for which we requested an icon.
FilePath icon_filepath_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The time at which we were insantiated.
base::Time creation_time_;
diff --git a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
index cc7f0a1..713ddf8 100644
--- a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
@@ -146,7 +146,7 @@ DownloadShelfGtk::DownloadShelfGtk(Browser* browser, GtkWidget* parent)
theme_service_->InitThemesFor(this);
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
gtk_widget_show_all(shelf_.get());
@@ -231,8 +231,8 @@ void DownloadShelfGtk::Closed() {
}
void DownloadShelfGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) {
GdkColor color = theme_service_->GetGdkColor(
ThemeService::COLOR_TOOLBAR);
diff --git a/chrome/browser/ui/gtk/download/download_shelf_gtk.h b/chrome/browser/ui/gtk/download/download_shelf_gtk.h
index dfc0bdc..c7aef1a 100644
--- a/chrome/browser/ui/gtk/download/download_shelf_gtk.h
+++ b/chrome/browser/ui/gtk/download/download_shelf_gtk.h
@@ -15,8 +15,8 @@
#include "base/message_loop.h"
#include "chrome/browser/download/download_shelf.h"
#include "chrome/browser/ui/gtk/slide_animator_gtk.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/gtk/owned_widget_gtk.h"
#include "ui/gfx/native_widget_types.h"
@@ -33,7 +33,7 @@ class Point;
}
class DownloadShelfGtk : public DownloadShelf,
- public NotificationObserver,
+ public content::NotificationObserver,
public SlideAnimatorGtk::Delegate,
public MessageLoopForUI::Observer {
public:
@@ -52,10 +52,10 @@ class DownloadShelfGtk : public DownloadShelf,
// SlideAnimatorGtk::Delegate implementation.
virtual void Closed();
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Returns the current height of the shelf.
int GetHeight() const;
@@ -135,7 +135,7 @@ class DownloadShelfGtk : public DownloadShelf,
// Gives us our colors and theme information.
GtkThemeService* theme_service_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// True if the shelf will automatically close when the user mouses out.
bool close_on_mouse_out_;
diff --git a/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc b/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc
index bbb1588..b0507d4 100644
--- a/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc
@@ -8,8 +8,8 @@
#include "base/message_loop.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/theme_resources.h"
#include "ui/base/animation/linear_animation.h"
@@ -31,7 +31,7 @@ const int kFrameRateHz = 60;
const double kMoveFraction = 1.0 / 3.0;
class DownloadStartedAnimationGtk : public ui::LinearAnimation,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit DownloadStartedAnimationGtk(TabContents* tab_contents);
@@ -51,8 +51,8 @@ class DownloadStartedAnimationGtk : public ui::LinearAnimation,
// NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// The top level window that floats over the browser and displays the
// image.
@@ -73,7 +73,7 @@ class DownloadStartedAnimationGtk : public ui::LinearAnimation,
gfx::Rect tab_contents_bounds_;
// A scoped container for notification registries.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(DownloadStartedAnimationGtk);
};
@@ -101,11 +101,11 @@ DownloadStartedAnimationGtk::DownloadStartedAnimationGtk(
registrar_.Add(
this,
content::NOTIFICATION_TAB_CONTENTS_HIDDEN,
- Source<TabContents>(tab_contents_));
+ content::Source<TabContents>(tab_contents_));
registrar_.Add(
this,
content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents_));
+ content::Source<TabContents>(tab_contents_));
// TODO(estade): don't show up on the wrong virtual desktop.
@@ -157,11 +157,11 @@ void DownloadStartedAnimationGtk::Close() {
registrar_.Remove(
this,
content::NOTIFICATION_TAB_CONTENTS_HIDDEN,
- Source<TabContents>(tab_contents_));
+ content::Source<TabContents>(tab_contents_));
registrar_.Remove(
this,
content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents_));
+ content::Source<TabContents>(tab_contents_));
tab_contents_ = NULL;
gtk_widget_destroy(popup_);
@@ -186,9 +186,10 @@ void DownloadStartedAnimationGtk::AnimateToState(double state) {
}
}
-void DownloadStartedAnimationGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void DownloadStartedAnimationGtk::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
Close();
}
diff --git a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc
index 4ad8254..760b194 100644
--- a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc
@@ -22,8 +22,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_action.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.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 "ui/base/l10n/l10n_util.h"
@@ -92,18 +92,20 @@ ExtensionInstalledBubbleGtk::ExtensionInstalledBubbleGtk(
// be sure that a browser action or page action has had views created which we
// can inspect for the purpose of pointing to them.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(browser->profile()));
+ content::Source<Profile>(browser->profile()));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(browser->profile()));
+ content::Source<Profile>(browser->profile()));
}
ExtensionInstalledBubbleGtk::~ExtensionInstalledBubbleGtk() {}
-void ExtensionInstalledBubbleGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ExtensionInstalledBubbleGtk::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_EXTENSION_LOADED) {
- const Extension* extension = Details<const Extension>(details).ptr();
+ const Extension* extension =
+ content::Details<const Extension>(details).ptr();
if (extension == extension_) {
// PostTask to ourself to allow all EXTENSION_LOADED Observers to run.
MessageLoopForUI::current()->PostTask(
@@ -112,7 +114,7 @@ void ExtensionInstalledBubbleGtk::Observe(int type,
}
} else if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) {
const Extension* extension =
- Details<UnloadedExtensionInfo>(details)->extension;
+ content::Details<UnloadedExtensionInfo>(details)->extension;
if (extension == extension_)
extension_ = NULL;
} else {
diff --git a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.h b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.h
index 1a06242..cb83dd0 100644
--- a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.h
@@ -11,8 +11,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
#include "chrome/browser/ui/gtk/custom_button.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "third_party/skia/include/core/SkBitmap.h"
class Browser;
@@ -33,7 +33,7 @@ class SkBitmap;
// ExtensionInstallBubble manages its own lifetime.
class ExtensionInstalledBubbleGtk
: public BubbleDelegateGtk,
- public NotificationObserver,
+ public content::NotificationObserver,
public base::RefCountedThreadSafe<ExtensionInstalledBubbleGtk> {
public:
// The behavior and content of this BubbleGtk comes in three varieties.
@@ -63,10 +63,10 @@ class ExtensionInstalledBubbleGtk
// Shows the bubble. Called internally via PostTask.
void ShowInternal();
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// BubbleDelegateGtk:
virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE;
@@ -80,7 +80,7 @@ class ExtensionInstalledBubbleGtk
const Extension* extension_;
Browser *browser_;
SkBitmap icon_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
BubbleType type_;
// The number of times to retry showing the bubble if the browser action
diff --git a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc
index 51a2bcd..3014f0f 100644
--- a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc
+++ b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc
@@ -23,8 +23,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view_gtk.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "googleurl/src/gurl.h"
ExtensionPopupGtk* ExtensionPopupGtk::current_extension_popup_ = NULL;
@@ -55,11 +55,11 @@ ExtensionPopupGtk::ExtensionPopupGtk(Browser* browser,
ShowPopup();
} else {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
- Source<Profile>(host->profile()));
+ content::Source<Profile>(host->profile()));
}
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
- Source<Profile>(host->profile()));
+ content::Source<Profile>(host->profile()));
}
ExtensionPopupGtk::~ExtensionPopupGtk() {
@@ -80,8 +80,8 @@ void ExtensionPopupGtk::Show(const GURL& url, Browser* browser,
}
void ExtensionPopupGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING:
if (Details<ExtensionHost>(host_.get()) == details)
@@ -145,7 +145,7 @@ void ExtensionPopupGtk::ShowPopup() {
DevToolsWindow::OpenDevToolsWindow(host_->render_view_host());
// Listen for the the devtools window closing.
registrar_.Add(this, content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING,
- Source<content::BrowserContext>(host_->profile()));
+ content::Source<content::BrowserContext>(host_->profile()));
}
// Only one instance should be showing at a time. Get rid of the old one, if
diff --git a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.h b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.h
index 85c4180..57ee467 100644
--- a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.h
+++ b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.h
@@ -12,15 +12,15 @@
#include "base/task.h"
#include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
#include "chrome/browser/ui/gtk/extensions/extension_view_gtk.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/rect.h"
class Browser;
class ExtensionHost;
class GURL;
-class ExtensionPopupGtk : public NotificationObserver,
+class ExtensionPopupGtk : public content::NotificationObserver,
public BubbleDelegateGtk,
public ExtensionViewGtk::Container {
public:
@@ -35,10 +35,10 @@ class ExtensionPopupGtk : public NotificationObserver,
GtkWidget* anchor,
bool inspect);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// BubbleDelegateGtk implementation.
virtual void BubbleClosing(BubbleGtk* bubble,
@@ -87,7 +87,7 @@ class ExtensionPopupGtk : public NotificationObserver,
// The widget for anchoring the position of the bubble.
GtkWidget* anchor_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
static ExtensionPopupGtk* current_extension_popup_;
diff --git a/chrome/browser/ui/gtk/find_bar_gtk.cc b/chrome/browser/ui/gtk/find_bar_gtk.cc
index 0df4fbd..1513267 100644
--- a/chrome/browser/ui/gtk/find_bar_gtk.cc
+++ b/chrome/browser/ui/gtk/find_bar_gtk.cc
@@ -301,7 +301,7 @@ void FindBarGtk::InitWidgets() {
theme_service_->InitThemesFor(this);
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
g_signal_connect(widget(), "parent-set", G_CALLBACK(OnParentSet), this);
@@ -457,8 +457,8 @@ FindBarTesting* FindBarGtk::GetFindBarTesting() {
}
void FindBarGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(type, chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
// Force reshapings of the find bar window.
diff --git a/chrome/browser/ui/gtk/find_bar_gtk.h b/chrome/browser/ui/gtk/find_bar_gtk.h
index 810b8f7..1a5b064b 100644
--- a/chrome/browser/ui/gtk/find_bar_gtk.h
+++ b/chrome/browser/ui/gtk/find_bar_gtk.h
@@ -13,8 +13,8 @@
#include "chrome/browser/ui/find_bar/find_bar.h"
#include "chrome/browser/ui/gtk/focus_store_gtk.h"
#include "chrome/browser/ui/gtk/slide_animator_gtk.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/gtk/owned_widget_gtk.h"
#include "ui/gfx/point.h"
@@ -34,7 +34,7 @@ typedef struct _GtkFloatingContainer GtkFloatingContainer;
// eventually pull out the model specific bits and share with Windows.
class FindBarGtk : public FindBar,
public FindBarTesting,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit FindBarGtk(BrowserWindowGtk* window);
virtual ~FindBarGtk();
@@ -67,10 +67,10 @@ class FindBarGtk : public FindBar,
virtual string16 GetMatchCountText();
virtual int GetWidth();
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
void InitWidgets();
@@ -234,7 +234,7 @@ class FindBarGtk : public FindBar,
// it up.
gfx::Rect selection_rect_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(FindBarGtk);
};
diff --git a/chrome/browser/ui/gtk/global_history_menu.cc b/chrome/browser/ui/gtk/global_history_menu.cc
index 93cb5bb..7028c3ba 100644
--- a/chrome/browser/ui/gtk/global_history_menu.cc
+++ b/chrome/browser/ui/gtk/global_history_menu.cc
@@ -122,7 +122,7 @@ void GlobalHistoryMenu::Init(GtkWidget* history_menu,
// Register for notification when TopSites changes so that we can update
// ourself.
registrar_.Add(this, chrome::NOTIFICATION_TOP_SITES_CHANGED,
- Source<history::TopSites>(top_sites_));
+ content::Source<history::TopSites>(top_sites_));
}
}
}
@@ -283,8 +283,8 @@ void GlobalHistoryMenu::ClearMenuCallback(GtkWidget* menu_item,
}
void GlobalHistoryMenu::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_TOP_SITES_CHANGED) {
GetTopSitesData();
} else {
diff --git a/chrome/browser/ui/gtk/global_history_menu.h b/chrome/browser/ui/gtk/global_history_menu.h
index 34356cb..446c442 100644
--- a/chrome/browser/ui/gtk/global_history_menu.h
+++ b/chrome/browser/ui/gtk/global_history_menu.h
@@ -12,8 +12,8 @@
#include "chrome/browser/sessions/tab_restore_service_observer.h"
#include "chrome/browser/ui/gtk/global_menu_owner.h"
#include "content/browser/cancelable_request.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/gtk/owned_widget_gtk.h"
@@ -27,7 +27,7 @@ typedef struct _GdkPixbuf GdkPixbuf;
// Controls the History menu.
class GlobalHistoryMenu : public GlobalMenuOwner,
- public NotificationObserver,
+ public content::NotificationObserver,
public TabRestoreServiceObserver {
public:
explicit GlobalHistoryMenu(Browser* browser);
@@ -80,10 +80,10 @@ class GlobalHistoryMenu : public GlobalMenuOwner,
// Implementation detail of ClearMenuSection.
static void ClearMenuCallback(GtkWidget* widget, ClearMenuClosure* closure);
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// For TabRestoreServiceObserver
virtual void TabRestoreServiceChanged(TabRestoreService* service);
@@ -114,7 +114,7 @@ class GlobalHistoryMenu : public GlobalMenuOwner,
// A mapping from GtkMenuItems to HistoryItems that maintain data.
MenuItemToHistoryMap menu_item_history_map_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
#endif // CHROME_BROWSER_UI_GTK_GLOBAL_HISTORY_MENU_H_
diff --git a/chrome/browser/ui/gtk/global_menu_bar.cc b/chrome/browser/ui/gtk/global_menu_bar.cc
index f03a45c..b3b47a9 100644
--- a/chrome/browser/ui/gtk/global_menu_bar.cc
+++ b/chrome/browser/ui/gtk/global_menu_bar.cc
@@ -17,9 +17,9 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_details.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/gtk_util.h"
@@ -284,8 +284,8 @@ void GlobalMenuBar::EnabledStateChangedForCommand(int id, bool enabled) {
}
void GlobalMenuBar::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(chrome::NOTIFICATION_PREF_CHANGED, type);
const std::string& pref_name = *Details<std::string>(details).ptr();
DCHECK_EQ(prefs::kShowBookmarkBar, pref_name);
diff --git a/chrome/browser/ui/gtk/global_menu_bar.h b/chrome/browser/ui/gtk/global_menu_bar.h
index b1a6cc4..a0bf446 100644
--- a/chrome/browser/ui/gtk/global_menu_bar.h
+++ b/chrome/browser/ui/gtk/global_menu_bar.h
@@ -11,7 +11,7 @@
#include "chrome/browser/command_updater.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/browser/ui/gtk/global_history_menu.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/gtk/owned_widget_gtk.h"
@@ -31,7 +31,7 @@ typedef struct _GtkWidget GtkWidget;
// bar itself is visible, so we insert a GtkMenuBar into the window hierarchy
// and set it to be invisible.
class GlobalMenuBar : public CommandUpdater::CommandObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
static const int TAG_NORMAL = 0;
static const int TAG_MOST_VISITED = 1;
@@ -68,10 +68,10 @@ class GlobalMenuBar : public CommandUpdater::CommandObserver,
// CommandUpdater::CommandObserver:
virtual void EnabledStateChangedForCommand(int id, bool enabled);
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Updates the visibility of the bookmark bar on pref changes.
void OnBookmarkBarVisibilityChanged();
diff --git a/chrome/browser/ui/gtk/gtk_theme_service.cc b/chrome/browser/ui/gtk/gtk_theme_service.cc
index cab2f69..22e0161 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.cc
+++ b/chrome/browser/ui/gtk/gtk_theme_service.cc
@@ -26,9 +26,9 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_details.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
#include "grit/ui_resources.h"
@@ -336,7 +336,7 @@ bool GtkThemeService::HasCustomImage(int id) const {
void GtkThemeService::InitThemesFor(NotificationObserver* observer) {
observer->Observe(chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(this),
+ content::Source<ThemeService>(this),
NotificationService::NoDetails());
}
@@ -368,8 +368,8 @@ bool GtkThemeService::UsingNativeTheme() const {
}
void GtkThemeService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if ((type == chrome::NOTIFICATION_PREF_CHANGED) &&
(*Details<std::string>(details).ptr() == prefs::kUsesSystemTheme)) {
#if !defined(OS_CHROMEOS)
diff --git a/chrome/browser/ui/gtk/gtk_theme_service.h b/chrome/browser/ui/gtk/gtk_theme_service.h
index 3558ba4..41420dc 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.h
+++ b/chrome/browser/ui/gtk/gtk_theme_service.h
@@ -12,7 +12,7 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/browser/themes/theme_service.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "ui/base/gtk/gtk_integers.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/gtk/owned_widget_gtk.h"
@@ -43,7 +43,7 @@ class GtkThemeService : public ThemeService {
// Calls |observer|.Observe() for the browser theme with this provider as the
// source.
- void InitThemesFor(NotificationObserver* observer);
+ void InitThemesFor(content::NotificationObserver* observer);
// Overridden from ThemeService:
//
@@ -59,10 +59,10 @@ class GtkThemeService : public ThemeService {
virtual bool UsingDefaultTheme() const;
virtual bool UsingNativeTheme() const;
- // Overridden from ThemeService, NotificationObserver:
+ // Overridden from ThemeService, content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Creates a GtkChromeButton instance, registered with this theme provider,
// with a "destroy" signal to remove it from our internal list when it goes
diff --git a/chrome/browser/ui/gtk/infobars/infobar_gtk.cc b/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
index e9b9b30..e0a2db6 100644
--- a/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
+++ b/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
@@ -96,7 +96,7 @@ InfoBarGtk::InfoBarGtk(InfoBarTabHelper* owner, InfoBarDelegate* delegate)
this);
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
UpdateBorderColor();
}
@@ -280,8 +280,8 @@ void InfoBarGtk::PlatformSpecificOnHeightsRecalculated() {
}
void InfoBarGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
UpdateBorderColor();
}
diff --git a/chrome/browser/ui/gtk/infobars/infobar_gtk.h b/chrome/browser/ui/gtk/infobars/infobar_gtk.h
index 5835175..a312ceb 100644
--- a/chrome/browser/ui/gtk/infobars/infobar_gtk.h
+++ b/chrome/browser/ui/gtk/infobars/infobar_gtk.h
@@ -13,8 +13,8 @@
#include "chrome/browser/infobars/infobar.h"
#include "chrome/browser/infobars/infobar_delegate.h"
#include "chrome/browser/ui/gtk/menu_gtk.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/gtk/owned_widget_gtk.h"
@@ -29,7 +29,7 @@ class MenuModel;
}
class InfoBarGtk : public InfoBar,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
InfoBarGtk(InfoBarTabHelper* owner, InfoBarDelegate* delegate);
virtual ~InfoBarGtk();
@@ -92,10 +92,10 @@ class InfoBarGtk : public InfoBar,
virtual void PlatformSpecificOnCloseSoon() OVERRIDE;
virtual void PlatformSpecificOnHeightsRecalculated() OVERRIDE;
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// The second highest widget in the hierarchy (after the |widget_|).
GtkWidget* bg_box_;
@@ -109,7 +109,7 @@ class InfoBarGtk : public InfoBar,
// The theme provider, used for getting border colors.
GtkThemeService* theme_service_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
private:
CHROMEGTK_CALLBACK_0(InfoBarGtk, void, OnCloseButton);
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index fd03932..3b39f4e 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -332,7 +332,7 @@ void LocationBarViewGtk::Init(bool popup_window_mode) {
registrar_.Add(this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
edit_bookmarks_enabled_.Init(prefs::kEditBookmarksEnabled,
profile->GetPrefs(), this);
@@ -555,7 +555,8 @@ void LocationBarViewGtk::OnSetFocus() {
l10n_util::GetStringUTF8(IDS_ACCNAME_LOCATION), false);
NotificationService::current()->Notify(
chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED,
- Source<Profile>(profile), Details<AccessibilityTextBoxInfo>(&info));
+ content::Source<Profile>(profile),
+ content::Details<AccessibilityTextBoxInfo>(&info));
// Update the keyword and search hint states.
OnChanged();
@@ -660,7 +661,7 @@ void LocationBarViewGtk::UpdatePageActions() {
}
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
- Source<LocationBar>(this),
+ content::Source<LocationBar>(this),
NotificationService::NoDetails());
}
@@ -686,7 +687,7 @@ void LocationBarViewGtk::InvalidatePageActions() {
if (page_action_views_.size() != count_before) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
- Source<LocationBar>(this),
+ content::Source<LocationBar>(this),
NotificationService::NoDetails());
}
}
@@ -754,8 +755,8 @@ void LocationBarViewGtk::TestPageActionPressed(size_t index) {
}
void LocationBarViewGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED) {
UpdateStarIcon();
return;
@@ -1536,8 +1537,8 @@ void LocationBarViewGtk::PageActionViewGtk::UpdateVisibility(
if (visible != old_visible) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
- Source<ExtensionAction>(page_action_),
- Details<TabContents>(contents));
+ content::Source<ExtensionAction>(page_action_),
+ content::Details<TabContents>(contents));
}
}
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.h b/chrome/browser/ui/gtk/location_bar_view_gtk.h
index e7d74c6..ea55826 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.h
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.h
@@ -25,8 +25,8 @@
#include "chrome/browser/ui/gtk/menu_gtk.h"
#include "chrome/browser/ui/omnibox/location_bar.h"
#include "chrome/common/content_settings_types.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/common/page_transition_types.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/animation/animation_delegate.h"
@@ -49,7 +49,7 @@ class ToolbarModel;
class LocationBarViewGtk : public AutocompleteEditController,
public LocationBar,
public LocationBarTesting,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit LocationBarViewGtk(Browser* browser);
virtual ~LocationBarViewGtk();
@@ -134,10 +134,10 @@ class LocationBarViewGtk : public AutocompleteEditController,
virtual ExtensionAction* GetVisiblePageAction(size_t index) OVERRIDE;
virtual void TestPageActionPressed(size_t index) OVERRIDE;
- // Implement the NotificationObserver interface.
+ // Implement the content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Edit background color.
static const GdkColor kBackgroundColor;
@@ -422,7 +422,7 @@ class LocationBarViewGtk : public AutocompleteEditController,
// Provides colors and rendering mode.
GtkThemeService* theme_service_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Width of the main |hbox_|. Used to properly elide the EV certificate.
int hbox_width_;
diff --git a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
index 701f4e7..9aa37a8 100644
--- a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
+++ b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
@@ -32,9 +32,9 @@
#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_details.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.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/theme_resources_standard.h"
@@ -317,7 +317,7 @@ void BalloonViewImpl::Show(Balloon* balloon) {
gtk_box_pack_end(GTK_BOX(hbox_), options_alignment, FALSE, FALSE, 0);
notification_registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
// We don't do InitThemesFor() because it just forces a redraw.
gtk_util::ActAsRoundedWindow(frame_container_, ui::kGdkBlack, 3,
@@ -341,7 +341,7 @@ void BalloonViewImpl::Show(Balloon* balloon) {
notification_registrar_.Add(this,
chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
- Source<Balloon>(balloon));
+ content::Source<Balloon>(balloon));
}
void BalloonViewImpl::Update() {
@@ -385,14 +385,14 @@ gfx::Rect BalloonViewImpl::GetContentsRectangle() const {
}
void BalloonViewImpl::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED) {
// If the renderer process attached to this balloon is disconnected
// (e.g., because of a crash), we want to close the balloon.
notification_registrar_.Remove(this,
chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
- Source<Balloon>(balloon_));
+ content::Source<Balloon>(balloon_));
Close(false);
} else if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) {
// Since all the buttons change their own properties, and our expose does
diff --git a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.h b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.h
index 4a2afb8..45f7fd2 100644
--- a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.h
+++ b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.h
@@ -14,8 +14,8 @@
#include "chrome/browser/notifications/balloon.h"
#include "chrome/browser/ui/gtk/menu_gtk.h"
#include "chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/gfx/point.h"
@@ -26,9 +26,7 @@ class BalloonCollection;
class CustomDrawButton;
class GtkThemeService;
class MenuGtk;
-class NotificationDetails;
class NotificationOptionsMenuModel;
-class NotificationSource;
namespace ui {
class SlideAnimation;
@@ -38,7 +36,7 @@ class SlideAnimation;
// It draws a border, and within the border an HTML renderer.
class BalloonViewImpl : public BalloonView,
public MenuGtk::Delegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public ui::AnimationDelegate {
public:
explicit BalloonViewImpl(BalloonCollection* collection);
@@ -56,10 +54,10 @@ class BalloonViewImpl : public BalloonView,
virtual void StoppedShowing();
private:
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// ui::AnimationDelegate interface.
virtual void AnimationProgressed(const ui::Animation* animation);
@@ -131,7 +129,7 @@ class BalloonViewImpl : public BalloonView,
// The button to open the options menu.
scoped_ptr<CustomDrawButton> options_menu_button_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
// Is the menu currently showing?
bool menu_showing_;
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 4c3fa32..2d875c5 100644
--- a/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc
+++ b/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc
@@ -313,7 +313,7 @@ OmniboxPopupViewGtk::OmniboxPopupViewGtk(const gfx::Font& font,
registrar_.Add(this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
// TODO(erg): There appears to be a bug somewhere in something which shows
@@ -390,8 +390,8 @@ void OmniboxPopupViewGtk::OnDragCanceled() {
}
void OmniboxPopupViewGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
if (theme_service_->UsingNativeTheme()) {
diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h b/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h
index 5903116..2385f56 100644
--- a/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h
+++ b/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h
@@ -15,8 +15,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/autocomplete/autocomplete_popup_view.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/gfx/font.h"
#include "webkit/glue/window_open_disposition.h"
@@ -28,7 +28,7 @@ class OmniboxView;
class SkBitmap;
class OmniboxPopupViewGtk : public AutocompletePopupView,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
OmniboxPopupViewGtk(const gfx::Font& font,
OmniboxView* omnibox_view,
@@ -44,10 +44,10 @@ class OmniboxPopupViewGtk : public AutocompletePopupView,
virtual void PaintUpdatesNow();
virtual void OnDragCanceled();
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// Be friendly for unit tests.
@@ -99,7 +99,7 @@ class OmniboxPopupViewGtk : public AutocompletePopupView,
PangoLayout* layout_;
GtkThemeService* theme_service_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Font used for suggestions after being derived from the constructor's
// |font|.
diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc
index 89cc3bb..af059c2 100644
--- a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc
+++ b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc
@@ -411,7 +411,7 @@ void OmniboxViewGtk::Init() {
#if !defined(TOOLKIT_VIEWS)
registrar_.Add(this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
#else
// Manually invoke SetBaseColor() because TOOLKIT_VIEWS doesn't observe
@@ -919,8 +919,8 @@ OmniboxView* OmniboxViewGtk::Create(AutocompleteEditController* controller,
#endif
void OmniboxViewGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
SetBaseColor();
diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h
index a94a535..aaf240f 100644
--- a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h
+++ b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h
@@ -17,8 +17,8 @@
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/ui/omnibox/omnibox_view.h"
#include "chrome/browser/ui/toolbar/toolbar_model.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/gtk/gtk_signal_registrar.h"
@@ -49,7 +49,7 @@ class GtkThemeService;
#endif
class OmniboxViewGtk : public OmniboxView,
- public NotificationObserver,
+ public content::NotificationObserver,
public ui::AnimationDelegate {
public:
// Modeled like the Windows CHARRANGE. Represent a pair of cursor position
@@ -162,10 +162,10 @@ class OmniboxViewGtk : public OmniboxView,
views::View* location_bar);
#endif
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Overridden from ui::AnimationDelegate.
virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
@@ -469,7 +469,7 @@ class OmniboxViewGtk : public OmniboxView,
// Supplies colors, et cetera.
GtkThemeService* theme_service_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
#endif
// Indicates if Enter key was pressed.
diff --git a/chrome/browser/ui/gtk/overflow_button.cc b/chrome/browser/ui/gtk/overflow_button.cc
index deb1433..9f31401 100644
--- a/chrome/browser/ui/gtk/overflow_button.cc
+++ b/chrome/browser/ui/gtk/overflow_button.cc
@@ -19,7 +19,7 @@ OverflowButton::OverflowButton(Profile* profile) : profile_(profile) {
GtkThemeService* theme_service = GtkThemeService::GetFrom(profile);
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service));
+ content::Source<ThemeService>(theme_service));
theme_service->InitThemesFor(this);
}
@@ -28,8 +28,8 @@ OverflowButton::~OverflowButton() {
}
void OverflowButton::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
GtkWidget* former_child = gtk_bin_get_child(GTK_BIN(widget()));
if (former_child)
gtk_widget_destroy(former_child);
diff --git a/chrome/browser/ui/gtk/overflow_button.h b/chrome/browser/ui/gtk/overflow_button.h
index 2028b3b..c172f47 100644
--- a/chrome/browser/ui/gtk/overflow_button.h
+++ b/chrome/browser/ui/gtk/overflow_button.h
@@ -6,8 +6,8 @@
#define CHROME_BROWSER_UI_GTK_OVERFLOW_BUTTON_H_
#pragma once
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/gtk/owned_widget_gtk.h"
typedef struct _GtkWidget GtkWidget;
@@ -15,7 +15,7 @@ class Profile;
// An overflow chevron button. The button itself is a plain gtk_chrome_button,
// and this class handles theming it.
-class OverflowButton : public NotificationObserver {
+class OverflowButton : public content::NotificationObserver {
public:
explicit OverflowButton(Profile* profile);
virtual ~OverflowButton();
@@ -23,16 +23,16 @@ class OverflowButton : public NotificationObserver {
GtkWidget* widget() { return widget_.get(); }
private:
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
ui::OwnedWidgetGtk widget_;
Profile* profile_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
#endif // CHROME_BROWSER_UI_GTK_OVERFLOW_BUTTON_H_
diff --git a/chrome/browser/ui/gtk/reload_button_gtk.cc b/chrome/browser/ui/gtk/reload_button_gtk.cc
index b945934..fb686c7 100644
--- a/chrome/browser/ui/gtk/reload_button_gtk.cc
+++ b/chrome/browser/ui/gtk/reload_button_gtk.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/gtk/location_bar_view_gtk.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
@@ -63,7 +63,7 @@ ReloadButtonGtk::ReloadButtonGtk(LocationBarViewGtk* location_bar,
theme_service_->InitThemesFor(this);
registrar_.Add(this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
}
// Set the default double-click timer delay to the system double-click time.
@@ -126,15 +126,15 @@ void ReloadButtonGtk::ChangeMode(Mode mode, bool force) {
}
////////////////////////////////////////////////////////////////////////////////
-// ReloadButtonGtk, NotificationObserver implementation:
+// ReloadButtonGtk, content::NotificationObserver implementation:
void ReloadButtonGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& /* details */) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(chrome::NOTIFICATION_BROWSER_THEME_CHANGED == type);
GtkThemeService* provider = static_cast<GtkThemeService*>(
- Source<ThemeService>(source).ptr());
+ content::Source<ThemeService>(source).ptr());
DCHECK_EQ(provider, theme_service_);
GtkButtonWidth = 0;
UpdateThemeButtons();
diff --git a/chrome/browser/ui/gtk/reload_button_gtk.h b/chrome/browser/ui/gtk/reload_button_gtk.h
index 901288a..fa68581 100644
--- a/chrome/browser/ui/gtk/reload_button_gtk.h
+++ b/chrome/browser/ui/gtk/reload_button_gtk.h
@@ -11,8 +11,8 @@
#include "base/basictypes.h"
#include "base/timer.h"
#include "chrome/browser/ui/gtk/custom_button.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/gtk/owned_widget_gtk.h"
@@ -21,7 +21,7 @@ class GtkThemeService;
class LocationBarViewGtk;
class Task;
-class ReloadButtonGtk : public NotificationObserver {
+class ReloadButtonGtk : public content::NotificationObserver {
public:
enum Mode { MODE_RELOAD = 0, MODE_STOP };
@@ -34,10 +34,10 @@ class ReloadButtonGtk : public NotificationObserver {
// immediately.
void ChangeMode(Mode mode, bool force);
- // Provide NotificationObserver implementation.
+ // Provide content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& /* details */);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
friend class ReloadButtonGtkTest;
@@ -75,7 +75,7 @@ class ReloadButtonGtk : public NotificationObserver {
Mode visible_mode_;
// Used to listen for theme change notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
GtkThemeService* theme_service_;
diff --git a/chrome/browser/ui/gtk/status_bubble_gtk.cc b/chrome/browser/ui/gtk/status_bubble_gtk.cc
index 6640a8b..30fb60c 100644
--- a/chrome/browser/ui/gtk/status_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/status_bubble_gtk.cc
@@ -52,7 +52,7 @@ StatusBubbleGtk::StatusBubbleGtk(Profile* profile)
theme_service_->InitThemesFor(this);
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
}
StatusBubbleGtk::~StatusBubbleGtk() {
@@ -238,8 +238,8 @@ void StatusBubbleGtk::UpdateDownloadShelfVisibility(bool visible) {
}
void StatusBubbleGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) {
UserChangedTheme();
}
diff --git a/chrome/browser/ui/gtk/status_bubble_gtk.h b/chrome/browser/ui/gtk/status_bubble_gtk.h
index c11b161..b419b1b 100644
--- a/chrome/browser/ui/gtk/status_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/status_bubble_gtk.h
@@ -14,8 +14,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/timer.h"
#include "chrome/browser/ui/status_bubble.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/gtk/gtk_signal.h"
@@ -34,7 +34,7 @@ class SlideAnimation;
// window manager to not try to be "helpful" and center our popups, etc.
// We therefore position it absolutely in a GtkFixed, that we don't own.
class StatusBubbleGtk : public StatusBubble,
- public NotificationObserver,
+ public content::NotificationObserver,
public ui::AnimationDelegate {
public:
explicit StatusBubbleGtk(Profile* profile);
@@ -59,10 +59,10 @@ class StatusBubbleGtk : public StatusBubble,
// the download shelf, when it is visible.
virtual void UpdateDownloadShelfVisibility(bool visible);
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Top of the widget hierarchy for a StatusBubble. This top level widget is
// guarenteed to have its gtk_widget_name set to "status-bubble" for
@@ -113,7 +113,7 @@ class StatusBubbleGtk : public StatusBubble,
CHROMEGTK_CALLBACK_1(StatusBubbleGtk, gboolean, HandleEnterNotify,
GdkEventCrossing*);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Provides colors.
GtkThemeService* theme_service_;
diff --git a/chrome/browser/ui/gtk/tab_contents_container_gtk.cc b/chrome/browser/ui/gtk/tab_contents_container_gtk.cc
index a3337cf..f60ad93 100644
--- a/chrome/browser/ui/gtk/tab_contents_container_gtk.cc
+++ b/chrome/browser/ui/gtk/tab_contents_container_gtk.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "content/browser/renderer_host/render_widget_host_view_gtk.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "ui/base/gtk/gtk_expanded_container.h"
#include "ui/base/gtk/gtk_floating_container.h"
@@ -66,7 +66,7 @@ void TabContentsContainerGtk::SetTab(TabContentsWrapper* tab) {
HideTab(tab_);
if (tab_) {
registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_->tab_contents()));
+ content::Source<TabContents>(tab_->tab_contents()));
}
tab_ = tab;
@@ -79,7 +79,7 @@ void TabContentsContainerGtk::SetTab(TabContentsWrapper* tab) {
// Otherwise we actually have to add it to the widget hierarchy.
PackTab(tab);
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_->tab_contents()));
+ content::Source<TabContents>(tab_->tab_contents()));
}
}
@@ -97,7 +97,7 @@ void TabContentsContainerGtk::SetPreview(TabContentsWrapper* preview) {
PackTab(preview);
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(preview_->tab_contents()));
+ content::Source<TabContents>(preview_->tab_contents()));
}
void TabContentsContainerGtk::RemovePreview() {
@@ -111,7 +111,7 @@ void TabContentsContainerGtk::RemovePreview() {
gtk_container_remove(GTK_CONTAINER(expanded_), preview_widget);
registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(preview_->tab_contents()));
+ content::Source<TabContents>(preview_->tab_contents()));
preview_ = NULL;
}
@@ -169,12 +169,13 @@ void TabContentsContainerGtk::DetachTab(TabContentsWrapper* tab) {
}
}
-void TabContentsContainerGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void TabContentsContainerGtk::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED);
- TabContentsDestroyed(Source<TabContents>(source).ptr());
+ TabContentsDestroyed(content::Source<TabContents>(source).ptr());
}
void TabContentsContainerGtk::TabContentsDestroyed(TabContents* contents) {
diff --git a/chrome/browser/ui/gtk/tab_contents_container_gtk.h b/chrome/browser/ui/gtk/tab_contents_container_gtk.h
index a538241..777d969 100644
--- a/chrome/browser/ui/gtk/tab_contents_container_gtk.h
+++ b/chrome/browser/ui/gtk/tab_contents_container_gtk.h
@@ -10,8 +10,8 @@
#include "base/basictypes.h"
#include "chrome/browser/ui/gtk/view_id_util.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/gtk/owned_widget_gtk.h"
@@ -22,7 +22,7 @@ class TabContentsWrapper;
typedef struct _GtkFloatingContainer GtkFloatingContainer;
-class TabContentsContainerGtk : public NotificationObserver,
+class TabContentsContainerGtk : public content::NotificationObserver,
public ViewIDUtil::Delegate {
public:
explicit TabContentsContainerGtk(StatusBubbleGtk* status_bubble);
@@ -45,10 +45,10 @@ class TabContentsContainerGtk : public NotificationObserver,
// Remove the tab from the hierarchy.
void DetachTab(TabContentsWrapper* tab);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
GtkWidget* widget() { return floating_.get(); }
@@ -81,7 +81,7 @@ class TabContentsContainerGtk : public NotificationObserver,
CHROMEGTK_CALLBACK_1(TabContentsContainerGtk, gboolean, OnFocus,
GtkDirectionType);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The TabContentsWrapper for the currently selected tab. This will be showing
// unless there is a preview contents.
diff --git a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
index 93543f4..76859ff 100644
--- a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
@@ -19,7 +19,7 @@
#include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "ui/gfx/screen.h"
@@ -161,7 +161,7 @@ DraggedTabData DraggedTabControllerGtk::InitDraggedTabData(TabGtk* tab) {
registrar_.Add(
this,
content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(dragged_tab_data.contents_->tab_contents()));
+ content::Source<TabContents>(dragged_tab_data.contents_->tab_contents()));
return dragged_tab_data;
}
@@ -233,13 +233,14 @@ DraggedTabControllerGtk::GetJavaScriptDialogCreator() {
}
////////////////////////////////////////////////////////////////////////////////
-// DraggedTabControllerGtk, NotificationObserver implementation:
+// DraggedTabControllerGtk, content::NotificationObserver implementation:
-void DraggedTabControllerGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void DraggedTabControllerGtk::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED);
- TabContents* destroyed_contents = Source<TabContents>(source).ptr();
+ TabContents* destroyed_contents = content::Source<TabContents>(source).ptr();
for (size_t i = 0; i < drag_data_->size(); ++i) {
if (drag_data_->get(i)->contents_->tab_contents() == destroyed_contents) {
// One of the tabs we're dragging has been destroyed. Cancel the drag.
@@ -861,7 +862,8 @@ void DraggedTabControllerGtk::CleanUpDraggedTabs() {
if (drag_data_->get(i)->contents_) {
registrar_.Remove(
this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(drag_data_->get(i)->contents_->tab_contents()));
+ content::Source<TabContents>(
+ drag_data_->get(i)->contents_->tab_contents()));
}
source_tabstrip_->DestroyDraggedTab(drag_data_->get(i)->tab_);
drag_data_->get(i)->tab_ = NULL;
diff --git a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h
index 77ccdb2..51ce822 100644
--- a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h
+++ b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h
@@ -16,8 +16,8 @@
#include "chrome/browser/ui/gtk/tabs/drag_data.h"
#include "chrome/browser/ui/tabs/dock_info.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/x/x11_util.h"
class DraggedViewGtk;
@@ -26,7 +26,7 @@ class TabStripGtk;
class TabStripModel;
class TabContentsWrapper;
-class DraggedTabControllerGtk : public NotificationObserver,
+class DraggedTabControllerGtk : public content::NotificationObserver,
public TabContentsDelegate {
public:
// |source_tabstrip| is the tabstrip where the tabs reside before any
@@ -105,10 +105,10 @@ class DraggedTabControllerGtk : public NotificationObserver,
virtual content::JavaScriptDialogCreator*
GetJavaScriptDialogCreator() OVERRIDE;
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Returns the point where a detached window should be created given the
// current mouse position.
@@ -221,7 +221,7 @@ class DraggedTabControllerGtk : public NotificationObserver,
bool AreTabsConsecutive();
// Handles registering for notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The tab strip |source_tab_| originated from.
TabStripGtk* source_tabstrip_;
diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
index 1d416dc..0058ee5 100644
--- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
@@ -158,7 +158,7 @@ TabRendererGtk::LoadingAnimation::LoadingAnimation(
animation_frame_(0) {
registrar_.Add(this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
}
TabRendererGtk::LoadingAnimation::LoadingAnimation(
@@ -202,8 +202,8 @@ bool TabRendererGtk::LoadingAnimation::ValidateLoadingAnimation(
void TabRendererGtk::LoadingAnimation::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
data_.reset(new Data(theme_service_));
}
@@ -276,7 +276,7 @@ TabRendererGtk::TabRendererGtk(ThemeService* theme_service)
hover_animation_->SetSlideDuration(kHoverDurationMs);
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
}
TabRendererGtk::~TabRendererGtk() {
@@ -556,7 +556,7 @@ void TabRendererGtk::SetBounds(const gfx::Rect& bounds) {
}
void TabRendererGtk::Observe(int type,
- const NotificationSource& source,
+ const content::NotificationSource& source,
const NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h
index 4e702f7..2e05537 100644
--- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h
+++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h
@@ -12,8 +12,8 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/string16.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/gtk/gtk_signal.h"
@@ -36,7 +36,7 @@ class ThrobAnimation;
}
class TabRendererGtk : public ui::AnimationDelegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// Possible animation states.
enum AnimationState {
@@ -45,7 +45,7 @@ class TabRendererGtk : public ui::AnimationDelegate,
ANIMATION_LOADING
};
- class LoadingAnimation : public NotificationObserver {
+ class LoadingAnimation : public content::NotificationObserver {
public:
struct Data {
explicit Data(ThemeService* theme_service);
@@ -80,16 +80,16 @@ class TabRendererGtk : public ui::AnimationDelegate,
return data_->loading_animation_frames;
}
- // Provide NotificationObserver implementation.
+ // Provide content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
scoped_ptr<Data> data_;
// Used to listen for theme change notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Gives us our throbber images.
ThemeService* theme_service_;
@@ -165,7 +165,7 @@ class TabRendererGtk : public ui::AnimationDelegate,
// Provide NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
+ const content::NotificationSource& source,
const NotificationDetails& details);
// Advance the loading animation to the next frame, or hide the animation if
@@ -456,7 +456,7 @@ class TabRendererGtk : public ui::AnimationDelegate,
bool is_active_;
// Used to listen for theme change notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(TabRendererGtk);
};
diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
index d129c8a..a14ea30 100644
--- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
@@ -710,7 +710,7 @@ TabStripGtk::TabStripGtk(TabStripModel* model, BrowserWindowGtk* window)
hover_tab_selector_(model) {
theme_service_->InitThemesFor(this);
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(theme_service_));
+ content::Source<ThemeService>(theme_service_));
}
TabStripGtk::~TabStripGtk() {
@@ -1307,11 +1307,11 @@ void TabStripGtk::DidProcessEvent(GdkEvent* event) {
}
///////////////////////////////////////////////////////////////////////////////
-// TabStripGtk, NotificationObserver implementation:
+// TabStripGtk, content::NotificationObserver implementation:
void TabStripGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) {
TabRendererGtk::SetSelectedTitleColor(theme_service_->GetColor(
ThemeService::COLOR_TAB_TEXT));
diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h
index 62cb727..bccd717 100644
--- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h
+++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h
@@ -18,7 +18,7 @@
#include "chrome/browser/ui/gtk/tabstrip_origin_provider.h"
#include "chrome/browser/ui/gtk/view_id_util.h"
#include "chrome/browser/ui/tabs/hover_tab_selector.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/gtk/owned_widget_gtk.h"
#include "ui/gfx/rect.h"
@@ -31,7 +31,7 @@ class GtkThemeService;
class TabStripGtk : public TabStripModelObserver,
public TabGtk::TabDelegate,
public MessageLoopForUI::Observer,
- public NotificationObserver,
+ public content::NotificationObserver,
public TabstripOriginProvider,
public ViewIDUtil::Delegate {
public:
@@ -156,10 +156,10 @@ class TabStripGtk : public TabStripModelObserver,
virtual void WillProcessEvent(GdkEvent* event);
virtual void DidProcessEvent(GdkEvent* event);
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Horizontal gap between mini-tabs and normal tabs.
static const int mini_to_non_mini_gap_;
@@ -417,7 +417,7 @@ class TabStripGtk : public TabStripModelObserver,
// Optionally a full Layout will be performed, specified by |layout|.
void FinishAnimation(TabAnimation* animation, bool layout);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The Tabs we contain, and their last generated "good" bounds.
std::vector<TabData> tab_data_;
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 168c224..8c4b766 100644
--- a/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc
+++ b/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc
@@ -36,9 +36,10 @@ void ThemeInstallBubbleViewGtk::Show(GtkWindow* parent) {
instance_ = new ThemeInstallBubbleViewGtk(GTK_WIDGET(parent));
}
-void ThemeInstallBubbleViewGtk::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ThemeInstallBubbleViewGtk::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (--num_loads_extant_ == 0)
delete this;
}
diff --git a/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h b/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h
index 118b9d9..f008e79 100644
--- a/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h
+++ b/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h
@@ -9,18 +9,18 @@
#include <gtk/gtk.h>
#include "base/basictypes.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/gtk/gtk_signal.h"
-class ThemeInstallBubbleViewGtk : public NotificationObserver {
+class ThemeInstallBubbleViewGtk : public content::NotificationObserver {
public:
static void Show(GtkWindow* parent);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
explicit ThemeInstallBubbleViewGtk(GtkWidget* parent);
@@ -51,7 +51,7 @@ class ThemeInstallBubbleViewGtk : public NotificationObserver {
// The number of loads we represent. When it reaches 0 we delete ourselves.
int num_loads_extant_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Our one instance. We don't allow more than one to exist at a time.
static ThemeInstallBubbleViewGtk* instance_;
diff --git a/chrome/browser/ui/intents/web_intent_picker_controller.cc b/chrome/browser/ui/intents/web_intent_picker_controller.cc
index 5843705..bc55a0a 100644
--- a/chrome/browser/ui/intents/web_intent_picker_controller.cc
+++ b/chrome/browser/ui/intents/web_intent_picker_controller.cc
@@ -20,7 +20,7 @@
#include "chrome/browser/webdata/web_data_service.h"
#include "content/browser/intents/intent_injector.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "ui/gfx/codec/png_codec.h"
#include "webkit/glue/web_intent_service_data.h"
@@ -117,9 +117,9 @@ WebIntentPickerController::WebIntentPickerController(
intent_id_(0) {
NavigationController* controller = &wrapper->controller();
registrar_.Add(this, content::NOTIFICATION_LOAD_START,
- Source<NavigationController>(controller));
+ content::Source<NavigationController>(controller));
registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING,
- Source<NavigationController>(controller));
+ content::Source<NavigationController>(controller));
}
WebIntentPickerController::~WebIntentPickerController() {
@@ -150,9 +150,10 @@ void WebIntentPickerController::ShowDialog(Browser* browser,
web_intent_data_fetcher_->Fetch(action, type);
}
-void WebIntentPickerController::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void WebIntentPickerController::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == content::NOTIFICATION_LOAD_START ||
type == content::NOTIFICATION_TAB_CLOSING);
ClosePicker();
diff --git a/chrome/browser/ui/intents/web_intent_picker_controller.h b/chrome/browser/ui/intents/web_intent_picker_controller.h
index fc76732..fd88d96 100644
--- a/chrome/browser/ui/intents/web_intent_picker_controller.h
+++ b/chrome/browser/ui/intents/web_intent_picker_controller.h
@@ -12,8 +12,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/string16.h"
#include "chrome/browser/ui/intents/web_intent_picker_delegate.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "webkit/glue/web_intent_data.h"
class Browser;
@@ -28,7 +28,7 @@ struct WebIntentServiceData;
// Controls the creation of the WebIntentPicker UI and forwards the user's
// intent handler choice back to the TabContents object.
-class WebIntentPickerController : public NotificationObserver,
+class WebIntentPickerController : public content::NotificationObserver,
public WebIntentPickerDelegate {
public:
// Takes ownership of |factory|.
@@ -52,10 +52,10 @@ class WebIntentPickerController : public NotificationObserver,
const string16& type);
protected:
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// WebIntentPickerDelegate implementation.
virtual void OnServiceChosen(size_t index) OVERRIDE;
@@ -87,7 +87,7 @@ class WebIntentPickerController : public NotificationObserver,
// A notification registrar, listening for notifications when the tab closes
// to close the picker ui.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// A factory to create a new picker.
scoped_ptr<WebIntentPickerFactory> picker_factory_;
diff --git a/chrome/browser/ui/login/login_prompt.cc b/chrome/browser/ui/login/login_prompt.cc
index e5b1b4d..8e11439 100644
--- a/chrome/browser/ui/login/login_prompt.cc
+++ b/chrome/browser/ui/login/login_prompt.cc
@@ -212,8 +212,8 @@ void LoginHandler::RemoveObservers() {
}
void LoginHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(type == chrome::NOTIFICATION_AUTH_SUPPLIED ||
type == chrome::NOTIFICATION_AUTH_CANCELLED);
@@ -227,7 +227,7 @@ void LoginHandler::Observe(int type,
return;
LoginNotificationDetails* login_details =
- Details<LoginNotificationDetails>(details).ptr();
+ content::Details<LoginNotificationDetails>(details).ptr();
// WasAuthHandled() should always test positive before we publish
// AUTH_SUPPLIED or AUTH_CANCELLED notifications.
@@ -240,7 +240,7 @@ void LoginHandler::Observe(int type,
// Set or cancel the auth in this handler.
if (type == chrome::NOTIFICATION_AUTH_SUPPLIED) {
AuthSuppliedLoginNotificationDetails* supplied_details =
- Details<AuthSuppliedLoginNotificationDetails>(details).ptr();
+ content::Details<AuthSuppliedLoginNotificationDetails>(details).ptr();
SetAuth(supplied_details->username(), supplied_details->password());
} else {
DCHECK(type == chrome::NOTIFICATION_AUTH_CANCELLED);
@@ -275,8 +275,8 @@ void LoginHandler::NotifyAuthNeeded() {
LoginNotificationDetails details(this);
service->Notify(chrome::NOTIFICATION_AUTH_NEEDED,
- Source<NavigationController>(controller),
- Details<LoginNotificationDetails>(&details));
+ content::Source<NavigationController>(controller),
+ content::Details<LoginNotificationDetails>(&details));
}
void LoginHandler::NotifyAuthCancelled() {
@@ -293,8 +293,8 @@ void LoginHandler::NotifyAuthCancelled() {
LoginNotificationDetails details(this);
service->Notify(chrome::NOTIFICATION_AUTH_CANCELLED,
- Source<NavigationController>(controller),
- Details<LoginNotificationDetails>(&details));
+ content::Source<NavigationController>(controller),
+ content::Details<LoginNotificationDetails>(&details));
}
void LoginHandler::NotifyAuthSupplied(const string16& username,
@@ -310,9 +310,10 @@ void LoginHandler::NotifyAuthSupplied(const string16& username,
NavigationController* controller = &requesting_contents->controller();
AuthSuppliedLoginNotificationDetails details(this, username, password);
- service->Notify(chrome::NOTIFICATION_AUTH_SUPPLIED,
- Source<NavigationController>(controller),
- Details<AuthSuppliedLoginNotificationDetails>(&details));
+ service->Notify(
+ chrome::NOTIFICATION_AUTH_SUPPLIED,
+ content::Source<NavigationController>(controller),
+ content::Details<AuthSuppliedLoginNotificationDetails>(&details));
}
void LoginHandler::ReleaseSoon() {
diff --git a/chrome/browser/ui/login/login_prompt.h b/chrome/browser/ui/login/login_prompt.h
index b0a03ef..069153b 100644
--- a/chrome/browser/ui/login/login_prompt.h
+++ b/chrome/browser/ui/login/login_prompt.h
@@ -12,8 +12,8 @@
#include "base/synchronization/lock.h"
#include "chrome/browser/password_manager/password_manager.h"
#include "content/browser/renderer_host/resource_dispatcher_host_login_delegate.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
namespace net {
class AuthChallengeInfo;
@@ -29,7 +29,7 @@ class RenderViewHostDelegate;
// must be implemented in a thread safe manner.
class LoginHandler : public ResourceDispatcherHostLoginDelegate,
public LoginModelObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
LoginHandler(net::AuthChallengeInfo* auth_info, net::URLRequest* request);
virtual ~LoginHandler();
@@ -65,13 +65,13 @@ class LoginHandler : public ResourceDispatcherHostLoginDelegate,
// This function can be called from either thread.
void CancelAuth();
- // Implements the NotificationObserver interface.
+ // Implements the content::NotificationObserver interface.
// Listens for AUTH_SUPPLIED and AUTH_CANCELLED notifications from other
// LoginHandlers so that this LoginHandler has the chance to dismiss itself
// if it was waiting for the same authentication.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Who/where/what asked for the authentication.
const net::AuthChallengeInfo* auth_info() const { return auth_info_.get(); }
@@ -153,11 +153,11 @@ class LoginHandler : public ResourceDispatcherHostLoginDelegate,
LoginModel* login_model_;
// Observes other login handlers so this login handler can respond.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
-// Details to provide the NotificationObserver. Used by the automation proxy
-// for testing.
+// Details to provide the content::NotificationObserver. Used by the automation
+//proxy for testing.
class LoginNotificationDetails {
public:
explicit LoginNotificationDetails(LoginHandler* handler)
diff --git a/chrome/browser/ui/login/login_prompt_browsertest.cc b/chrome/browser/ui/login/login_prompt_browsertest.cc
index cf01ce4..09821f3 100644
--- a/chrome/browser/ui/login/login_prompt_browsertest.cc
+++ b/chrome/browser/ui/login/login_prompt_browsertest.cc
@@ -68,7 +68,7 @@ void LoginPromptBrowserTest::SetAuthFor(LoginHandler* handler) {
// Maintains a set of LoginHandlers that are currently active and
// keeps a count of the notifications that were observed.
-class LoginPromptBrowserTestObserver : public NotificationObserver {
+class LoginPromptBrowserTestObserver : public content::NotificationObserver {
public:
LoginPromptBrowserTestObserver()
: auth_needed_count_(0),
@@ -76,14 +76,14 @@ class LoginPromptBrowserTestObserver : public NotificationObserver {
auth_cancelled_count_(0) {}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
void AddHandler(LoginHandler* handler);
void RemoveHandler(LoginHandler* handler);
- void Register(const NotificationSource& source);
+ void Register(const content::NotificationSource& source);
std::list<LoginHandler*> handlers_;
@@ -96,28 +96,28 @@ class LoginPromptBrowserTestObserver : public NotificationObserver {
int auth_cancelled_count_;
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(LoginPromptBrowserTestObserver);
};
void LoginPromptBrowserTestObserver::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_AUTH_NEEDED) {
LoginNotificationDetails* login_details =
- Details<LoginNotificationDetails>(details).ptr();
+ content::Details<LoginNotificationDetails>(details).ptr();
AddHandler(login_details->handler());
auth_needed_count_++;
} else if (type == chrome::NOTIFICATION_AUTH_SUPPLIED) {
AuthSuppliedLoginNotificationDetails* login_details =
- Details<AuthSuppliedLoginNotificationDetails>(details).ptr();
+ content::Details<AuthSuppliedLoginNotificationDetails>(details).ptr();
RemoveHandler(login_details->handler());
auth_supplied_count_++;
} else if (type == chrome::NOTIFICATION_AUTH_CANCELLED) {
LoginNotificationDetails* login_details =
- Details<LoginNotificationDetails>(details).ptr();
+ content::Details<LoginNotificationDetails>(details).ptr();
RemoveHandler(login_details->handler());
auth_cancelled_count_++;
}
@@ -142,7 +142,7 @@ void LoginPromptBrowserTestObserver::RemoveHandler(LoginHandler* handler) {
}
void LoginPromptBrowserTestObserver::Register(
- const NotificationSource& source) {
+ const content::NotificationSource& source) {
registrar_.Add(this, chrome::NOTIFICATION_AUTH_NEEDED, source);
registrar_.Add(this, chrome::NOTIFICATION_AUTH_SUPPLIED, source);
registrar_.Add(this, chrome::NOTIFICATION_AUTH_CANCELLED, source);
@@ -154,7 +154,7 @@ class WindowedNavigationObserver
public:
explicit WindowedNavigationObserver(NavigationController* controller)
: ui_test_utils::WindowedNotificationObserver(
- T, Source<NavigationController>(controller)) {}
+ T, content::Source<NavigationController>(controller)) {}
};
typedef WindowedNavigationObserver<content::NOTIFICATION_LOAD_STOP>
@@ -217,7 +217,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, PrefetchAuthCancels) {
NavigationController* controller = &contents->controller();
LoginPromptBrowserTestObserver observer;
- observer.Register(Source<NavigationController>(controller));
+ observer.Register(content::Source<NavigationController>(controller));
WindowedLoadStopObserver load_stop_waiter(controller);
browser()->OpenURL(
@@ -244,7 +244,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, MultipleRealmCancellation) {
NavigationController* controller = &contents->controller();
LoginPromptBrowserTestObserver observer;
- observer.Register(Source<NavigationController>(controller));
+ observer.Register(content::Source<NavigationController>(controller));
WindowedLoadStopObserver load_stop_waiter(controller);
@@ -303,7 +303,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest,
NavigationController* controller = &contents->controller();
LoginPromptBrowserTestObserver observer;
- observer.Register(Source<NavigationController>(controller));
+ observer.Register(content::Source<NavigationController>(controller));
WindowedLoadStopObserver load_stop_waiter(controller);
int n_handlers = 0;
@@ -355,7 +355,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, IncorrectConfirmation) {
NavigationController* controller = &contents->controller();
LoginPromptBrowserTestObserver observer;
- observer.Register(Source<NavigationController>(controller));
+ observer.Register(content::Source<NavigationController>(controller));
{
WindowedAuthNeededObserver auth_needed_waiter(controller);
@@ -426,7 +426,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, NoLoginPromptForFavicon) {
NavigationController* controller = &contents->controller();
LoginPromptBrowserTestObserver observer;
- observer.Register(Source<NavigationController>(controller));
+ observer.Register(content::Source<NavigationController>(controller));
// First load a page that has a favicon that requires
// authentication. There should be no login prompt.
@@ -480,7 +480,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, BlockCrossdomainPrompt) {
NavigationController* controller = &contents->controller();
LoginPromptBrowserTestObserver observer;
- observer.Register(Source<NavigationController>(controller));
+ observer.Register(content::Source<NavigationController>(controller));
// Load a page that has a cross-domain sub-resource authentication.
// There should be no login prompt.
diff --git a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
index c3296b4..850ddca 100644
--- a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
+++ b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
@@ -147,7 +147,7 @@ const int kCtrlOrCmdMask = ui::EF_CONTROL_DOWN;
} // namespace
class OmniboxViewTest : public InProcessBrowserTest,
- public NotificationObserver {
+ public content::NotificationObserver {
protected:
OmniboxViewTest() {
set_show_window(true);
@@ -207,7 +207,8 @@ class OmniboxViewTest : public InProcessBrowserTest,
ui::KeyboardCode key,
int modifiers,
int type,
- const NotificationSource& source) WARN_UNUSED_RESULT {
+ const content::NotificationSource& source)
+ WARN_UNUSED_RESULT {
return ui_test_utils::SendKeyPressAndWait(
browser, key,
(modifiers & ui::EF_CONTROL_DOWN) != 0,
@@ -223,7 +224,7 @@ class OmniboxViewTest : public InProcessBrowserTest,
if (tab_count == expected_tab_count)
return;
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
registrar.Add(this,
(tab_count < expected_tab_count ?
content::NOTIFICATION_TAB_PARENTED :
@@ -251,10 +252,10 @@ class OmniboxViewTest : public InProcessBrowserTest,
if (controller->done())
return;
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
registrar.Add(this,
chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY,
- Source<AutocompleteController>(controller));
+ content::Source<AutocompleteController>(controller));
while (!HasFailure() && !controller->done())
ui_test_utils::RunMessageLoop();
@@ -268,9 +269,9 @@ class OmniboxViewTest : public InProcessBrowserTest,
ASSERT_TRUE(model);
if (!model->loaded()) {
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
registrar.Add(this, chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED,
- Source<TemplateURLService>(model));
+ content::Source<TemplateURLService>(model));
model->Load();
ui_test_utils::RunMessageLoop();
}
@@ -300,9 +301,9 @@ class OmniboxViewTest : public InProcessBrowserTest,
ASSERT_TRUE(history_service);
if (!history_service->BackendLoaded()) {
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
registrar.Add(this, chrome::NOTIFICATION_HISTORY_LOADED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
ui_test_utils::RunMessageLoop();
}
@@ -310,9 +311,9 @@ class OmniboxViewTest : public InProcessBrowserTest,
ASSERT_TRUE(bookmark_model);
if (!bookmark_model->IsLoaded()) {
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
registrar.Add(this, chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
ui_test_utils::RunMessageLoop();
}
@@ -351,8 +352,8 @@ class OmniboxViewTest : public InProcessBrowserTest,
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_TAB_PARENTED:
case content::NOTIFICATION_TAB_CLOSED:
@@ -422,7 +423,8 @@ class OmniboxViewTest : public InProcessBrowserTest,
// Try alt-f4 to close the browser.
ASSERT_TRUE(SendKeyAndWait(
browser(), ui::VKEY_F4, ui::EF_ALT_DOWN,
- chrome::NOTIFICATION_BROWSER_CLOSED, Source<Browser>(browser())));
+ chrome::NOTIFICATION_BROWSER_CLOSED,
+ content::Source<Browser>(browser())));
#endif
}
@@ -443,7 +445,7 @@ class OmniboxViewTest : public InProcessBrowserTest,
// No BROWSER_CLOSED notification will be sent.
ASSERT_TRUE(SendKeyAndWait(
popup, ui::VKEY_W, ui::EF_CONTROL_DOWN,
- chrome::NOTIFICATION_BROWSER_CLOSED, Source<Browser>(popup)));
+ chrome::NOTIFICATION_BROWSER_CLOSED, content::Source<Browser>(popup)));
// Create another popup.
popup = CreateBrowserForPopup(browser()->profile());
@@ -471,7 +473,7 @@ class OmniboxViewTest : public InProcessBrowserTest,
// Try alt-f4 to close the popup.
ASSERT_TRUE(SendKeyAndWait(
popup, ui::VKEY_F4, ui::EF_ALT_DOWN,
- chrome::NOTIFICATION_BROWSER_CLOSED, Source<Browser>(popup)));
+ chrome::NOTIFICATION_BROWSER_CLOSED, content::Source<Browser>(popup)));
#endif
}
diff --git a/chrome/browser/ui/panels/base_panel_browser_test.cc b/chrome/browser/ui/panels/base_panel_browser_test.cc
index ad6e2ff..187298d 100644
--- a/chrome/browser/ui/panels/base_panel_browser_test.cc
+++ b/chrome/browser/ui/panels/base_panel_browser_test.cc
@@ -191,7 +191,7 @@ void BasePanelBrowserTest::WaitForPanelActiveState(
expected_state == SHOW_AS_INACTIVE);
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
- Source<Panel>(panel));
+ content::Source<Panel>(panel));
if (panel->IsActive() == (expected_state == SHOW_AS_ACTIVE))
return; // Already in required state.
signal.Wait();
@@ -204,7 +204,7 @@ void BasePanelBrowserTest::WaitForWindowSizeAvailable(Panel* panel) {
NativePanelTesting::Create(panel->native_panel()));
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_PANEL_WINDOW_SIZE_KNOWN,
- Source<Panel>(panel));
+ content::Source<Panel>(panel));
if (panel_testing->IsWindowSizeKnown())
return;
signal.Wait();
@@ -216,7 +216,7 @@ void BasePanelBrowserTest::WaitForBoundsAnimationFinished(Panel* panel) {
NativePanelTesting::Create(panel->native_panel()));
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
- Source<Panel>(panel));
+ content::Source<Panel>(panel));
if (!panel_testing->IsAnimatingBounds())
return;
signal.Wait();
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index 08c1a76c..74e1f1a 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -40,7 +40,7 @@ Panel::Panel(Browser* browser, const gfx::Rect& bounds)
registrar_.Add(this,
content::NOTIFICATION_TAB_ADDED,
- Source<TabContentsDelegate>(browser));
+ content::Source<TabContentsDelegate>(browser));
}
Panel::~Panel() {
@@ -528,8 +528,8 @@ void Panel::ShowAvatarBubble(TabContents* tab_contents, const gfx::Rect& rect) {
}
void Panel::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_TAB_ADDED:
// We also need to know when the render view host changes in order
@@ -537,9 +537,10 @@ void Panel::Observe(int type,
// render view host. However, we cannot register for
// NOTIFICATION_TAB_CONTENTS_SWAPPED until we actually have a
// tab content so we register for it here.
- registrar_.Add(this,
- content::NOTIFICATION_TAB_CONTENTS_SWAPPED,
- Source<TabContents>(browser()->GetSelectedTabContents()));
+ registrar_.Add(
+ this,
+ content::NOTIFICATION_TAB_CONTENTS_SWAPPED,
+ content::Source<TabContents>(browser()->GetSelectedTabContents()));
// Fall-thru to update render view host.
case content::NOTIFICATION_TAB_CONTENTS_SWAPPED: {
diff --git a/chrome/browser/ui/panels/panel.h b/chrome/browser/ui/panels/panel.h
index ffdc44e..b646b9b 100644
--- a/chrome/browser/ui/panels/panel.h
+++ b/chrome/browser/ui/panels/panel.h
@@ -10,8 +10,8 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/rect.h"
class NativePanel;
@@ -28,7 +28,7 @@ class RenderViewHost;
// Panel size is restricted to certain limits.
// - Invoke an appropriate PanelManager function to do stuff that might affect
// other Panels. For example deleting a panel would rearrange other panels.
-class Panel : public BrowserWindow, public NotificationObserver {
+class Panel : public BrowserWindow, public content::NotificationObserver {
public:
enum ExpansionState {
// The panel is fully expanded with both title-bar and the client-area.
@@ -168,10 +168,10 @@ class Panel : public BrowserWindow, public NotificationObserver {
virtual void ShowAvatarBubble(TabContents* tab_contents,
const gfx::Rect& rect) OVERRIDE;
- // NotificationObserver overrides.
+ // content::NotificationObserver overrides.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Construct a native panel BrowserWindow implementation for the specified
// |browser|.
@@ -238,7 +238,7 @@ class Panel : public BrowserWindow, public NotificationObserver {
// been minimized.
int restored_height_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(Panel);
};
diff --git a/chrome/browser/ui/panels/panel_app_browsertest.cc b/chrome/browser/ui/panels/panel_app_browsertest.cc
index 03f696b..50d8e79 100644
--- a/chrome/browser/ui/panels/panel_app_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_app_browsertest.cc
@@ -61,7 +61,7 @@ class PanelAppBrowserTest : public ExtensionBrowserTest {
size_t browser_count = BrowserList::size();
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(browser));
+ content::Source<Browser>(browser));
browser->CloseWindow();
signal.Wait();
// Now we have one less browser instance.
diff --git a/chrome/browser/ui/panels/panel_browser_view.cc b/chrome/browser/ui/panels/panel_browser_view.cc
index 4e49ff4..746e47c 100644
--- a/chrome/browser/ui/panels/panel_browser_view.cc
+++ b/chrome/browser/ui/panels/panel_browser_view.cc
@@ -178,7 +178,7 @@ void PanelBrowserView::OnWidgetActivationChanged(views::Widget* widget,
NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
- Source<Panel>(panel()),
+ content::Source<Panel>(panel()),
NotificationService::NoDetails());
}
@@ -199,7 +199,7 @@ bool PanelBrowserView::AcceleratorPressed(
void PanelBrowserView::AnimationEnded(const ui::Animation* animation) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
- Source<Panel>(panel()),
+ content::Source<Panel>(panel()),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/ui/panels/panel_browser_window_cocoa_unittest.mm b/chrome/browser/ui/panels/panel_browser_window_cocoa_unittest.mm
index 87c841c..9b4648d 100644
--- a/chrome/browser/ui/panels/panel_browser_window_cocoa_unittest.mm
+++ b/chrome/browser/ui/panels/panel_browser_window_cocoa_unittest.mm
@@ -35,7 +35,7 @@ class PanelAnimatedBoundsObserver :
PanelAnimatedBoundsObserver(Panel* panel)
: ui_test_utils::WindowedNotificationObserver(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
- Source<Panel>(panel)) { }
+ content::Source<Panel>(panel)) { }
virtual ~PanelAnimatedBoundsObserver() { }
};
@@ -105,7 +105,7 @@ class PanelBrowserWindowCocoaTest : public CocoaProfileTest {
size_t browser_count = BrowserList::size();
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(browser));
+ content::Source<Browser>(browser));
browser->CloseWindow();
signal.Wait();
// Now we have one less browser instance.
@@ -290,7 +290,7 @@ TEST_F(PanelBrowserWindowCocoaTest, TitlebarViewClose) {
// Simulate clicking Close Button and wait until the Panel closes.
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(panel->browser()));
+ content::Source<Browser>(panel->browser()));
[titlebar simulateCloseButtonClick];
signal.Wait();
EXPECT_EQ(0, manager->num_panels());
diff --git a/chrome/browser/ui/panels/panel_browser_window_gtk.cc b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
index 482b24c..4c8f9f0 100644
--- a/chrome/browser/ui/panels/panel_browser_window_gtk.cc
+++ b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
@@ -150,7 +150,7 @@ void PanelBrowserWindowGtk::OnSizeChanged(int width, int height) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_WINDOW_SIZE_KNOWN,
- Source<Panel>(panel_.get()),
+ content::Source<Panel>(panel_.get()),
NotificationService::NoDetails());
}
@@ -198,7 +198,7 @@ void PanelBrowserWindowGtk::ActiveWindowChanged(GdkWindow* active_window) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
- Source<Panel>(panel_.get()),
+ content::Source<Panel>(panel_.get()),
NotificationService::NoDetails());
}
@@ -430,7 +430,7 @@ void PanelBrowserWindowGtk::DidProcessEvent(GdkEvent* event) {
void PanelBrowserWindowGtk::AnimationEnded(const ui::Animation* animation) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
- Source<Panel>(panel_.get()),
+ content::Source<Panel>(panel_.get()),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc
index f2cb6f6..7804a73 100644
--- a/chrome/browser/ui/panels/panel_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_browsertest.cc
@@ -40,7 +40,7 @@ class PanelBrowserTest : public BasePanelBrowserTest {
size_t browser_count = BrowserList::size();
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(browser));
+ content::Source<Browser>(browser));
browser->CloseWindow();
signal.Wait();
// Now we have one less browser instance.
@@ -83,7 +83,7 @@ class PanelBrowserTest : public BasePanelBrowserTest {
// Test closing the leftmost panel that is from same extension.
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(panel2->browser()));
+ content::Source<Browser>(panel2->browser()));
Panel* panel4 = CreatePanelWithBounds(
web_app::GenerateApplicationNameFromExtensionId(extension2->id()),
gfx::Rect(0, 0, 280, 200));
@@ -95,7 +95,7 @@ class PanelBrowserTest : public BasePanelBrowserTest {
// Test closing the leftmost panel.
ui_test_utils::WindowedNotificationObserver signal2(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(panel4->browser()));
+ content::Source<Browser>(panel4->browser()));
Panel* panel5 = CreatePanelWithBounds(
web_app::GenerateApplicationNameFromExtensionId(extension3->id()),
gfx::Rect(0, 0, 300, 200));
@@ -107,10 +107,10 @@ class PanelBrowserTest : public BasePanelBrowserTest {
// Test closing 2 leftmost panels.
ui_test_utils::WindowedNotificationObserver signal3(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(panel3->browser()));
+ content::Source<Browser>(panel3->browser()));
ui_test_utils::WindowedNotificationObserver signal4(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(panel5->browser()));
+ content::Source<Browser>(panel5->browser()));
Panel* panel6 = CreatePanelWithBounds(
web_app::GenerateApplicationNameFromExtensionId(extension3->id()),
gfx::Rect(0, 0, 500, 200));
@@ -1316,7 +1316,7 @@ IN_PROC_BROWSER_TEST_F(PanelDownloadTest, DownloadNoTabbedBrowser) {
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(browser()));
+ content::Source<Browser>(browser()));
browser()->CloseWindow();
signal.Wait();
ASSERT_EQ(1U, BrowserList::size());
diff --git a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
index 384ab84..05e0664 100644
--- a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
+++ b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
@@ -444,7 +444,7 @@ enum {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
- Source<Panel>(windowShim_->panel()),
+ content::Source<Panel>(windowShim_->panel()),
NotificationService::NoDetails());
}
@@ -514,7 +514,7 @@ enum {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
- Source<Panel>(windowShim_->panel()),
+ content::Source<Panel>(windowShim_->panel()),
NotificationService::NoDetails());
}
@@ -536,7 +536,7 @@ enum {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
- Source<Panel>(windowShim_->panel()),
+ content::Source<Panel>(windowShim_->panel()),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc b/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc
index 36c6a52..3a15f55 100644
--- a/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc
+++ b/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc
@@ -14,8 +14,8 @@
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_pref_service.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.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/models/table_model_observer.h"
@@ -85,8 +85,8 @@ class KeywordEditorControllerTest : public testing::Test,
prefs::kDefaultSearchProviderPrepopulateID, new StringValue(""));
model_->Observe(
chrome::NOTIFICATION_PREF_CHANGED,
- Source<PrefService>(profile_->GetTestingPrefService()),
- Details<std::string>(NULL));
+ content::Source<PrefService>(profile_->GetTestingPrefService()),
+ content::Details<std::string>(NULL));
}
TemplateURLTableModel* table_model() const {
diff --git a/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.cc b/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.cc
index 8b82aec..bc7ec8c 100644
--- a/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.cc
+++ b/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/ui/search_engines/search_engine_tab_helper.h"
#include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
TemplateURLFetcherUICallbacks::TemplateURLFetcherUICallbacks(
@@ -20,7 +20,7 @@ TemplateURLFetcherUICallbacks::TemplateURLFetcherUICallbacks(
tab_contents_(tab_contents) {
registrar_.Add(this,
content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents_));
+ content::Source<TabContents>(tab_contents_));
}
TemplateURLFetcherUICallbacks::~TemplateURLFetcherUICallbacks() {
@@ -50,10 +50,10 @@ void TemplateURLFetcherUICallbacks::ConfirmAddSearchProvider(
void TemplateURLFetcherUICallbacks::Observe(
int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED);
- DCHECK(source == Source<TabContents>(tab_contents_));
+ DCHECK(source == content::Source<TabContents>(tab_contents_));
source_ = NULL;
tab_contents_ = NULL;
}
diff --git a/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h b/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h
index d0bf1bb..c3ac514 100644
--- a/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h
+++ b/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h
@@ -9,15 +9,15 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chrome/browser/search_engines/template_url_fetcher_callbacks.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class SearchEngineTabHelper;
class TabContents;
// Callbacks which display UI for the TemplateURLFetcher.
class TemplateURLFetcherUICallbacks : public TemplateURLFetcherCallbacks,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
TemplateURLFetcherUICallbacks(SearchEngineTabHelper* tab_helper,
TabContents* tab_contents);
@@ -29,10 +29,10 @@ class TemplateURLFetcherUICallbacks : public TemplateURLFetcherCallbacks,
virtual void ConfirmAddSearchProvider(TemplateURL* template_url,
Profile* profile) OVERRIDE;
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
// The SearchEngineTabHelper where this request originated. Can be NULL if the
@@ -43,7 +43,7 @@ class TemplateURLFetcherUICallbacks : public TemplateURLFetcherCallbacks,
TabContents* tab_contents_;
// Handles registering for our notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(TemplateURLFetcherUICallbacks);
};
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
index 6b1a709..db38d5d 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
@@ -301,7 +301,7 @@ TabContentsWrapper::TabContentsWrapper(TabContents* contents)
NotificationService::AllSources());
#if defined(OS_POSIX) && !defined(OS_MACOSX)
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(
+ content::Source<ThemeService>(
ThemeServiceFactory::GetForProfile(profile())));
#endif
@@ -570,8 +570,8 @@ void TabContentsWrapper::TabContentsDestroyed(TabContents* tab) {
}
void TabContentsWrapper::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_GOOGLE_URL_UPDATED:
UpdateAlternateErrorPageURL(render_view_host());
@@ -586,8 +586,9 @@ void TabContentsWrapper::Observe(int type,
}
#endif
case chrome::NOTIFICATION_PREF_CHANGED: {
- std::string* pref_name_in = Details<std::string>(details).ptr();
- DCHECK(Source<PrefService>(source).ptr() == profile()->GetPrefs());
+ std::string* pref_name_in = content::Details<std::string>(details).ptr();
+ DCHECK(content::Source<PrefService>(source).ptr() ==
+ profile()->GetPrefs());
if (*pref_name_in == prefs::kAlternateErrorPagesEnabled) {
UpdateAlternateErrorPageURL(render_view_host());
} else if ((*pref_name_in == prefs::kDefaultCharset) ||
@@ -616,8 +617,8 @@ void TabContentsWrapper::Observe(int type,
void TabContentsWrapper::OnSnapshot(const SkBitmap& bitmap) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_SNAPSHOT_TAKEN,
- Source<TabContentsWrapper>(this),
- Details<const SkBitmap>(&bitmap));
+ content::Source<TabContentsWrapper>(this),
+ content::Details<const SkBitmap>(&bitmap));
}
void TabContentsWrapper::OnPDFHasUnsupportedFeature() {
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.h b/chrome/browser/ui/tab_contents/tab_contents_wrapper.h
index 659c1955..ca519de 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.h
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.h
@@ -16,7 +16,7 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper_synced_tab_delegate.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
class AutocompleteHistoryManager;
class AutofillManager;
@@ -79,7 +79,7 @@ class ClientSideDetectionHost;
// the browser front-end is concerned, and the current TabContents will be
// renamed to something like WebPage or WebView (ben's suggestions).
class TabContentsWrapper : public TabContentsObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// Takes ownership of |contents|, which must be heap-allocated (as it lives
// in a scoped_ptr) and can not be NULL.
@@ -223,10 +223,10 @@ class TabContentsWrapper : public TabContentsObserver,
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE;
- // NotificationObserver overrides:
+ // content::NotificationObserver overrides:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
// Internal helpers ----------------------------------------------------------
@@ -257,7 +257,7 @@ class TabContentsWrapper : public TabContentsObserver,
// Delegate for notifying our owner about stuff. Not owned by us.
TabContentsWrapperDelegate* delegate_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
PrefChangeRegistrar pref_change_registrar_;
// Helper which implements the SyncedTabDelegate interface.
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index b9ec9fb..a884f78 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -36,7 +36,7 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -207,8 +207,9 @@ WrenchMenuModel::WrenchMenuModel(ui::AcceleratorProvider* provider,
tabstrip_model_->AddObserver(this);
- registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
- Source<HostZoomMap>(browser_->profile()->GetHostZoomMap()));
+ registrar_.Add(
+ this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
+ content::Source<HostZoomMap>(browser_->profile()->GetHostZoomMap()));
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
NotificationService::AllSources());
}
@@ -412,8 +413,8 @@ void WrenchMenuModel::TabStripModelDeleted() {
}
void WrenchMenuModel::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_ZOOM_LEVEL_CHANGED:
case content::NOTIFICATION_NAV_ENTRY_COMMITTED:
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.h b/chrome/browser/ui/toolbar/wrench_menu_model.h
index 1b5cf6a..5d9aa8f 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.h
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.h
@@ -10,8 +10,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/tabs/tab_strip_model_observer.h"
#include "chrome/browser/ui/toolbar/bookmark_sub_menu_model.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/models/accelerator.h"
#include "ui/base/models/button_menu_item_model.h"
#include "ui/base/models/simple_menu_model.h"
@@ -76,7 +76,7 @@ class WrenchMenuModel : public ui::SimpleMenuModel,
public ui::SimpleMenuModel::Delegate,
public ui::ButtonMenuItemModel::Delegate,
public TabStripModelObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
WrenchMenuModel(ui::AcceleratorProvider* provider, Browser* browser);
virtual ~WrenchMenuModel();
@@ -108,10 +108,10 @@ class WrenchMenuModel : public ui::SimpleMenuModel,
int index) OVERRIDE;
virtual void TabStripModelDeleted() OVERRIDE;
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Getters.
Browser* browser() const { return browser_; }
@@ -157,7 +157,7 @@ class WrenchMenuModel : public ui::SimpleMenuModel,
Browser* browser_; // weak
TabStripModel* tabstrip_model_; // weak
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(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 fb9fb24..4626f00 100644
--- a/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc
+++ b/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/ui/views/accessibility_event_router_views.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "views/controls/button/text_button.h"
@@ -87,7 +87,7 @@ class AccessibilityWindowDelegate : public views::WidgetDelegate {
class AccessibilityEventRouterViewsTest
: public testing::Test,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
virtual void SetUp() {
views::ViewsDelegate::views_delegate = new AccessibilityViewsDelegate();
@@ -111,11 +111,11 @@ class AccessibilityEventRouterViewsTest
// Implement NotificationObserver::Observe and store information about a
// ACCESSIBILITY_CONTROL_FOCUSED event.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
ASSERT_EQ(type, chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED);
const AccessibilityControlInfo* info =
- Details<const AccessibilityControlInfo>(details).ptr();
+ content::Details<const AccessibilityControlInfo>(details).ptr();
focus_event_count_++;
last_control_name_ = info->name();
}
@@ -157,7 +157,7 @@ TEST_F(AccessibilityEventRouterViewsTest, MAYBE_TestFocusNotification) {
button1->RequestFocus();
// Start listening to ACCESSIBILITY_CONTROL_FOCUSED notifications.
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
registrar.Add(this,
chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED,
NotificationService::AllSources());
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
index 743ae14..0db33c9 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -1116,13 +1116,13 @@ void BookmarkBarView::ShowContextMenuForView(View* source,
}
void BookmarkBarView::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(browser_->profile());
switch (type) {
case chrome::NOTIFICATION_BOOKMARK_BUBBLE_SHOWN: {
StopThrobbing(true);
- GURL url = *(Details<GURL>(details).ptr());
+ GURL url = *(content::Details<GURL>(details).ptr());
const BookmarkNode* node = model_->GetMostRecentlyAddedNodeForURL(url);
if (!node)
return; // Generally shouldn't happen.
@@ -1174,7 +1174,7 @@ void BookmarkBarView::Init() {
size_animation_.reset(new ui::SlideAnimation(this));
Profile* profile = browser_->profile();
- Source<Profile> ns_source(profile->GetOriginalProfile());
+ content::Source<Profile> ns_source(profile->GetOriginalProfile());
registrar_.Add(this, chrome::NOTIFICATION_BOOKMARK_BUBBLE_SHOWN, ns_source);
registrar_.Add(this, chrome::NOTIFICATION_BOOKMARK_BUBBLE_HIDDEN, ns_source);
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
index 4b70121..cec6378 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
@@ -19,7 +19,7 @@
#include "chrome/browser/ui/views/bookmarks/bookmark_bar_instructions_view.h"
#include "chrome/browser/ui/views/bookmarks/bookmark_menu_controller_views.h"
#include "chrome/browser/ui/views/detachable_toolbar_view.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/animation/animation_delegate.h"
#include "views/context_menu_controller.h"
#include "views/controls/button/button.h"
@@ -54,7 +54,7 @@ class BookmarkBarView : public DetachableToolbarView,
public BookmarkModelObserver,
public views::ViewMenuDelegate,
public views::ButtonListener,
- public NotificationObserver,
+ public content::NotificationObserver,
public views::ContextMenuController,
public views::DragController,
public ui::AnimationDelegate,
@@ -239,8 +239,8 @@ class BookmarkBarView : public DetachableToolbarView,
// NotificationService:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// If true we're running tests. This short circuits a couple of animations.
static bool testing_;
@@ -357,7 +357,7 @@ class BookmarkBarView : public DetachableToolbarView,
// desired bounds. If |compute_bounds_only| = FALSE, the bounds are set.
gfx::Size LayoutItems(bool compute_bounds_only);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Used for opening urls.
PageNavigator* page_navigator_;
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 917eaa2..1888bf8 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
@@ -473,7 +473,7 @@ VIEW_TEST(BookmarkBarViewTest3, Submenus)
// Observer that posts task upon the context menu creation.
// This is necessary for Linux as the context menu has to check
// the clipboard, which invokes the event loop.
-class ContextMenuNotificationObserver : public NotificationObserver {
+class ContextMenuNotificationObserver : public content::NotificationObserver {
public:
explicit ContextMenuNotificationObserver(const base::Closure& task)
: task_(task) {
@@ -483,8 +483,8 @@ class ContextMenuNotificationObserver : public NotificationObserver {
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
MessageLoop::current()->PostTask(FROM_HERE, task_);
}
@@ -492,7 +492,7 @@ class ContextMenuNotificationObserver : public NotificationObserver {
void set_task(const base::Closure& task) { task_ = task; }
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::Closure task_;
DISALLOW_COPY_AND_ASSIGN(ContextMenuNotificationObserver);
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
index 237b56b..d20f96f 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
@@ -105,8 +105,8 @@ void BookmarkBubbleView::Show(views::Widget* parent,
GURL url_ptr(url);
NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_BUBBLE_SHOWN,
- Source<Profile>(profile->GetOriginalProfile()),
- Details<GURL>(&url_ptr));
+ content::Source<Profile>(profile->GetOriginalProfile()),
+ content::Details<GURL>(&url_ptr));
bookmark_bubble_->BubbleShown();
}
@@ -320,7 +320,7 @@ void BookmarkBubbleView::BubbleClosing(Bubble* bubble,
delegate_->BubbleClosing(bubble, closed_by_escape);
NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_BUBBLE_HIDDEN,
- Source<Profile>(profile_->GetOriginalProfile()),
+ content::Source<Profile>(profile_->GetOriginalProfile()),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc b/chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc
index acbfe14..f63b779 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc
@@ -45,7 +45,7 @@ BookmarkContextMenu::~BookmarkContextMenu() {
void BookmarkContextMenu::RunMenuAt(const gfx::Point& point) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_CONTEXT_MENU_SHOWN,
- Source<BookmarkContextMenu>(this),
+ content::Source<BookmarkContextMenu>(this),
NotificationService::NoDetails());
// width/height don't matter here.
if (menu_runner_->RunMenuAt(
diff --git a/chrome/browser/ui/views/browser_actions_container.cc b/chrome/browser/ui/views/browser_actions_container.cc
index 697ce7c6..67b47bc 100644
--- a/chrome/browser/ui/views/browser_actions_container.cc
+++ b/chrome/browser/ui/views/browser_actions_container.cc
@@ -29,7 +29,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/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
@@ -80,7 +80,7 @@ BrowserActionButton::BrowserActionButton(const Extension* extension,
// should call UpdateState() after creation.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
- Source<ExtensionAction>(browser_action_));
+ content::Source<ExtensionAction>(browser_action_));
}
void BrowserActionButton::Destroy() {
@@ -190,8 +190,8 @@ GURL BrowserActionButton::GetPopupUrl() {
}
void BrowserActionButton::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED);
UpdateState();
// The browser action may have become visible/hidden so we need to make
diff --git a/chrome/browser/ui/views/browser_actions_container.h b/chrome/browser/ui/views/browser_actions_container.h
index 4d0c783..688000a 100644
--- a/chrome/browser/ui/views/browser_actions_container.h
+++ b/chrome/browser/ui/views/browser_actions_container.h
@@ -19,8 +19,8 @@
#include "chrome/browser/ui/views/browser_bubble.h"
#include "chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.h"
#include "chrome/browser/ui/views/extensions/extension_popup.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/tween.h"
#include "views/controls/button/menu_button.h"
@@ -60,7 +60,7 @@ class ResizeArea;
class BrowserActionButton : public views::MenuButton,
public views::ButtonListener,
public ImageLoadingTracker::Observer,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
BrowserActionButton(const Extension* extension,
BrowserActionsContainer* panel);
@@ -90,10 +90,10 @@ class BrowserActionButton : public views::MenuButton,
const ExtensionResource& resource,
int index) OVERRIDE;
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// MenuButton behavior overrides. These methods all default to TextButton
// behavior unless this button is a popup. In that case, it uses MenuButton
@@ -143,7 +143,7 @@ class BrowserActionButton : public views::MenuButton,
// The context menu. This member is non-NULL only when the menu is shown.
views::MenuItemView* context_menu_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
friend class DeleteTask<BrowserActionButton>;
diff --git a/chrome/browser/ui/views/collected_cookies_win.cc b/chrome/browser/ui/views/collected_cookies_win.cc
index df6ed68..602eafc 100644
--- a/chrome/browser/ui/views/collected_cookies_win.cc
+++ b/chrome/browser/ui/views/collected_cookies_win.cc
@@ -15,8 +15,8 @@
#include "chrome/browser/ui/views/constrained_window_views.h"
#include "chrome/browser/ui/views/cookie_info_view.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "grit/theme_resources.h"
@@ -178,7 +178,7 @@ CollectedCookiesWin::CollectedCookiesWin(gfx::NativeWindow parent_window,
status_changed_(false) {
TabSpecificContentSettings* content_settings = wrapper->content_settings();
registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN,
- Source<TabSpecificContentSettings>(content_settings));
+ content::Source<TabSpecificContentSettings>(content_settings));
Init();
@@ -503,11 +503,11 @@ void CollectedCookiesWin::AddContentException(views::TreeView* tree_view,
}
///////////////////////////////////////////////////////////////////////////////
-// NotificationObserver implementation.
+// content::NotificationObserver implementation.
void CollectedCookiesWin::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN);
window_->CloseConstrainedWindow();
}
diff --git a/chrome/browser/ui/views/collected_cookies_win.h b/chrome/browser/ui/views/collected_cookies_win.h
index 5f467f7..a0ec632 100644
--- a/chrome/browser/ui/views/collected_cookies_win.h
+++ b/chrome/browser/ui/views/collected_cookies_win.h
@@ -8,8 +8,8 @@
#include "base/compiler_specific.h"
#include "chrome/common/content_settings.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "views/controls/tabbed_pane/tabbed_pane_listener.h"
#include "views/controls/tree/tree_view.h"
#include "views/window/dialog_delegate.h"
@@ -33,7 +33,7 @@ class TextButton;
// ShowCollectedCookiesDialog() on the delegate of the tab contents wrapper's
// content settings tab helper.
class CollectedCookiesWin : public views::DialogDelegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public views::ButtonListener,
public views::TabbedPaneListener,
public views::TreeViewController,
@@ -79,12 +79,12 @@ class CollectedCookiesWin : public views::DialogDelegate,
void AddContentException(views::TreeView* tree_view, ContentSetting setting);
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
ConstrainedWindow* window_;
diff --git a/chrome/browser/ui/views/content_setting_bubble_contents.cc b/chrome/browser/ui/views/content_setting_bubble_contents.cc
index 37e2093..a725f57 100644
--- a/chrome/browser/ui/views/content_setting_bubble_contents.cc
+++ b/chrome/browser/ui/views/content_setting_bubble_contents.cc
@@ -20,7 +20,7 @@
#include "chrome/browser/ui/views/browser_dialogs.h"
#include "chrome/browser/ui/views/bubble/bubble.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -116,7 +116,7 @@ ContentSettingBubbleContents::ContentSettingBubbleContents(
manage_link_(NULL),
close_button_(NULL) {
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
}
ContentSettingBubbleContents::~ContentSettingBubbleContents() {
@@ -178,11 +178,12 @@ void ContentSettingBubbleContents::LinkClicked(views::Link* source,
content_setting_bubble_model_->OnPopupClicked(i->second);
}
-void ContentSettingBubbleContents::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ContentSettingBubbleContents::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED);
- DCHECK(source == Source<TabContents>(tab_contents_));
+ DCHECK(source == content::Source<TabContents>(tab_contents_));
tab_contents_ = NULL;
}
diff --git a/chrome/browser/ui/views/content_setting_bubble_contents.h b/chrome/browser/ui/views/content_setting_bubble_contents.h
index 9f8cbe4..4ea5ced 100644
--- a/chrome/browser/ui/views/content_setting_bubble_contents.h
+++ b/chrome/browser/ui/views/content_setting_bubble_contents.h
@@ -11,8 +11,8 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chrome/common/content_settings_types.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "views/controls/button/button.h"
#include "views/controls/link_listener.h"
@@ -39,7 +39,7 @@ class RadioButton;
class ContentSettingBubbleContents : public views::View,
public views::ButtonListener,
public views::LinkListener,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
ContentSettingBubbleContents(
ContentSettingBubbleModel* content_setting_bubble_model,
@@ -66,10 +66,10 @@ class ContentSettingBubbleContents : public views::View,
// views::LinkListener:
virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Creates the child views.
void InitControlLayout();
@@ -84,7 +84,7 @@ class ContentSettingBubbleContents : public views::View,
TabContents* tab_contents_;
// A registrar for listening for TAB_CONTENTS_DESTROYED notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The Bubble holding us.
Bubble* bubble_;
diff --git a/chrome/browser/ui/views/download/download_started_animation_win.cc b/chrome/browser/ui/views/download/download_started_animation_win.cc
index 9bdda8b..9af05d9 100644
--- a/chrome/browser/ui/views/download/download_started_animation_win.cc
+++ b/chrome/browser/ui/views/download/download_started_animation_win.cc
@@ -5,9 +5,9 @@
#include "chrome/browser/download/download_started_animation.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/theme_resources.h"
#include "ui/base/animation/linear_animation.h"
@@ -35,7 +35,7 @@ namespace {
// simply call "new DownloadStartAnimation"; the class cleans itself up when it
// finishes animating.
class DownloadStartedAnimationWin : public ui::LinearAnimation,
- public NotificationObserver,
+ public content::NotificationObserver,
public views::ImageView {
public:
explicit DownloadStartedAnimationWin(TabContents* tab_contents);
@@ -50,10 +50,10 @@ class DownloadStartedAnimationWin : public ui::LinearAnimation,
// Animation
virtual void AnimateToState(double state);
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// We use a HWND for the popup so that it may float above any HWNDs in our UI.
views::Widget* popup_;
@@ -69,7 +69,7 @@ class DownloadStartedAnimationWin : public ui::LinearAnimation,
gfx::Rect tab_contents_bounds_;
// A scoped container for notification registries.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(DownloadStartedAnimationWin);
};
@@ -94,11 +94,11 @@ DownloadStartedAnimationWin::DownloadStartedAnimationWin(
registrar_.Add(
this,
content::NOTIFICATION_TAB_CONTENTS_HIDDEN,
- Source<TabContents>(tab_contents_));
+ content::Source<TabContents>(tab_contents_));
registrar_.Add(
this,
content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents_));
+ content::Source<TabContents>(tab_contents_));
SetImage(kDownloadImage);
@@ -141,11 +141,11 @@ void DownloadStartedAnimationWin::Close() {
registrar_.Remove(
this,
content::NOTIFICATION_TAB_CONTENTS_HIDDEN,
- Source<TabContents>(tab_contents_));
+ content::Source<TabContents>(tab_contents_));
registrar_.Remove(
this,
content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents_));
+ content::Source<TabContents>(tab_contents_));
tab_contents_ = NULL;
popup_->Close();
}
@@ -167,9 +167,10 @@ void DownloadStartedAnimationWin::AnimateToState(double state) {
}
}
-void DownloadStartedAnimationWin::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void DownloadStartedAnimationWin::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
Close();
}
diff --git a/chrome/browser/ui/views/extensions/extension_dialog.cc b/chrome/browser/ui/views/extensions/extension_dialog.cc
index 98d3c3b..c2bc0b6 100644
--- a/chrome/browser/ui/views/extensions/extension_dialog.cc
+++ b/chrome/browser/ui/views/extensions/extension_dialog.cc
@@ -14,8 +14,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "googleurl/src/gurl.h"
#include "views/widget/widget.h"
@@ -50,7 +50,7 @@ ExtensionDialog::ExtensionDialog(ExtensionHost* host,
// Listen for the containing view calling window.close();
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
- Source<Profile>(host->profile()));
+ content::Source<Profile>(host->profile()));
}
ExtensionDialog::~ExtensionDialog() {
@@ -150,15 +150,15 @@ views::View* ExtensionDialog::GetContentsView() {
}
/////////////////////////////////////////////////////////////////////////////
-// NotificationObserver overrides.
+// content::NotificationObserver overrides.
void ExtensionDialog::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE:
// If we aren't the host of the popup, then disregard the notification.
- if (Details<ExtensionHost>(host()) != details)
+ if (content::Details<ExtensionHost>(host()) != details)
return;
Close();
break;
diff --git a/chrome/browser/ui/views/extensions/extension_dialog.h b/chrome/browser/ui/views/extensions/extension_dialog.h
index d00e204..072a408 100644
--- a/chrome/browser/ui/views/extensions/extension_dialog.h
+++ b/chrome/browser/ui/views/extensions/extension_dialog.h
@@ -7,8 +7,8 @@
#pragma once
#include "base/memory/ref_counted.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "views/widget/widget_delegate.h"
class Browser;
@@ -27,7 +27,7 @@ class Widget;
// Dialog is automatically centered in the browser window and has fixed size.
// For example, used by the Chrome OS file browser.
class ExtensionDialog : public views::WidgetDelegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public base::RefCounted<ExtensionDialog> {
public:
virtual ~ExtensionDialog();
@@ -60,10 +60,10 @@ class ExtensionDialog : public views::WidgetDelegate,
virtual const views::Widget* GetWidget() const OVERRIDE;
virtual views::View* GetContentsView() OVERRIDE;
- // NotificationObserver overrides.
+ // content::NotificationObserver overrides.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// Use Show() to create instances.
@@ -80,7 +80,7 @@ class ExtensionDialog : public views::WidgetDelegate,
// The contained host for the view.
scoped_ptr<ExtensionHost> extension_host_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The observer of this popup.
ExtensionDialogObserver* observer_;
diff --git a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
index c7d1a3a..c8962f8 100644
--- a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
+++ b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
@@ -23,8 +23,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_action.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.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"
@@ -305,18 +305,20 @@ ExtensionInstalledBubble::ExtensionInstalledBubble(const Extension* extension,
// be sure that a BrowserAction or PageAction has had views created which we
// can inspect for the purpose of previewing of pointing to them.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(browser->profile()));
+ content::Source<Profile>(browser->profile()));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(browser->profile()));
+ content::Source<Profile>(browser->profile()));
}
ExtensionInstalledBubble::~ExtensionInstalledBubble() {}
-void ExtensionInstalledBubble::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ExtensionInstalledBubble::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_EXTENSION_LOADED) {
- const Extension* extension = Details<const Extension>(details).ptr();
+ const Extension* extension =
+ content::Details<const Extension>(details).ptr();
if (extension == extension_) {
animation_wait_retries_ = 0;
// PostTask to ourself to allow all EXTENSION_LOADED Observers to run.
@@ -326,7 +328,7 @@ void ExtensionInstalledBubble::Observe(int type,
}
} else if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) {
const Extension* extension =
- Details<UnloadedExtensionInfo>(details)->extension;
+ content::Details<UnloadedExtensionInfo>(details)->extension;
if (extension == extension_)
extension_ = NULL;
} else {
diff --git a/chrome/browser/ui/views/extensions/extension_installed_bubble.h b/chrome/browser/ui/views/extensions/extension_installed_bubble.h
index ef36721..f269ed1 100644
--- a/chrome/browser/ui/views/extensions/extension_installed_bubble.h
+++ b/chrome/browser/ui/views/extensions/extension_installed_bubble.h
@@ -8,8 +8,8 @@
#include "base/memory/ref_counted.h"
#include "chrome/browser/ui/views/bubble/bubble.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "third_party/skia/include/core/SkBitmap.h"
class Browser;
@@ -31,7 +31,7 @@ class SkBitmap;
// ExtensionInstallBubble manages its own lifetime.
class ExtensionInstalledBubble
: public BubbleDelegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public base::RefCountedThreadSafe<ExtensionInstalledBubble> {
public:
// The behavior and content of this Bubble comes in these varieties:
@@ -62,10 +62,10 @@ class ExtensionInstalledBubble
// Shows the bubble. Called internally via PostTask.
void ShowInternal();
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// BubbleDelegate
virtual void BubbleClosing(Bubble* bubble, bool closed_by_escape) OVERRIDE;
@@ -75,7 +75,7 @@ class ExtensionInstalledBubble
const Extension* extension_;
Browser* browser_;
SkBitmap icon_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
InstalledBubbleContent* bubble_content_;
BubbleType type_;
diff --git a/chrome/browser/ui/views/extensions/extension_popup.cc b/chrome/browser/ui/views/extensions/extension_popup.cc
index 949040a..654db01 100644
--- a/chrome/browser/ui/views/extensions/extension_popup.cc
+++ b/chrome/browser/ui/views/extensions/extension_popup.cc
@@ -17,8 +17,8 @@
#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_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "views/widget/root_view.h"
#include "views/widget/widget.h"
@@ -62,11 +62,11 @@ ExtensionPopup::ExtensionPopup(
// We wait to show the popup until the contained host finishes loading.
registrar_.Add(this,
chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
- Source<Profile>(host->profile()));
+ content::Source<Profile>(host->profile()));
// Listen for the containing view calling window.close();
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
- Source<Profile>(host->profile()));
+ content::Source<Profile>(host->profile()));
}
ExtensionPopup::~ExtensionPopup() {
@@ -118,19 +118,21 @@ void ExtensionPopup::BubbleLostFocus(BrowserBubble* bubble,
void ExtensionPopup::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING:
// Once we receive did stop loading, the content will be complete and
// the width will have been computed. Now it's safe to show.
- if (extension_host_.get() == Details<ExtensionHost>(details).ptr()) {
+ if (extension_host_.get() ==
+ content::Details<ExtensionHost>(details).ptr()) {
Show(true);
if (inspect_with_devtools_) {
// Listen for the the devtools window closing.
registrar_.Add(this, content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING,
- Source<content::BrowserContext>(extension_host_->profile()));
+ content::Source<content::BrowserContext>(
+ extension_host_->profile()));
DevToolsWindow::ToggleDevToolsWindow(
extension_host_->render_view_host(),
DEVTOOLS_TOGGLE_ACTION_SHOW_CONSOLE);
@@ -139,15 +141,15 @@ void ExtensionPopup::Observe(int type,
break;
case chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE:
// If we aren't the host of the popup, then disregard the notification.
- if (Details<ExtensionHost>(host()) != details)
+ if (content::Details<ExtensionHost>(host()) != details)
return;
Close();
break;
case content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING:
// Make sure its the devtools window that inspecting our popup.
- if (Details<RenderViewHost>(extension_host_->render_view_host()) !=
- details)
+ if (content::Details<RenderViewHost>(
+ extension_host_->render_view_host()) != details)
return;
// If the devtools window is closing, we post a task to ourselves to
diff --git a/chrome/browser/ui/views/extensions/extension_popup.h b/chrome/browser/ui/views/extensions/extension_popup.h
index c1a9412..0f55df8 100644
--- a/chrome/browser/ui/views/extensions/extension_popup.h
+++ b/chrome/browser/ui/views/extensions/extension_popup.h
@@ -10,7 +10,7 @@
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/ui/views/browser_bubble.h"
#include "chrome/browser/ui/views/extensions/extension_view.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "googleurl/src/gurl.h"
#include "views/bubble/bubble_border.h"
@@ -26,7 +26,7 @@ class Widget;
class ExtensionPopup : public BrowserBubble,
public BrowserBubble::Delegate,
public ExtensionView::Container,
- public NotificationObserver,
+ public content::NotificationObserver,
public base::RefCounted<ExtensionPopup> {
public:
// Observer to ExtensionPopup events.
@@ -82,10 +82,10 @@ class ExtensionPopup : public BrowserBubble,
virtual void BubbleLostFocus(BrowserBubble* bubble,
bool lost_focus_to_child);
- // NotificationObserver overrides.
+ // content::NotificationObserver overrides.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// ExtensionView::Container overrides.
virtual void OnExtensionMouseMove(ExtensionView* view) { }
@@ -122,7 +122,7 @@ class ExtensionPopup : public BrowserBubble,
// Whether the ExtensionPopup is current going about closing itself.
bool closing_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The observer of this popup.
Observer* observer_;
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 89ccea0..0408ed0 100644
--- a/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
+++ b/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
@@ -332,7 +332,8 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, MAYBE_PasteWithoutTextChange) {
// Press Ctrl-V to paste the content back, it should start finding even if the
// content is not changed.
- Source<TabContents> notification_source(browser()->GetSelectedTabContents());
+ content::Source<TabContents> notification_source(
+ browser()->GetSelectedTabContents());
ui_test_utils::WindowedNotificationObserverWithDetails
<FindNotificationDetails> observer(
chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, notification_source);
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index e36302d..31d8ec6 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -329,9 +329,10 @@ BrowserView::BrowserView(Browser* browser)
{
browser_->tabstrip_model()->AddObserver(this);
- registrar_.Add(this,
- chrome::NOTIFICATION_SIDEBAR_CHANGED,
- Source<SidebarManager>(SidebarManager::GetInstance()));
+ registrar_.Add(
+ this,
+ chrome::NOTIFICATION_SIDEBAR_CHANGED,
+ content::Source<SidebarManager>(SidebarManager::GetInstance()));
}
BrowserView::~BrowserView() {
@@ -1336,14 +1337,14 @@ ToolbarView* BrowserView::GetToolbarView() const {
}
///////////////////////////////////////////////////////////////////////////////
-// BrowserView, NotificationObserver implementation:
+// BrowserView, content::NotificationObserver implementation:
void BrowserView::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_SIDEBAR_CHANGED:
- if (Details<SidebarContainer>(details)->tab_contents() ==
+ if (content::Details<SidebarContainer>(details)->tab_contents() ==
browser_->GetSelectedTabContents()) {
UpdateSidebar();
}
@@ -1676,7 +1677,7 @@ bool BrowserView::CanClose() {
// Empty TabStripModel, it's now safe to allow the Window to be closed.
NotificationService::current()->Notify(
chrome::NOTIFICATION_WINDOW_CLOSED,
- Source<gfx::NativeWindow>(frame_->GetNativeWindow()),
+ content::Source<gfx::NativeWindow>(frame_->GetNativeWindow()),
NotificationService::NoDetails());
return true;
}
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
index f0e844f..e0121e5 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -22,7 +22,7 @@
#include "chrome/browser/ui/views/tab_contents/tab_contents_container.h"
#include "chrome/browser/ui/views/tabs/abstract_tab_strip_view.h"
#include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/models/simple_menu_model.h"
#include "ui/gfx/native_widget_types.h"
#include "views/controls/single_split_view.h"
@@ -81,7 +81,7 @@ class Menu;
class BrowserView : public BrowserBubbleHost,
public BrowserWindow,
public BrowserWindowTesting,
- public NotificationObserver,
+ public content::NotificationObserver,
public TabStripModelObserver,
public ui::SimpleMenuModel::Delegate,
public views::WidgetDelegate,
@@ -339,10 +339,10 @@ class BrowserView : public BrowserBubbleHost,
virtual views::View* GetSidebarContainerView() const OVERRIDE;
virtual ToolbarView* GetToolbarView() const OVERRIDE;
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Overridden from TabStripModelObserver:
virtual void TabDetachedAt(TabContentsWrapper* contents, int index) OVERRIDE;
@@ -703,7 +703,7 @@ class BrowserView : public BrowserBubbleHost,
UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Used to measure the loading spinner animation rate.
base::TimeTicks last_animation_time_;
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 b205560..febcc68 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -475,9 +475,10 @@ void GlassBrowserFrameView::DisplayNextThrobberFrame() {
reinterpret_cast<LPARAM>(throbber_icons_[throbber_frame_]));
}
-void GlassBrowserFrameView::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void GlassBrowserFrameView::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED:
UpdateAvatarInfo();
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.h b/chrome/browser/ui/views/frame/glass_browser_frame_view.h
index bb8f96f..c993244 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.h
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.h
@@ -9,8 +9,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/views/frame/browser_frame_win.h"
#include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "views/controls/button/button.h"
#include "views/window/non_client_view.h"
@@ -19,7 +19,7 @@ class AvatarMenuButton;
class SkBitmap;
class GlassBrowserFrameView : public BrowserNonClientFrameView,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// Constructs a non-client view for an BrowserFrame.
GlassBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view);
@@ -83,10 +83,10 @@ class GlassBrowserFrameView : public BrowserNonClientFrameView,
// Displays the next throbber frame.
void DisplayNextThrobberFrame();
- // NotificationObserver implementation:
+ // content::NotificationObserver implementation:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Updates the title and icon of the avatar button.
void UpdateAvatarInfo();
@@ -113,7 +113,7 @@ class GlassBrowserFrameView : public BrowserNonClientFrameView,
// The index of the current frame of the throbber animation.
int throbber_frame_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
static const int kThrobberIconCount = 24;
static HICON throbber_icons_[kThrobberIconCount];
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 85d7b73..dc623fd 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -490,9 +490,10 @@ SkBitmap OpaqueBrowserFrameView::GetFaviconForTabIconView() {
///////////////////////////////////////////////////////////////////////////////
// OpaqueBrowserFrameView, protected:
-void OpaqueBrowserFrameView::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void OpaqueBrowserFrameView::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED:
UpdateAvatarInfo();
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.h b/chrome/browser/ui/views/frame/opaque_browser_frame_view.h
index d678ec4..09a52c2 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.h
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.h
@@ -10,8 +10,8 @@
#include "chrome/browser/ui/views/frame/browser_frame.h"
#include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
#include "chrome/browser/ui/views/tab_icon_view.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "views/controls/button/button.h"
#include "views/window/non_client_view.h"
@@ -27,7 +27,7 @@ class ImageView;
}
class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
- public NotificationObserver,
+ public content::NotificationObserver,
public views::ButtonListener,
public TabIconView::TabIconViewModel {
public:
@@ -98,10 +98,10 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
virtual SkBitmap GetFaviconForTabIconView() OVERRIDE;
protected:
- // NotificationObserver implementation:
+ // content::NotificationObserver implementation:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
// Returns the thickness of the border that makes up the window frame edges.
@@ -187,7 +187,7 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
// icon.
scoped_ptr<AvatarMenuButton> avatar_button_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView);
};
diff --git a/chrome/browser/ui/views/html_dialog_view.cc b/chrome/browser/ui/views/html_dialog_view.cc
index 07b827e..116795d 100644
--- a/chrome/browser/ui/views/html_dialog_view.cc
+++ b/chrome/browser/ui/views/html_dialog_view.cc
@@ -10,9 +10,9 @@
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/views/window.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
#include "content/public/browser/native_web_keyboard_event.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "views/events/event.h"
@@ -248,25 +248,25 @@ void HtmlDialogView::InitDialog() {
notification_registrar_.Add(
this,
content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
notification_registrar_.Add(
this,
content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
DOMView::LoadURL(GetDialogContentURL());
}
void HtmlDialogView::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB: {
- RenderWidgetHost* rwh = Details<RenderWidgetHost>(details).ptr();
+ RenderWidgetHost* rwh = content::Details<RenderWidgetHost>(details).ptr();
notification_registrar_.Add(
this,
content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT,
- Source<RenderWidgetHost>(rwh));
+ content::Source<RenderWidgetHost>(rwh));
break;
}
case content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME:
diff --git a/chrome/browser/ui/views/html_dialog_view.h b/chrome/browser/ui/views/html_dialog_view.h
index f75e0dd..da8c3ad 100644
--- a/chrome/browser/ui/views/html_dialog_view.h
+++ b/chrome/browser/ui/views/html_dialog_view.h
@@ -13,8 +13,8 @@
#include "chrome/browser/ui/views/dom_view.h"
#include "chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h"
#include "chrome/browser/ui/webui/html_dialog_ui.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/size.h"
#include "views/widget/widget_delegate.h"
@@ -38,7 +38,7 @@ class HtmlDialogView
public HtmlDialogTabContentsDelegate,
public HtmlDialogUIDelegate,
public views::WidgetDelegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
HtmlDialogView(Profile* profile, HtmlDialogUIDelegate* delegate);
virtual ~HtmlDialogView();
@@ -84,10 +84,10 @@ class HtmlDialogView
OVERRIDE;
virtual void CloseContents(TabContents* source) OVERRIDE;
- // Overridden from NotificationObserver
+ // Overridden from content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
protected:
// Register accelerators for this dialog.
@@ -115,7 +115,7 @@ class HtmlDialogView
// using this variable.
HtmlDialogUIDelegate* delegate_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
DISALLOW_COPY_AND_ASSIGN(HtmlDialogView);
};
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 7aaa461..723c05c 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -337,7 +337,7 @@ void LocationBarView::UpdatePageActions() {
if (page_action_views_.size() != count_before) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
- Source<LocationBar>(this),
+ content::Source<LocationBar>(this),
NotificationService::NoDetails());
}
@@ -351,7 +351,7 @@ void LocationBarView::InvalidatePageActions() {
if (page_action_views_.size() != count_before) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
- Source<LocationBar>(this),
+ content::Source<LocationBar>(this),
NotificationService::NoDetails());
}
}
@@ -997,8 +997,8 @@ void LocationBarView::RefreshPageActionViews() {
old_visibility[action] != (*i)->IsVisible()) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
- Source<ExtensionAction>(action),
- Details<TabContents>(contents));
+ content::Source<ExtensionAction>(action),
+ content::Details<TabContents>(contents));
}
}
}
@@ -1257,10 +1257,10 @@ void LocationBarView::OnTemplateURLServiceChanged() {
}
void LocationBarView::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED) {
- std::string* name = Details<std::string>(details).ptr();
+ std::string* name = content::Details<std::string>(details).ptr();
if (*name == prefs::kEditBookmarksEnabled)
Update(NULL);
}
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h
index f2c5f01..4524234 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.h
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.h
@@ -73,7 +73,7 @@ class LocationBarView : public LocationBar,
public AutocompleteEditController,
public DropdownBarHostDelegate,
public TemplateURLServiceObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// The location bar view's class name.
static const char kViewClassName[];
@@ -264,10 +264,10 @@ class LocationBarView : public LocationBar,
// Overridden from TemplateURLServiceObserver
virtual void OnTemplateURLServiceChanged() OVERRIDE;
- // Overridden from NotificationObserver
+ // Overridden from content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Thickness of the left and right edges of the omnibox, in normal mode.
static const int kNormalHorizontalEdgeThickness;
diff --git a/chrome/browser/ui/views/notifications/balloon_view.cc b/chrome/browser/ui/views/notifications/balloon_view.cc
index bfab4ca..15487e1 100644
--- a/chrome/browser/ui/views/notifications/balloon_view.cc
+++ b/chrome/browser/ui/views/notifications/balloon_view.cc
@@ -19,8 +19,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -379,7 +379,7 @@ void BalloonViewImpl::Show(Balloon* balloon) {
notification_registrar_.Add(
this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
- Source<Balloon>(balloon));
+ content::Source<Balloon>(balloon));
}
void BalloonViewImpl::CreateOptionsMenu() {
@@ -503,8 +503,8 @@ void BalloonViewImpl::OnBoundsChanged(const gfx::Rect& previous_bounds) {
}
void BalloonViewImpl::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type != chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED) {
NOTREACHED();
return;
@@ -514,6 +514,6 @@ void BalloonViewImpl::Observe(int type,
// (e.g., because of a crash), we want to close the balloon.
notification_registrar_.Remove(
this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
- Source<Balloon>(balloon_));
+ content::Source<Balloon>(balloon_));
Close(false);
}
diff --git a/chrome/browser/ui/views/notifications/balloon_view.h b/chrome/browser/ui/views/notifications/balloon_view.h
index 83393dd..979814a 100644
--- a/chrome/browser/ui/views/notifications/balloon_view.h
+++ b/chrome/browser/ui/views/notifications/balloon_view.h
@@ -13,7 +13,7 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/notifications/balloon.h"
#include "chrome/browser/ui/views/notifications/balloon_view_host.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/gfx/path.h"
#include "ui/gfx/point.h"
@@ -26,9 +26,7 @@
#include "views/widget/widget_delegate.h"
class BalloonCollection;
-class NotificationDetails;
class NotificationOptionsMenuModel;
-class NotificationSource;
namespace ui {
class SlideAnimation;
@@ -48,7 +46,7 @@ class BalloonViewImpl : public BalloonView,
public views::ViewMenuDelegate,
public views::WidgetDelegateView,
public views::ButtonListener,
- public NotificationObserver,
+ public content::NotificationObserver,
public ui::AnimationDelegate {
public:
explicit BalloonViewImpl(BalloonCollection* collection);
@@ -79,10 +77,10 @@ class BalloonViewImpl : public BalloonView,
virtual void ButtonPressed(
views::Button* sender, const views::Event&) OVERRIDE;
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// ui::AnimationDelegate interface.
virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
@@ -159,7 +157,7 @@ class BalloonViewImpl : public BalloonView,
scoped_ptr<views::MenuRunner> menu_runner_;
views::MenuButton* options_menu_button_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
DISALLOW_COPY_AND_ASSIGN(BalloonViewImpl);
};
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index d8988d1..a7b9408 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -592,11 +592,11 @@ int OmniboxViewViews::OnPerformDrop(const views::DropTargetEvent& event) {
}
////////////////////////////////////////////////////////////////////////////////
-// OmniboxViewViews, NotificationObserver implementation:
+// OmniboxViewViews, content::NotificationObserver implementation:
void OmniboxViewViews::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
SetBaseColor();
}
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.h b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
index 3af1349..2db5ed3 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.h
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
@@ -13,7 +13,7 @@
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/ui/omnibox/omnibox_view.h"
#include "chrome/browser/ui/toolbar/toolbar_model.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "ui/base/range/range.h"
#include "views/controls/textfield/textfield_controller.h"
#include "views/view.h"
@@ -35,7 +35,7 @@ class TabContents;
// Instant.
class OmniboxViewViews : public views::View,
public OmniboxView,
- public NotificationObserver,
+ public content::NotificationObserver,
public views::TextfieldController {
public:
// The internal view class name.
@@ -124,10 +124,10 @@ class OmniboxViewViews : public views::View,
virtual views::View* AddToView(views::View* parent) OVERRIDE;
virtual int OnPerformDrop(const views::DropTargetEvent& event) OVERRIDE;
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// views::TextfieldController:
virtual void ContentsChanged(views::Textfield* sender,
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_container.cc b/chrome/browser/ui/views/tab_contents/tab_contents_container.cc
index 26983ac..0bbf679 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_container.cc
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_container.cc
@@ -10,8 +10,8 @@
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "ui/base/accessibility/accessible_view_state.h"
@@ -63,18 +63,19 @@ void TabContentsContainer::SetReservedContentsRect(
}
////////////////////////////////////////////////////////////////////////////////
-// TabContentsContainer, NotificationObserver implementation:
+// TabContentsContainer, content::NotificationObserver implementation:
-void TabContentsContainer::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void TabContentsContainer::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED) {
RenderViewHostSwitchedDetails* switched_details =
- Details<RenderViewHostSwitchedDetails>(details).ptr();
+ content::Details<RenderViewHostSwitchedDetails>(details).ptr();
RenderViewHostChanged(switched_details->old_host,
switched_details->new_host);
} else if (type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED) {
- TabContentsDestroyed(Source<TabContents>(source).ptr());
+ TabContentsDestroyed(content::Source<TabContents>(source).ptr());
} else {
NOTREACHED();
}
@@ -152,13 +153,15 @@ void TabContentsContainer::AddObservers() {
// TabContents can change their RenderViewHost and hence the HWND that is
// shown and getting focused. We need to keep track of that so we install
// the focus subclass on the shown HWND so we intercept focus change events.
- registrar_.Add(this,
- content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
- Source<NavigationController>(&tab_contents_->controller()));
-
- registrar_.Add(this,
- content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents_));
+ registrar_.Add(
+ this,
+ content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
+ content::Source<NavigationController>(&tab_contents_->controller()));
+
+ registrar_.Add(
+ this,
+ content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
+ content::Source<TabContents>(tab_contents_));
}
void TabContentsContainer::RemoveObservers() {
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_container.h b/chrome/browser/ui/views/tab_contents/tab_contents_container.h
index e864bc5..ef96561 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_container.h
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_container.h
@@ -7,8 +7,8 @@
#pragma once
#include "chrome/browser/ui/views/tab_contents/native_tab_contents_container.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "views/view.h"
class NativeTabContentsContainer;
@@ -17,7 +17,7 @@ class RenderWidgetHostView;
class TabContents;
class TabContentsContainer : public views::View,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
TabContentsContainer();
virtual ~TabContentsContainer();
@@ -41,10 +41,10 @@ class TabContentsContainer : public views::View,
// should not be rendered to draw the resize corner, sidebar mini tabs etc.
void SetReservedContentsRect(const gfx::Rect& reserved_rect);
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Overridden from views::View:
virtual void Layout() OVERRIDE;
@@ -84,7 +84,7 @@ class TabContentsContainer : public views::View,
TabContents* tab_contents_;
// Handles registering for our notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The current reserved rect in view coordinates where contents should not be
// rendered to draw the resize corner, sidebar mini tabs etc.
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_container_native.cc b/chrome/browser/ui/views/tab_contents/tab_contents_container_native.cc
index 10674fd..a657106 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_container_native.cc
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_container_native.cc
@@ -14,8 +14,8 @@
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
// Some of this class is implemented in tab_contents_container.cc, where
// the implementation doesn't vary between a pure views approach and a
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_container_native.h b/chrome/browser/ui/views/tab_contents/tab_contents_container_native.h
index f6b5bc1..9e56d32 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_container_native.h
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_container_native.h
@@ -7,8 +7,8 @@
#pragma once
#include "chrome/browser/ui/views/tab_contents/native_tab_contents_container.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "views/view.h"
class NativeTabContentsContainer;
@@ -17,7 +17,7 @@ class RenderWidgetHostView;
class TabContents;
class TabContentsContainer : public views::View,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
TabContentsContainer();
virtual ~TabContentsContainer();
@@ -41,10 +41,10 @@ class TabContentsContainer : public views::View,
// should not be rendered to draw the resize corner, sidebar mini tabs etc.
void SetReservedContentsRect(const gfx::Rect& reserved_rect);
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Overridden from views::View:
virtual void Layout() OVERRIDE;
@@ -84,7 +84,7 @@ class TabContentsContainer : public views::View,
TabContents* tab_contents_;
// Handles registering for our notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The current reserved rect in view coordinates where contents should not be
// rendered to draw the resize corner, sidebar mini tabs etc.
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 8cadbb8..6bfd318 100644
--- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -396,10 +396,11 @@ void BrowserTabStripController::TabBlockedStateChanged(
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserTabStripController, NotificationObserver implementation:
+// BrowserTabStripController, content::NotificationObserver implementation:
void BrowserTabStripController::Observe(int type,
- const NotificationSource& source, const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_TAB_CLOSEABLE_STATE_CHANGED);
// Note that this notification may be fired during a model mutation and
// possibly before the tabstrip has processed the change.
diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h
index e2085e4..7d43e42 100644
--- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h
+++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h
@@ -10,8 +10,8 @@
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/tabs/hover_tab_selector.h"
#include "chrome/browser/ui/views/tabs/tab_strip_controller.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class BaseTab;
class BaseTabStrip;
@@ -24,7 +24,7 @@ struct TabRendererData;
// TabContentsWrappers in a TabStripModel.
class BrowserTabStripController : public TabStripController,
public TabStripModelObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
BrowserTabStripController(Browser* browser, TabStripModel* model);
virtual ~BrowserTabStripController();
@@ -90,10 +90,10 @@ class BrowserTabStripController : public TabStripController,
virtual void TabBlockedStateChanged(TabContentsWrapper* contents,
int model_index) OVERRIDE;
- // NotificationObserver implementation:
+ // content::NotificationObserver implementation:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
protected:
// The context in which SetTabRendererDataFromModel is being called.
@@ -137,7 +137,7 @@ class BrowserTabStripController : public TabStripController,
// If non-NULL it means we're showing a menu for the tab.
scoped_ptr<TabContextMenuContents> context_menu_contents_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
// Helper for performing tab selection as a result of dragging over a tab.
HoverTabSelector hover_tab_selector_;
diff --git a/chrome/browser/ui/views/tabs/dragged_tab_controller.cc b/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
index 7beb19d..317931f 100644
--- a/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
+++ b/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
@@ -23,8 +23,8 @@
#include "chrome/browser/ui/views/tabs/tab_strip.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/theme_resources.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -390,9 +390,10 @@ void DraggedTabController::InitTabDragData(BaseTab* tab,
drag_data->contents = GetModel(source_tabstrip_)->GetTabContentsAt(
drag_data->source_model_index);
drag_data->pinned = source_tabstrip_->IsTabPinned(tab);
- registrar_.Add(this,
- content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(drag_data->contents->tab_contents()));
+ registrar_.Add(
+ this,
+ content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
+ content::Source<TabContents>(drag_data->contents->tab_contents()));
// We need to be the delegate so we receive messages about stuff, otherwise
// our dragged TabContents may be replaced and subsequently
@@ -474,13 +475,14 @@ DraggedTabController::GetJavaScriptDialogCreator() {
}
///////////////////////////////////////////////////////////////////////////////
-// DraggedTabController, NotificationObserver implementation:
+// DraggedTabController, content::NotificationObserver implementation:
-void DraggedTabController::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void DraggedTabController::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(type, content::NOTIFICATION_TAB_CONTENTS_DESTROYED);
- TabContents* destroyed_contents = Source<TabContents>(source).ptr();
+ TabContents* destroyed_contents = content::Source<TabContents>(source).ptr();
for (size_t i = 0; i < drag_data_.size(); ++i) {
if (drag_data_[i].contents->tab_contents() == destroyed_contents) {
// One of the tabs we're dragging has been destroyed. Cancel the drag.
diff --git a/chrome/browser/ui/views/tabs/dragged_tab_controller.h b/chrome/browser/ui/views/tabs/dragged_tab_controller.h
index ed50e6e..3c0827e 100644
--- a/chrome/browser/ui/views/tabs/dragged_tab_controller.h
+++ b/chrome/browser/ui/views/tabs/dragged_tab_controller.h
@@ -14,8 +14,8 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/browser/ui/tabs/dock_info.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/rect.h"
namespace views {
@@ -40,7 +40,7 @@ struct TabRendererData;
//
///////////////////////////////////////////////////////////////////////////////
class DraggedTabController : public TabContentsDelegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public MessageLoopForUI::Observer {
public:
DraggedTabController();
@@ -148,10 +148,10 @@ class DraggedTabController : public TabContentsDelegate,
virtual content::JavaScriptDialogCreator*
GetJavaScriptDialogCreator() OVERRIDE;
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Overridden from MessageLoop::Observer:
#if defined(OS_WIN) || defined(TOUCH_UI) || defined(USE_AURA)
@@ -295,7 +295,7 @@ class DraggedTabController : public TabContentsDelegate,
TabStripModel* GetModel(BaseTabStrip* tabstrip) const;
// Handles registering for notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The TabStrip the drag originated from.
BaseTabStrip* source_tabstrip_;
diff --git a/chrome/browser/ui/views/theme_install_bubble_view.cc b/chrome/browser/ui/views/theme_install_bubble_view.cc
index 79c52e3..d4824d2 100644
--- a/chrome/browser/ui/views/theme_install_bubble_view.cc
+++ b/chrome/browser/ui/views/theme_install_bubble_view.cc
@@ -157,9 +157,10 @@ void ThemeInstallBubbleView::Close() {
}
}
-void ThemeInstallBubbleView::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ThemeInstallBubbleView::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
Close();
}
diff --git a/chrome/browser/ui/views/theme_install_bubble_view.h b/chrome/browser/ui/views/theme_install_bubble_view.h
index 08aacc8..fbcb5e7 100644
--- a/chrome/browser/ui/views/theme_install_bubble_view.h
+++ b/chrome/browser/ui/views/theme_install_bubble_view.h
@@ -7,8 +7,8 @@
#pragma once
#include "base/string16.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/canvas.h"
#include "views/controls/label.h"
@@ -31,15 +31,15 @@ class Widget;
// between install begin and theme caching seizing the UI thread), the loading
// bubble will only appear over the first window, as there is only ever one
// instance of the bubble.
-class ThemeInstallBubbleView : public NotificationObserver,
+class ThemeInstallBubbleView : public content::NotificationObserver,
public views::Label {
public:
virtual ~ThemeInstallBubbleView();
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Show the loading bubble.
static void Show(TabContents* tab_contents);
@@ -68,7 +68,7 @@ class ThemeInstallBubbleView : public NotificationObserver,
string16 text_;
// A scoped container for notification registries.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(ThemeInstallBubbleView);
};
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index 207d093..f51ba3f 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -124,7 +124,7 @@ ToolbarView::ToolbarView(Browser* browser)
chrome::NOTIFICATION_MODULE_INCOMPATIBILITY_BADGE_CHANGE,
NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED,
- Source<Profile>(browser_->profile()));
+ content::Source<Profile>(browser_->profile()));
}
ToolbarView::~ToolbarView() {
@@ -407,14 +407,14 @@ void ToolbarView::ButtonPressed(views::Button* sender,
}
////////////////////////////////////////////////////////////////////////////////
-// ToolbarView, NotificationObserver implementation:
+// ToolbarView, content::NotificationObserver implementation:
void ToolbarView::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_PREF_CHANGED: {
- std::string* pref_name = Details<std::string>(details).ptr();
+ std::string* pref_name = content::Details<std::string>(details).ptr();
if (*pref_name == prefs::kShowHomeButton) {
Layout();
SchedulePaint();
diff --git a/chrome/browser/ui/views/toolbar_view.h b/chrome/browser/ui/views/toolbar_view.h
index 096cc46..2fe61e4 100644
--- a/chrome/browser/ui/views/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar_view.h
@@ -37,7 +37,7 @@ class ToolbarView : public AccessiblePaneView,
public views::ViewMenuDelegate,
public ui::AcceleratorProvider,
public LocationBarView::Delegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public CommandUpdater::CommandObserver,
public views::ButtonListener {
public:
@@ -107,10 +107,10 @@ class ToolbarView : public AccessiblePaneView,
virtual void ButtonPressed(views::Button* sender, const views::Event& event)
OVERRIDE;
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Overridden from ui::AcceleratorProvider:
virtual bool GetAcceleratorForCommandId(
@@ -209,7 +209,7 @@ class ToolbarView : public AccessiblePaneView,
// A list of listeners to call when the menu opens.
ObserverList<views::MenuListener> menu_listeners_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView);
};
diff --git a/chrome/browser/ui/views/wrench_menu.cc b/chrome/browser/ui/views/wrench_menu.cc
index 03dab34..8748d9c 100644
--- a/chrome/browser/ui/views/wrench_menu.cc
+++ b/chrome/browser/ui/views/wrench_menu.cc
@@ -19,9 +19,9 @@
#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_observer.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -380,7 +380,7 @@ static const int kZoomPadding = 6;
// the zoom, a label showing the current zoom percent, and a button to go
// full-screen.
class WrenchMenu::ZoomView : public WrenchMenuView,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
ZoomView(WrenchMenu* menu,
MenuModel* menu_model,
@@ -440,7 +440,8 @@ class WrenchMenu::ZoomView : public WrenchMenuView,
registrar_.Add(
this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
- Source<HostZoomMap>(menu->browser_->profile()->GetHostZoomMap()));
+ content::Source<HostZoomMap>(
+ menu->browser_->profile()->GetHostZoomMap()));
}
gfx::Size GetPreferredSize() {
@@ -488,10 +489,10 @@ class WrenchMenu::ZoomView : public WrenchMenuView,
}
}
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(content::NOTIFICATION_ZOOM_LEVEL_CHANGED, type);
UpdateZoomControls();
}
@@ -543,7 +544,7 @@ class WrenchMenu::ZoomView : public WrenchMenuView,
// Index of the fullscreen menu item in the model.
const int fullscreen_index_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Button for incrementing the zoom.
TextButton* increment_button_;
@@ -572,7 +573,7 @@ WrenchMenu::WrenchMenu(Browser* browser)
bookmark_menu_(NULL),
first_bookmark_command_id_(0) {
registrar_.Add(this, chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED,
- Source<Profile>(browser_->profile()));
+ content::Source<Profile>(browser_->profile()));
}
WrenchMenu::~WrenchMenu() {
@@ -776,8 +777,8 @@ void WrenchMenu::BookmarkModelChanged() {
void WrenchMenu::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED:
// A change in the global errors list can add or remove items from the
diff --git a/chrome/browser/ui/views/wrench_menu.h b/chrome/browser/ui/views/wrench_menu.h
index 469c67f..6f08b91 100644
--- a/chrome/browser/ui/views/wrench_menu.h
+++ b/chrome/browser/ui/views/wrench_menu.h
@@ -11,8 +11,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/bookmarks/base_bookmark_model_observer.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/models/menu_model.h"
#include "views/controls/menu/menu_delegate.h"
@@ -29,7 +29,7 @@ class View;
// WrenchMenu adapts the WrenchMenuModel to view's menu related classes.
class WrenchMenu : public views::MenuDelegate,
public BaseBookmarkModelObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit WrenchMenu(Browser* browser);
virtual ~WrenchMenu();
@@ -74,10 +74,10 @@ class WrenchMenu : public views::MenuDelegate,
// BaseBookmarkModelObserver overrides:
virtual void BookmarkModelChanged() OVERRIDE;
- // NotificationObserver overrides:
+ // content::NotificationObserver overrides:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
class CutCopyPasteView;
@@ -142,7 +142,7 @@ class WrenchMenu : public views::MenuDelegate,
// ID to use for the items representing bookmarks in the bookmark menu.
int first_bookmark_command_id_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(WrenchMenu);
};
diff --git a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
index a99629d..b84101f 100644
--- a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
+++ b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
@@ -78,7 +78,7 @@ class KeyboardWidget
#if defined(USE_AURA)
public aura::DesktopObserver,
#endif
- public NotificationObserver,
+ public content::NotificationObserver,
public views::Widget::Observer,
public views::TextInputTypeObserver {
public:
@@ -141,8 +141,8 @@ class KeyboardWidget
// Overridden from NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Overridden from views::Widget::Observer.
virtual void OnWidgetClosing(Widget* widget) OVERRIDE;
@@ -166,7 +166,7 @@ class KeyboardWidget
// Height of the keyboard.
int keyboard_height_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(KeyboardWidget);
};
@@ -264,8 +264,8 @@ void KeyboardWidget::ShowKeyboardForWidget(views::Widget* widget) {
bool visible = true;
NotificationService::current()->Notify(
chrome::NOTIFICATION_KEYBOARD_VISIBILITY_CHANGED,
- Source<KeyboardWidget>(this),
- Details<bool>(&visible));
+ content::Source<KeyboardWidget>(this),
+ content::Details<bool>(&visible));
}
void KeyboardWidget::ResetBounds() {
@@ -278,8 +278,8 @@ void KeyboardWidget::Hide() {
bool visible = false;
NotificationService::current()->Notify(
chrome::NOTIFICATION_KEYBOARD_VISIBILITY_CHANGED,
- Source<KeyboardWidget>(this),
- Details<bool>(&visible));
+ content::Source<KeyboardWidget>(this),
+ content::Details<bool>(&visible));
}
void KeyboardWidget::SetTarget(views::Widget* target) {
@@ -330,8 +330,8 @@ void KeyboardWidget::AnimationEnded(const ui::Animation* animation) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_KEYBOARD_VISIBLE_BOUNDS_CHANGED,
- Source<KeyboardWidget>(this),
- Details<gfx::Rect>(&keyboard_rect));
+ content::Source<KeyboardWidget>(this),
+ content::Details<gfx::Rect>(&keyboard_rect));
}
bool KeyboardWidget::OnMessageReceived(const IPC::Message& message) {
@@ -441,8 +441,8 @@ void KeyboardWidget::OnDesktopResized(const gfx::Size& new_size) {
#endif
void KeyboardWidget::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_FOCUSED_EDITABLE_NODE_TOUCHED: {
// In case the keyboard hid itself and the focus is still in an editable
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 12d861e..3fc3ca1 100644
--- a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc
+++ b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc
@@ -13,7 +13,7 @@
#include "views/widget/widget.h"
class VirtualKeyboardManagerTest : public InProcessBrowserTest,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
VirtualKeyboardManagerTest()
: InProcessBrowserTest(),
@@ -42,7 +42,7 @@ class VirtualKeyboardManagerTest : public InProcessBrowserTest,
}
bool keyboard_visible_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
IN_PROC_BROWSER_TEST_F(VirtualKeyboardManagerTest, TestVisibility) {
diff --git a/chrome/browser/ui/web_applications/web_app_ui.cc b/chrome/browser/ui/web_applications/web_app_ui.cc
index 4ea9b0a..bc70cb8 100644
--- a/chrome/browser/ui/web_applications/web_app_ui.cc
+++ b/chrome/browser/ui/web_applications/web_app_ui.cc
@@ -17,18 +17,15 @@
#include "chrome/common/chrome_paths.h"
#include "content/browser/browser_thread.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#if defined(OS_POSIX) && !defined(OS_MACOSX)
#include "base/environment.h"
#endif
-#if defined(OS_WIN)
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
-#endif
-
namespace {
#if defined(OS_WIN)
@@ -37,17 +34,17 @@ namespace {
// updated. If there are such shortcuts, it schedules icon download and
// update them when icons are downloaded. It observes TAB_CLOSING notification
// and cancels all the work when the underlying tab is closing.
-class UpdateShortcutWorker : public NotificationObserver {
+class UpdateShortcutWorker : public content::NotificationObserver {
public:
explicit UpdateShortcutWorker(TabContentsWrapper* tab_contents);
void Run();
private:
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Downloads icon via TabContents.
void DownloadIcon();
@@ -69,7 +66,7 @@ class UpdateShortcutWorker : public NotificationObserver {
void DeleteMe();
void DeleteMeOnUIThread();
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Underlying TabContentsWrapper whose shortcuts will be updated.
TabContentsWrapper* tab_contents_;
@@ -100,8 +97,9 @@ UpdateShortcutWorker::UpdateShortcutWorker(TabContentsWrapper* tab_contents)
&unprocessed_icons_);
file_name_ = web_app::internals::GetSanitizedFileName(shortcut_info_.title);
- registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING,
- Source<NavigationController>(&tab_contents_->controller()));
+ registrar_.Add(
+ this, content::NOTIFICATION_TAB_CLOSING,
+ content::Source<NavigationController>(&tab_contents_->controller()));
}
void UpdateShortcutWorker::Run() {
@@ -109,11 +107,12 @@ void UpdateShortcutWorker::Run() {
DownloadIcon();
}
-void UpdateShortcutWorker::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void UpdateShortcutWorker::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_TAB_CLOSING &&
- Source<NavigationController>(source).ptr() ==
+ content::Source<NavigationController>(source).ptr() ==
&tab_contents_->controller()) {
// Underlying tab is closing.
tab_contents_ = NULL;
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 25e40db..59faec3 100644
--- a/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc
+++ b/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc
@@ -6,14 +6,14 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/navigation_details.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
namespace {
-class NavigationNotificationObserver : public NotificationObserver {
+class NavigationNotificationObserver : public content::NotificationObserver {
public:
NavigationNotificationObserver()
: got_navigation_(false),
@@ -23,12 +23,12 @@ class NavigationNotificationObserver : public NotificationObserver {
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE {
DCHECK_EQ(content::NOTIFICATION_NAV_ENTRY_COMMITTED, type);
got_navigation_ = true;
http_status_code_ =
- Details<content::LoadCommittedDetails>(details)->
+ content::Details<content::LoadCommittedDetails>(details)->
http_status_code;
}
@@ -36,7 +36,7 @@ class NavigationNotificationObserver : public NotificationObserver {
bool got_navigation() const { return got_navigation_; }
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
int got_navigation_;
int http_status_code_;
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 ebcfb89..8948d5a 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
@@ -28,8 +28,8 @@
#include "chrome/common/net/gaia/gaia_urls.h"
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "grit/generated_resources.h"
#include "net/base/dnsrr_resolver.h"
@@ -92,7 +92,7 @@ namespace chromeos {
// changed. Also, it answers to the requests about current network state.
class NetworkStateInformer
: public chromeos::NetworkLibrary::NetworkManagerObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit NetworkStateInformer(WebUI* web_ui);
virtual ~NetworkStateInformer();
@@ -109,10 +109,10 @@ class NetworkStateInformer
// NetworkLibrary::NetworkManagerObserver implementation:
virtual void OnNetworkManagerChanged(chromeos::NetworkLibrary* cros) OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
enum State {OFFLINE, ONLINE, CAPTIVE_PORTAL};
@@ -120,7 +120,7 @@ class NetworkStateInformer
void SendStateToObservers(const std::string& reason);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::hash_set<std::string> observers_;
std::string active_network_;
std::string network_name_;
@@ -167,9 +167,10 @@ void NetworkStateInformer::OnNetworkManagerChanged(NetworkLibrary* cros) {
}
}
-void NetworkStateInformer::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void NetworkStateInformer::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_LOGIN_PROXY_CHANGED);
SendStateToObservers(kReasonProxyChanged);
}
diff --git a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
index 08de306..4509a2f 100644
--- a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
@@ -464,14 +464,14 @@ void SimUnlockHandler::NotifyOnEnterPinEnded(bool cancelled) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_ENTER_PIN_ENDED,
NotificationService::AllSources(),
- Details<bool>(&cancelled));
+ content::Details<bool>(&cancelled));
}
void SimUnlockHandler::NotifyOnRequirePinChangeEnded(bool new_value) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_REQUIRE_PIN_SETTING_CHANGE_ENDED,
NotificationService::AllSources(),
- Details<bool>(&new_value));
+ content::Details<bool>(&new_value));
}
void SimUnlockHandler::HandleCancel(const ListValue* args) {
diff --git a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
index 4983d4a..d8fdd28 100644
--- a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
+++ b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
@@ -17,9 +17,9 @@
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
// This module implements a sign in dialog for cloud print.
@@ -31,20 +31,20 @@ namespace cloud_print_signin_dialog {
// The flow handler sends our dialog to the correct URL, saves size info,
// and closes the dialog when sign in is complete.
class CloudPrintSigninFlowHandler : public WebUIMessageHandler,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit CloudPrintSigninFlowHandler(TabContents* parent_tab);
// WebUIMessageHandler implementation.
virtual void RegisterMessages() OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
// Records the final size of the dialog in prefs.
void StoreDialogSize();
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
TabContents* parent_tab_;
};
@@ -60,13 +60,14 @@ void CloudPrintSigninFlowHandler::RegisterMessages() {
pending_entry->set_url(CloudPrintURL(
Profile::FromWebUI(web_ui_)).GetCloudPrintSigninURL());
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(controller));
+ content::Source<NavigationController>(controller));
}
}
-void CloudPrintSigninFlowHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void CloudPrintSigninFlowHandler::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
GURL url = web_ui_->tab_contents()->GetURL();
GURL dialog_url = CloudPrintURL(
diff --git a/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc b/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
index 6ad7c74..a278ef0 100644
--- a/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
+++ b/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
@@ -160,7 +160,7 @@ CollectedCookiesUIDelegate::CollectedCookiesUIDelegate(
wrapper->profile()->GetHostContentSettingsMap();
registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN,
- Source<TabSpecificContentSettings>(content_settings));
+ content::Source<TabSpecificContentSettings>(content_settings));
allowed_cookies_tree_model_.reset(
content_settings->GetAllowedCookiesTreeModel());
@@ -250,9 +250,10 @@ void CollectedCookiesUIDelegate::AddContentException(
}
}
-void CollectedCookiesUIDelegate::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void CollectedCookiesUIDelegate::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(type, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN);
CloseDialog();
}
diff --git a/chrome/browser/ui/webui/collected_cookies_ui_delegate.h b/chrome/browser/ui/webui/collected_cookies_ui_delegate.h
index 3f1a86c..2020967 100644
--- a/chrome/browser/ui/webui/collected_cookies_ui_delegate.h
+++ b/chrome/browser/ui/webui/collected_cookies_ui_delegate.h
@@ -13,8 +13,8 @@
#include "chrome/browser/ui/webui/cookies_tree_model_adapter.h"
#include "chrome/browser/ui/webui/html_dialog_ui.h"
#include "chrome/common/content_settings.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class GURL;
class TabContents;
@@ -26,7 +26,7 @@ class Size;
class CollectedCookiesUIDelegate : public HtmlDialogUIDelegate,
WebUIMessageHandler,
- NotificationObserver {
+ content::NotificationObserver {
public:
virtual ~CollectedCookiesUIDelegate();
@@ -64,8 +64,8 @@ class CollectedCookiesUIDelegate : public HtmlDialogUIDelegate,
// Notification Observer implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// JS callback to bind cookies tree models with JS trees.
void BindCookiesTreeModel(const base::ListValue* args);
@@ -75,7 +75,7 @@ class CollectedCookiesUIDelegate : public HtmlDialogUIDelegate,
void Allow(const base::ListValue* args);
void AllowThisSession(const base::ListValue* args);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
TabContentsWrapper* wrapper_;
bool closed_;
diff --git a/chrome/browser/ui/webui/conflicts_ui.cc b/chrome/browser/ui/webui/conflicts_ui.cc
index 2dc9205..4bb477c 100644
--- a/chrome/browser/ui/webui/conflicts_ui.cc
+++ b/chrome/browser/ui/webui/conflicts_ui.cc
@@ -21,8 +21,8 @@
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
@@ -70,7 +70,7 @@ ChromeWebUIDataSource* CreateConflictsUIHTMLSource() {
// The handler for JavaScript messages for the about:flags page.
class ConflictsDOMHandler : public WebUIMessageHandler,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
ConflictsDOMHandler() {}
virtual ~ConflictsDOMHandler() {}
@@ -85,10 +85,10 @@ class ConflictsDOMHandler : public WebUIMessageHandler,
void SendModuleList();
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(ConflictsDOMHandler);
};
@@ -133,8 +133,8 @@ void ConflictsDOMHandler::SendModuleList() {
}
void ConflictsDOMHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_MODULE_LIST_ENUMERATED:
SendModuleList();
diff --git a/chrome/browser/ui/webui/history2_ui.cc b/chrome/browser/ui/webui/history2_ui.cc
index 48cb4fa..cf6988b 100644
--- a/chrome/browser/ui/webui/history2_ui.cc
+++ b/chrome/browser/ui/webui/history2_ui.cc
@@ -33,8 +33,8 @@
#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_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -108,7 +108,7 @@ WebUIMessageHandler* BrowsingHistoryHandler2::Attach(WebUI* web_ui) {
// Get notifications when history is cleared.
registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URLS_DELETED,
- Source<Profile>(profile->GetOriginalProfile()));
+ content::Source<Profile>(profile->GetOriginalProfile()));
return WebUIMessageHandler::Attach(web_ui);
}
@@ -362,15 +362,16 @@ history::QueryOptions BrowsingHistoryHandler2::CreateMonthQueryOptions(
return options;
}
-void BrowsingHistoryHandler2::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void BrowsingHistoryHandler2::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type != chrome::NOTIFICATION_HISTORY_URLS_DELETED) {
NOTREACHED();
return;
}
history::URLsDeletedDetails* deletedDetails =
- Details<history::URLsDeletedDetails>(details).ptr();
+ content::Details<history::URLsDeletedDetails>(details).ptr();
if (deletedDetails->urls != urls_to_be_deleted_) {
// Notify the page that someone else deleted from the history.
web_ui_->CallJavascriptFunction("historyDeleted");
diff --git a/chrome/browser/ui/webui/history2_ui.h b/chrome/browser/ui/webui/history2_ui.h
index 227647a..0e18566 100644
--- a/chrome/browser/ui/webui/history2_ui.h
+++ b/chrome/browser/ui/webui/history2_ui.h
@@ -13,7 +13,7 @@
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "content/browser/cancelable_request.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
class GURL;
@@ -40,7 +40,7 @@ class HistoryUIHTMLSource2 : public ChromeURLDataManager::DataSource {
// The handler for Javascript messages related to the "history" view.
class BrowsingHistoryHandler2 : public WebUIMessageHandler,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
BrowsingHistoryHandler2();
virtual ~BrowsingHistoryHandler2();
@@ -61,10 +61,10 @@ class BrowsingHistoryHandler2 : public WebUIMessageHandler,
// Handle for "clearBrowsingData" message.
void HandleClearBrowsingData(const base::ListValue* args);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
// Callback from the history system when the history list is available.
@@ -82,7 +82,7 @@ class BrowsingHistoryHandler2 : public WebUIMessageHandler,
// Figure out the query options for a month-wide query.
history::QueryOptions CreateMonthQueryOptions(int month);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Current search text.
string16 search_text_;
diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc
index ba1a648..acc65c2 100644
--- a/chrome/browser/ui/webui/history_ui.cc
+++ b/chrome/browser/ui/webui/history_ui.cc
@@ -33,7 +33,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_source.h"
+#include "content/public/browser/notification_source.h"
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -139,7 +139,7 @@ WebUIMessageHandler* BrowsingHistoryHandler::Attach(WebUI* web_ui) {
// Get notifications when history is cleared.
registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URLS_DELETED,
- Source<Profile>(profile->GetOriginalProfile()));
+ content::Source<Profile>(profile->GetOriginalProfile()));
return WebUIMessageHandler::Attach(web_ui);
}
@@ -374,9 +374,10 @@ history::QueryOptions BrowsingHistoryHandler::CreateMonthQueryOptions(
return options;
}
-void BrowsingHistoryHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void BrowsingHistoryHandler::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type != chrome::NOTIFICATION_HISTORY_URLS_DELETED) {
NOTREACHED();
return;
diff --git a/chrome/browser/ui/webui/history_ui.h b/chrome/browser/ui/webui/history_ui.h
index fd36429..4cf6fa0 100644
--- a/chrome/browser/ui/webui/history_ui.h
+++ b/chrome/browser/ui/webui/history_ui.h
@@ -13,13 +13,13 @@
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "content/browser/cancelable_request.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
class GURL;
// The handler for Javascript messages related to the "history" view.
class BrowsingHistoryHandler : public WebUIMessageHandler,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
BrowsingHistoryHandler();
virtual ~BrowsingHistoryHandler();
@@ -40,10 +40,10 @@ class BrowsingHistoryHandler : public WebUIMessageHandler,
// Handle for "clearBrowsingData" message.
void HandleClearBrowsingData(const base::ListValue* args);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
// Callback from the history system when the history list is available.
@@ -61,7 +61,7 @@ class BrowsingHistoryHandler : public WebUIMessageHandler,
// Figure out the query options for a month-wide query.
history::QueryOptions CreateMonthQueryOptions(int month);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Current search text.
string16 search_text_;
diff --git a/chrome/browser/ui/webui/html_dialog_ui.cc b/chrome/browser/ui/webui/html_dialog_ui.cc
index ca071a3..66c5046 100644
--- a/chrome/browser/ui/webui/html_dialog_ui.cc
+++ b/chrome/browser/ui/webui/html_dialog_ui.cc
@@ -70,7 +70,7 @@ void HtmlDialogUI::RenderViewCreated(RenderViewHost* render_view_host) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_HTML_DIALOG_SHOWN,
- Source<HtmlDialogUI>(this),
+ content::Source<HtmlDialogUI>(this),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/ui/webui/media/media_internals_proxy.cc b/chrome/browser/ui/webui/media/media_internals_proxy.cc
index 7af31df..c532e4e 100644
--- a/chrome/browser/ui/webui/media/media_internals_proxy.cc
+++ b/chrome/browser/ui/webui/media/media_internals_proxy.cc
@@ -30,11 +30,12 @@ MediaInternalsProxy::MediaInternalsProxy()
NotificationService::AllBrowserContextsAndSources());
}
-void MediaInternalsProxy::Observe(int type, const NotificationSource& source,
- const NotificationDetails& details) {
+void MediaInternalsProxy::Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(type, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED);
- RenderProcessHost* process = Source<RenderProcessHost>(source).ptr();
+ RenderProcessHost* process = content::Source<RenderProcessHost>(source).ptr();
CallJavaScriptFunctionOnUIThread("media.onRendererTerminated",
base::Value::CreateIntegerValue(process->id()));
}
diff --git a/chrome/browser/ui/webui/media/media_internals_proxy.h b/chrome/browser/ui/webui/media/media_internals_proxy.h
index b2b5af4..3159736 100644
--- a/chrome/browser/ui/webui/media/media_internals_proxy.h
+++ b/chrome/browser/ui/webui/media/media_internals_proxy.h
@@ -11,8 +11,8 @@
#include "chrome/browser/media/media_internals_observer.h"
#include "chrome/browser/net/chrome_net_log.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class IOThread;
class MediaInternalsMessageHandler;
@@ -31,14 +31,14 @@ class MediaInternalsProxy
public base::RefCountedThreadSafe<MediaInternalsProxy,
BrowserThread::DeleteOnUIThread>,
public ChromeNetLog::ThreadSafeObserverImpl,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
MediaInternalsProxy();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Register a Handler and start receiving callbacks from MediaInternals.
void Attach(MediaInternalsMessageHandler* handler);
@@ -85,7 +85,7 @@ class MediaInternalsProxy
MediaInternalsMessageHandler* handler_;
IOThread* io_thread_;
scoped_ptr<base::ListValue> pending_net_updates_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(MediaInternalsProxy);
};
diff --git a/chrome/browser/ui/webui/metrics_handler.cc b/chrome/browser/ui/webui/metrics_handler.cc
index dbe5ea3..e74edd5 100644
--- a/chrome/browser/ui/webui/metrics_handler.cc
+++ b/chrome/browser/ui/webui/metrics_handler.cc
@@ -100,6 +100,6 @@ void MetricsHandler::HandleLogEventTime(const ListValue* args) {
}
NotificationService::current()->Notify(
chrome::NOTIFICATION_METRIC_EVENT_DURATION,
- Source<TabContents>(tab),
- Details<MetricEventDurationDetails>(&details));
+ content::Source<TabContents>(tab),
+ content::Details<MetricEventDurationDetails>(&details));
}
diff --git a/chrome/browser/ui/webui/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals_ui.cc
index b730d47..302267b 100644
--- a/chrome/browser/ui/webui/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals_ui.cc
@@ -41,7 +41,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_details.h"
+#include "content/public/browser/notification_details.h"
#include "grit/generated_resources.h"
#include "grit/net_internals_resources.h"
#include "net/base/escape.h"
@@ -150,7 +150,7 @@ ChromeWebUIDataSource* CreateNetInternalsHTMLSource() {
class NetInternalsMessageHandler
: public WebUIMessageHandler,
public base::SupportsWeakPtr<NetInternalsMessageHandler>,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
NetInternalsMessageHandler();
virtual ~NetInternalsMessageHandler();
@@ -164,10 +164,10 @@ class NetInternalsMessageHandler
// message will be ignored.
void SendJavascriptCommand(const std::string& command, Value* arg);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Javascript message handlers.
void OnRendererReady(const ListValue* list);
@@ -570,13 +570,14 @@ void NetInternalsMessageHandler::SendJavascriptCommand(
}
}
-void NetInternalsMessageHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void NetInternalsMessageHandler::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(type, chrome::NOTIFICATION_PREF_CHANGED);
- std::string* pref_name = Details<std::string>(details).ptr();
+ std::string* pref_name = content::Details<std::string>(details).ptr();
if (*pref_name == prefs::kHttpThrottlingEnabled) {
SendJavascriptCommand(
"receivedHttpThrottlingEnabledPrefChanged",
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index 132baa0..502adfb 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -236,7 +236,7 @@ bool AppLauncherHandler::HandlePing(Profile* profile, const std::string& path) {
WebUIMessageHandler* AppLauncherHandler::Attach(WebUI* web_ui) {
registrar_.Add(this, chrome::NOTIFICATION_APP_INSTALLED_TO_NTP,
- Source<TabContents>(web_ui->tab_contents()));
+ content::Source<TabContents>(web_ui->tab_contents()));
return WebUIMessageHandler::Attach(web_ui);
}
@@ -280,11 +280,11 @@ void AppLauncherHandler::RegisterMessages() {
}
void AppLauncherHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_APP_INSTALLED_TO_NTP &&
NewTabUI::NTP4Enabled()) {
- highlight_app_id_ = *Details<const std::string>(details).ptr();
+ highlight_app_id_ = *content::Details<const std::string>(details).ptr();
if (has_loaded_apps_)
SetAppToBeHighlighted();
return;
@@ -295,11 +295,12 @@ void AppLauncherHandler::Observe(int type,
switch (type) {
case chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED: {
- Profile* profile = Source<Profile>(source).ptr();
+ Profile* profile = content::Source<Profile>(source).ptr();
if (!Profile::FromWebUI(web_ui_)->IsSameProfile(profile))
return;
- const std::string& id = *Details<const std::string>(details).ptr();
+ const std::string& id =
+ *content::Details<const std::string>(details).ptr();
const AppNotification* notification =
extension_service_->app_notification_manager()->GetLast(id);
base::StringValue id_value(id);
@@ -315,7 +316,8 @@ void AppLauncherHandler::Observe(int type,
}
case chrome::NOTIFICATION_EXTENSION_LOADED: {
- const Extension* extension = Details<const Extension>(details).ptr();
+ const Extension* extension =
+ content::Details<const Extension>(details).ptr();
if (!extension->is_app())
return;
@@ -338,7 +340,7 @@ void AppLauncherHandler::Observe(int type,
}
case chrome::NOTIFICATION_EXTENSION_UNLOADED: {
const Extension* extension =
- Details<UnloadedExtensionInfo>(details)->extension;
+ content::Details<UnloadedExtensionInfo>(details)->extension;
if (!extension->is_app())
return;
@@ -350,7 +352,7 @@ void AppLauncherHandler::Observe(int type,
scoped_ptr<DictionaryValue> app_info(GetAppInfo(extension));
scoped_ptr<base::FundamentalValue> uninstall_value(
Value::CreateBooleanValue(
- Details<UnloadedExtensionInfo>(details)->reason ==
+ content::Details<UnloadedExtensionInfo>(details)->reason ==
extension_misc::UNLOAD_REASON_UNINSTALL));
if (app_info.get()) {
web_ui_->CallJavascriptFunction(
@@ -372,7 +374,7 @@ void AppLauncherHandler::Observe(int type,
break;
}
case chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR: {
- CrxInstaller* crx_installer = Source<CrxInstaller>(source).ptr();
+ CrxInstaller* crx_installer = content::Source<CrxInstaller>(source).ptr();
if (!Profile::FromWebUI(web_ui_)->IsSameProfile(crx_installer->profile()))
return;
// Fall Through.
@@ -542,17 +544,17 @@ void AppLauncherHandler::HandleGetApps(const ListValue* args) {
registrar_.Add(this, chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED,
NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LAUNCHER_REORDERED,
- Source<ExtensionPrefs>(extension_service_->extension_prefs()));
+ content::Source<ExtensionPrefs>(extension_service_->extension_prefs()));
registrar_.Add(this, chrome::NOTIFICATION_WEB_STORE_PROMO_LOADED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
- Source<CrxInstaller>(NULL));
+ content::Source<CrxInstaller>(NULL));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOAD_ERROR,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
}
has_loaded_apps_ = true;
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.h b/chrome/browser/ui/webui/ntp/app_launcher_handler.h
index bea5f33..4896479b 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.h
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.h
@@ -15,8 +15,8 @@
#include "chrome/common/extensions/extension_constants.h"
#include "content/browser/cancelable_request.h"
#include "content/browser/webui/web_ui.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class AppNotification;
class ExtensionPrefs;
@@ -34,7 +34,7 @@ class Rect;
class AppLauncherHandler : public WebUIMessageHandler,
public ExtensionUninstallDialog::Delegate,
public ExtensionInstallUI::Delegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit AppLauncherHandler(ExtensionService* extension_service);
virtual ~AppLauncherHandler();
@@ -57,10 +57,10 @@ class AppLauncherHandler : public WebUIMessageHandler,
virtual WebUIMessageHandler* Attach(WebUI* web_ui) OVERRIDE;
virtual void RegisterMessages() OVERRIDE;
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Populate the given dictionary with all installed app info.
void FillAppDictionary(base::DictionaryValue* value);
@@ -172,7 +172,7 @@ class AppLauncherHandler : public WebUIMessageHandler,
// We monitor changes to the extension system so that we can reload the apps
// when necessary.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Monitor extension preference changes so that the Web UI can be notified.
PrefChangeRegistrar pref_change_registrar_;
diff --git a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
index 4a59f00..548234ac 100644
--- a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
+++ b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
@@ -19,8 +19,8 @@
#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_details.h"
#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
namespace browser_sync {
@@ -46,16 +46,17 @@ void ForeignSessionHandler::RegisterMessages() {
void ForeignSessionHandler::Init() {
Profile* profile = Profile::FromWebUI(web_ui());
registrar_.Add(this, chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_FOREIGN_SESSION_DISABLED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
}
-void ForeignSessionHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ForeignSessionHandler::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
ListValue list_value;
switch (type) {
case chrome::NOTIFICATION_SYNC_CONFIGURE_DONE:
diff --git a/chrome/browser/ui/webui/ntp/foreign_session_handler.h b/chrome/browser/ui/webui/ntp/foreign_session_handler.h
index 2846eae..443a43e 100644
--- a/chrome/browser/ui/webui/ntp/foreign_session_handler.h
+++ b/chrome/browser/ui/webui/ntp/foreign_session_handler.h
@@ -11,13 +11,13 @@
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sync/glue/session_model_associator.h"
#include "content/browser/webui/web_ui.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
namespace browser_sync {
class ForeignSessionHandler : public WebUIMessageHandler,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// WebUIMessageHandler implementation.
virtual void RegisterMessages();
@@ -31,8 +31,8 @@ class ForeignSessionHandler : public WebUIMessageHandler,
// Determines how ForeignSessionHandler will interact with the new tab page.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Returns a pointer to the current session model associator or NULL.
SessionModelAssociator* GetModelAssociator();
@@ -53,7 +53,7 @@ class ForeignSessionHandler : public WebUIMessageHandler,
DictionaryValue* dictionary);
// The Registrar used to register ForeignSessionHandler for notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(ForeignSessionHandler);
};
diff --git a/chrome/browser/ui/webui/ntp/most_visited_handler.cc b/chrome/browser/ui/webui/ntp/most_visited_handler.cc
index d3513ba..b3867ce 100644
--- a/chrome/browser/ui/webui/ntp/most_visited_handler.cc
+++ b/chrome/browser/ui/webui/ntp/most_visited_handler.cc
@@ -32,7 +32,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "googleurl/src/gurl.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -76,7 +76,7 @@ WebUIMessageHandler* MostVisitedHandler::Attach(WebUI* web_ui) {
// Register for notification when TopSites changes so that we can update
// ourself.
registrar_.Add(this, chrome::NOTIFICATION_TOP_SITES_CHANGED,
- Source<history::TopSites>(ts));
+ content::Source<history::TopSites>(ts));
}
// We pre-emptively make a fetch for the most visited pages so we have the
@@ -322,8 +322,8 @@ void MostVisitedHandler::OnMostVisitedURLsAvailable(
}
void MostVisitedHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(type, chrome::NOTIFICATION_TOP_SITES_CHANGED);
// Most visited urls changed, query again.
diff --git a/chrome/browser/ui/webui/ntp/most_visited_handler.h b/chrome/browser/ui/webui/ntp/most_visited_handler.h
index dfef887..22543d8 100644
--- a/chrome/browser/ui/webui/ntp/most_visited_handler.h
+++ b/chrome/browser/ui/webui/ntp/most_visited_handler.h
@@ -12,8 +12,8 @@
#include "chrome/browser/history/history_types.h"
#include "content/browser/cancelable_request.h"
#include "content/browser/webui/web_ui.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class GURL;
class PageUsageData;
@@ -35,7 +35,7 @@ class Value;
// the URL and the value is a dictionary with title, url and index. This is
// owned by the PrefService.
class MostVisitedHandler : public WebUIMessageHandler,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
MostVisitedHandler();
@@ -63,10 +63,10 @@ class MostVisitedHandler : public WebUIMessageHandler,
// Callback for the "removePinnedURL" message.
void HandleRemovePinnedURL(const base::ListValue* args);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
const std::vector<GURL>& most_visited_urls() const {
return most_visited_urls_;
@@ -103,7 +103,7 @@ class MostVisitedHandler : public WebUIMessageHandler,
// Sends pages_value_ to the javascript side to and resets page_value_.
void SendPagesValue();
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Our consumer for the history service.
CancelableRequestConsumerTSimple<PageUsageData*> cancelable_consumer_;
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 13309ce..300ff34 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
@@ -159,6 +159,6 @@ void NewTabPageHandler::DismissIntroMessage(PrefService* prefs) {
void NewTabPageHandler::NotifyPromoResourceChanged() {
NotificationService* service = NotificationService::current();
service->Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED,
- Source<NewTabPageHandler>(this),
+ content::Source<NewTabPageHandler>(this),
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 d15c154..5664e2f 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -118,7 +118,7 @@ NewTabUI::NewTabUI(TabContents* contents)
// Listen for theme installation.
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(
+ content::Source<ThemeService>(
ThemeServiceFactory::GetForProfile(GetProfile())));
// Listen for bookmark bar visibility changes.
pref_change_registrar_.Init(GetProfile()->GetPrefs());
@@ -140,8 +140,8 @@ void NewTabUI::PaintTimeout() {
int load_time_ms = static_cast<int>(load_time.InMilliseconds());
NotificationService::current()->Notify(
chrome::NOTIFICATION_INITIAL_NEW_TAB_UI_LOAD,
- Source<Profile>(GetProfile()),
- Details<int>(&load_time_ms));
+ content::Source<Profile>(GetProfile()),
+ content::Details<int>(&load_time_ms));
UMA_HISTOGRAM_TIMES("NewTabUI load", load_time);
} else {
// Not enough quiet time has elapsed.
@@ -156,7 +156,7 @@ void NewTabUI::StartTimingPaint(RenderViewHost* render_view_host) {
start_ = base::TimeTicks::Now();
last_paint_ = start_;
registrar_.Add(this, content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT,
- Source<RenderWidgetHost>(render_view_host));
+ content::Source<RenderWidgetHost>(render_view_host));
timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kTimeoutMs), this,
&NewTabUI::PaintTimeout);
@@ -181,8 +181,8 @@ bool NewTabUI::CanShowBookmarkBar() const {
}
void NewTabUI::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_BROWSER_THEME_CHANGED: {
InitializeCSSCaches();
@@ -195,7 +195,8 @@ void NewTabUI::Observe(int type,
break;
}
case chrome::NOTIFICATION_PREF_CHANGED: {
- const std::string& pref_name = *Details<std::string>(details).ptr();
+ const std::string& pref_name =
+ *content::Details<std::string>(details).ptr();
if (pref_name == prefs::kShowBookmarkBar) {
if (!NTP4Enabled() && CanShowBookmarkBar()) {
if (GetProfile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar))
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.h b/chrome/browser/ui/webui/ntp/new_tab_ui.h
index ee0b0de..58f4083 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.h
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.h
@@ -15,8 +15,8 @@
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/chrome_web_ui.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class GURL;
class PrefService;
@@ -24,7 +24,7 @@ class Profile;
// The TabContents used for the New Tab page.
class NewTabUI : public ChromeWebUI,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit NewTabUI(TabContents* manager);
virtual ~NewTabUI();
@@ -80,8 +80,8 @@ class NewTabUI : public ChromeWebUI,
FRIEND_TEST_ALL_PREFIXES(NewTabUITest, UpdateUserPrefsVersion);
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Reset the CSS caches.
void InitializeCSSCaches();
@@ -97,7 +97,7 @@ class NewTabUI : public ChromeWebUI,
// detached from the location bar.
virtual bool CanShowBookmarkBar() const OVERRIDE;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Tracks updates of the kShowBookmarkBar preference.
PrefChangeRegistrar pref_change_registrar_;
diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
index 9af980e..992fd54 100644
--- a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
@@ -24,7 +24,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_details.h"
+#include "content/public/browser/notification_details.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -52,10 +52,10 @@ void NTPLoginHandler::RegisterMessages() {
}
void NTPLoginHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_PREF_CHANGED);
- std::string* name = Details<std::string>(details).ptr();
+ std::string* name = content::Details<std::string>(details).ptr();
if (prefs::kGoogleServicesUsername == *name)
UpdateLogin();
}
diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.h b/chrome/browser/ui/webui/ntp/ntp_login_handler.h
index a760ca7..7466d03 100644
--- a/chrome/browser/ui/webui/ntp/ntp_login_handler.h
+++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.h
@@ -8,7 +8,7 @@
#include "chrome/browser/prefs/pref_member.h"
#include "content/browser/webui/web_ui.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
class Profile;
class Browser;
@@ -17,7 +17,7 @@ class Browser;
// username at the top of the NTP (and update itself when that changes).
// In the future it may expand to allow users to login from the NTP.
class NTPLoginHandler : public WebUIMessageHandler,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
NTPLoginHandler();
virtual ~NTPLoginHandler();
@@ -27,10 +27,10 @@ class NTPLoginHandler : public WebUIMessageHandler,
// WebUIMessageHandler interface
virtual void RegisterMessages() OVERRIDE;
- // NotificationObserver interface
+ // content::NotificationObserver interface
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Returns true if the login handler should be shown in a new tab page
// for the given |profile|. |profile| must not be NULL.
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index 9f3efdb..955d50b 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -169,7 +169,7 @@ bool InDateRange(double begin, double end) {
NTPResourceCache::NTPResourceCache(Profile* profile) : profile_(profile) {
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(
+ content::Source<ThemeService>(
ThemeServiceFactory::GetForProfile(profile)));
registrar_.Add(this, chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED,
NotificationService::AllSources());
@@ -213,7 +213,8 @@ RefCountedMemory* NTPResourceCache::GetNewTabCSS(bool is_incognito) {
}
void NTPResourceCache::Observe(int type,
- const NotificationSource& source, const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
// Invalidate the cache.
if (chrome::NOTIFICATION_BROWSER_THEME_CHANGED == type ||
chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED == type) {
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.h b/chrome/browser/ui/webui/ntp/ntp_resource_cache.h
index 5d50118..382e225 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.h
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.h
@@ -12,15 +12,15 @@
#include "base/string16.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/browser/profiles/profile_keyed_service.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class Profile;
class RefCountedMemory;
// This class keeps a cache of NTP resources (HTML and CSS) so we don't have to
// regenerate them all the time.
-class NTPResourceCache : public NotificationObserver,
+class NTPResourceCache : public content::NotificationObserver,
public ProfileKeyedService {
public:
explicit NTPResourceCache(Profile* profile);
@@ -29,10 +29,10 @@ class NTPResourceCache : public NotificationObserver,
RefCountedMemory* GetNewTabHTML(bool is_incognito);
RefCountedMemory* GetNewTabCSS(bool is_incognito);
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
Profile* profile_;
@@ -51,7 +51,7 @@ class NTPResourceCache : public NotificationObserver,
void CreateNewTabCSS();
scoped_refptr<RefCountedMemory> new_tab_css_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
PrefChangeRegistrar pref_change_registrar_;
DISALLOW_COPY_AND_ASSIGN(NTPResourceCache);
diff --git a/chrome/browser/ui/webui/ntp/shown_sections_handler.cc b/chrome/browser/ui/webui/ntp/shown_sections_handler.cc
index 1db6369..3b2ab06 100644
--- a/chrome/browser/ui/webui/ntp/shown_sections_handler.cc
+++ b/chrome/browser/ui/webui/ntp/shown_sections_handler.cc
@@ -17,7 +17,7 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/pref_names.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_details.h"
+#include "content/public/browser/notification_details.h"
namespace {
@@ -68,11 +68,12 @@ void ShownSectionsHandler::RegisterMessages() {
base::Unretained(this)));
}
-void ShownSectionsHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ShownSectionsHandler::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED) {
- std::string* pref_name = Details<std::string>(details).ptr();
+ std::string* pref_name = content::Details<std::string>(details).ptr();
DCHECK(*pref_name == prefs::kNTPShownSections);
int sections = pref_service_->GetInteger(prefs::kNTPShownSections);
base::FundamentalValue sections_value(sections);
diff --git a/chrome/browser/ui/webui/ntp/shown_sections_handler.h b/chrome/browser/ui/webui/ntp/shown_sections_handler.h
index af99c1f..745cbb1 100644
--- a/chrome/browser/ui/webui/ntp/shown_sections_handler.h
+++ b/chrome/browser/ui/webui/ntp/shown_sections_handler.h
@@ -8,7 +8,7 @@
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "content/browser/webui/web_ui.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
class Extension;
class PrefService;
@@ -37,7 +37,7 @@ enum Section {
};
class ShownSectionsHandler : public WebUIMessageHandler,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit ShownSectionsHandler(PrefService* pref_service);
virtual ~ShownSectionsHandler() {}
@@ -52,10 +52,10 @@ class ShownSectionsHandler : public WebUIMessageHandler,
// WebUIMessageHandler implementation.
virtual void RegisterMessages() OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Callback for "setShownSections" message.
void HandleSetShownSections(const base::ListValue* args);
diff --git a/chrome/browser/ui/webui/options/advanced_options_handler.cc b/chrome/browser/ui/webui/options/advanced_options_handler.cc
index d3c7fdf..d1a3750 100644
--- a/chrome/browser/ui/webui/options/advanced_options_handler.cc
+++ b/chrome/browser/ui/webui/options/advanced_options_handler.cc
@@ -31,7 +31,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_details.h"
+#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_types.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -300,11 +300,12 @@ void AdvancedOptionsHandler::RegisterMessages() {
#endif
}
-void AdvancedOptionsHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void AdvancedOptionsHandler::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED) {
- std::string* pref_name = Details<std::string>(details).ptr();
+ std::string* pref_name = content::Details<std::string>(details).ptr();
if (*pref_name == prefs::kDownloadExtensionsToOpen) {
SetupAutoOpenFileTypesDisabledAttribute();
} else if (proxy_prefs_->IsObserved(*pref_name)) {
diff --git a/chrome/browser/ui/webui/options/advanced_options_handler.h b/chrome/browser/ui/webui/options/advanced_options_handler.h
index 8b8b853..30e9c7a 100644
--- a/chrome/browser/ui/webui/options/advanced_options_handler.h
+++ b/chrome/browser/ui/webui/options/advanced_options_handler.h
@@ -31,10 +31,10 @@ class AdvancedOptionsHandler
virtual WebUIMessageHandler* Attach(WebUI* web_ui);
virtual void RegisterMessages();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// SelectFileDialog::Listener implementation
virtual void FileSelected(const FilePath& path, int index, void* params);
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index 7ec40b4..cd57df8 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -31,8 +31,8 @@
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -335,11 +335,12 @@ void BrowserOptionsHandler::OnItemsRemoved(int start, int length) {
OnModelChanged();
}
-void BrowserOptionsHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void BrowserOptionsHandler::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED) {
- std::string* pref = Details<std::string>(details).ptr();
+ std::string* pref = content::Details<std::string>(details).ptr();
if (*pref == prefs::kDefaultBrowserSettingEnabled) {
UpdateDefaultBrowserState();
} else if (*pref == prefs::kURLsToRestoreOnStartup) {
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.h b/chrome/browser/ui/webui/options/browser_options_handler.h
index bee1037..ea357d1 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.h
+++ b/chrome/browser/ui/webui/options/browser_options_handler.h
@@ -53,10 +53,10 @@ class BrowserOptionsHandler : public OptionsPageUIHandler,
virtual void OnItemsRemoved(int start, int length) OVERRIDE;
private:
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Makes this the default browser. Called from WebUI.
void BecomeDefaultBrowser(const ListValue* args);
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 8ef9fb7..8a926d0 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
@@ -336,9 +336,10 @@ void ChangePictureOptionsHandler::OnCameraPresenceCheckDone() {
CameraDetector::kCameraPresent);
}
-void ChangePictureOptionsHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ChangePictureOptionsHandler::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
OptionsPageUIHandler::Observe(type, source, details);
// User profile image is currently set and it has been updated by UserManager.
if (type == chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED)
diff --git a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.h b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.h
index 00b1a00..0008650 100644
--- a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.h
+++ b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.h
@@ -10,7 +10,7 @@
#include "chrome/browser/chromeos/options/take_photo_dialog.h"
#include "chrome/browser/ui/shell_dialogs.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/native_widget_types.h"
namespace base {
@@ -79,10 +79,10 @@ class ChangePictureOptionsHandler : public OptionsPageUIHandler,
// ProfileImageDownloader::Delegate implementation.
virtual void OnDownloadSuccess(const SkBitmap& image) OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Called when the camera presence check has been completed.
void OnCameraPresenceCheckDone();
@@ -106,7 +106,7 @@ class ChangePictureOptionsHandler : public OptionsPageUIHandler,
// Downloads user profile image when it's not set as current image.
scoped_ptr<ProfileImageDownloader> profile_image_downloader_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtrFactory<ChangePictureOptionsHandler> weak_factory_;
diff --git a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
index 295b834..cceefd4 100644
--- a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
@@ -11,8 +11,8 @@
#include "chrome/browser/chromeos/cros_settings.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
namespace chromeos {
@@ -59,9 +59,10 @@ void CoreChromeOSOptionsHandler::StopObservingPref(const std::string& path) {
::CoreOptionsHandler::StopObservingPref(path);
}
-void CoreChromeOSOptionsHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void CoreChromeOSOptionsHandler::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
// Ignore the notification if this instance had caused it.
if (handling_change_)
return;
diff --git a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.h b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.h
index 6c18fe0..b65578b 100644
--- a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.h
+++ b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.h
@@ -24,10 +24,10 @@ class CoreChromeOSOptionsHandler : public CoreOptionsHandler {
const std::string& metric);
virtual void StopObservingPref(const std::string& path);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// Notifies registered JS callbacks on ChromeOS setting change.
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 7f1399f..36b113c 100644
--- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
@@ -575,9 +575,10 @@ void InternetOptionsHandler::OnCellularDataPlanChanged(
}
-void InternetOptionsHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void InternetOptionsHandler::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
chromeos::CrosOptionsPageUIHandler::Observe(type, source, details);
if (type == chrome::NOTIFICATION_REQUIRE_PIN_SETTING_CHANGE_ENDED) {
base::FundamentalValue require_pin(*Details<bool>(details).ptr());
diff --git a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.h b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.h
index 78063af..916be72 100644
--- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.h
+++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.h
@@ -10,7 +10,7 @@
#include "chrome/browser/chromeos/cros/network_library.h"
#include "chrome/browser/chromeos/proxy_cros_settings_provider.h"
#include "chrome/browser/ui/webui/options/chromeos/cros_options_page_ui_handler.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/native_widget_types.h"
class SkBitmap;
@@ -43,10 +43,10 @@ class InternetOptionsHandler
// NetworkLibrary::CellularDataPlanObserver implementation.
virtual void OnCellularDataPlanChanged(chromeos::NetworkLibrary* network_lib);
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
// Opens a modal popup dialog.
@@ -143,7 +143,7 @@ class InternetOptionsHandler
// Convenience pointer to netwrok library (will not change).
chromeos::NetworkLibrary* cros_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
chromeos::ProxyCrosSettingsProvider* proxy_settings_;
diff --git a/chrome/browser/ui/webui/options/chromeos/virtual_keyboard_manager_handler.cc b/chrome/browser/ui/webui/options/chromeos/virtual_keyboard_manager_handler.cc
index cde1d0d..1e44643 100644
--- a/chrome/browser/ui/webui/options/chromeos/virtual_keyboard_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/virtual_keyboard_manager_handler.cc
@@ -22,8 +22,8 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.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/webui/options/clear_browser_data_handler.cc b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc
index acca585..677d07a 100644
--- a/chrome/browser/ui/webui/options/clear_browser_data_handler.cc
+++ b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_details.h"
+#include "content/public/browser/notification_details.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 12761b6..2e332c7 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -29,7 +29,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/public/common/content_switches.h"
#include "grit/generated_resources.h"
@@ -293,19 +293,20 @@ void ContentSettingsHandler::Initialize() {
Profile* profile = Profile::FromWebUI(web_ui_);
notification_registrar_.Add(
this, chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
PrefService* prefs = profile->GetPrefs();
pref_change_registrar_.Init(prefs);
pref_change_registrar_.Add(prefs::kGeolocationContentSettings, this);
}
-void ContentSettingsHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ContentSettingsHandler::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_PROFILE_DESTROYED: {
- if (Source<Profile>(source).ptr()->IsOffTheRecord()) {
+ if (content::Source<Profile>(source).ptr()->IsOffTheRecord()) {
web_ui_->CallJavascriptFunction(
"ContentSettingsExceptionsArea.OTRProfileDestroyed");
}
@@ -313,7 +314,7 @@ void ContentSettingsHandler::Observe(int type,
}
case chrome::NOTIFICATION_PROFILE_CREATED: {
- if (Source<Profile>(source).ptr()->IsOffTheRecord())
+ if (content::Source<Profile>(source).ptr()->IsOffTheRecord())
UpdateAllOTRExceptionsViewsFromModel();
break;
}
@@ -321,13 +322,13 @@ void ContentSettingsHandler::Observe(int type,
case chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED: {
// Filter out notifications from other profiles.
HostContentSettingsMap* map =
- Source<HostContentSettingsMap>(source).ptr();
+ content::Source<HostContentSettingsMap>(source).ptr();
if (map != GetContentSettingsMap() &&
map != GetOTRContentSettingsMap())
break;
const ContentSettingsDetails* settings_details =
- Details<const ContentSettingsDetails>(details).ptr();
+ content::Details<const ContentSettingsDetails>(details).ptr();
// TODO(estade): we pretend update_all() is always true.
if (settings_details->update_all_types())
@@ -338,7 +339,8 @@ void ContentSettingsHandler::Observe(int type,
}
case chrome::NOTIFICATION_PREF_CHANGED: {
- const std::string& pref_name = *Details<std::string>(details).ptr();
+ const std::string& pref_name =
+ *content::Details<std::string>(details).ptr();
if (pref_name == prefs::kGeolocationContentSettings)
UpdateGeolocationExceptionsView();
break;
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.h b/chrome/browser/ui/webui/options/content_settings_handler.h
index f183936..22d0290 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.h
+++ b/chrome/browser/ui/webui/options/content_settings_handler.h
@@ -10,8 +10,8 @@
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
#include "chrome/common/content_settings_types.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class HostContentSettingsMap;
class ProtocolHandlerRegistry;
@@ -28,10 +28,10 @@ class ContentSettingsHandler : public OptionsPageUIHandler {
virtual void RegisterMessages();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Gets a string identifier for the group name, for use in HTML.
static std::string ContentSettingsTypeToGroupName(ContentSettingsType type);
@@ -106,7 +106,7 @@ class ContentSettingsHandler : public OptionsPageUIHandler {
// Member variables ---------------------------------------------------------
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
PrefChangeRegistrar pref_change_registrar_;
DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler);
diff --git a/chrome/browser/ui/webui/options/core_options_handler.cc b/chrome/browser/ui/webui/options/core_options_handler.cc
index 5b62893..0e17749 100644
--- a/chrome/browser/ui/webui/options/core_options_handler.cc
+++ b/chrome/browser/ui/webui/options/core_options_handler.cc
@@ -21,7 +21,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_details.h"
+#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
#include "grit/chromium_strings.h"
@@ -136,10 +136,10 @@ WebUIMessageHandler* CoreOptionsHandler::Attach(WebUI* web_ui) {
}
void CoreOptionsHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED)
- NotifyPrefChanged(Details<std::string>(details).ptr());
+ NotifyPrefChanged(content::Details<std::string>(details).ptr());
}
void CoreOptionsHandler::RegisterMessages() {
diff --git a/chrome/browser/ui/webui/options/core_options_handler.h b/chrome/browser/ui/webui/options/core_options_handler.h
index 976aa77..e077857 100644
--- a/chrome/browser/ui/webui/options/core_options_handler.h
+++ b/chrome/browser/ui/webui/options/core_options_handler.h
@@ -26,10 +26,10 @@ class CoreOptionsHandler : public OptionsPageUIHandler {
virtual void GetLocalizedValues(DictionaryValue* localized_strings);
virtual void Uninitialize();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// WebUIMessageHandler implementation.
virtual void RegisterMessages();
diff --git a/chrome/browser/ui/webui/options/extension_settings_handler.cc b/chrome/browser/ui/webui/options/extension_settings_handler.cc
index 20df554..5ee7afa 100644
--- a/chrome/browser/ui/webui/options/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/extension_settings_handler.cc
@@ -205,15 +205,15 @@ void ExtensionSettingsHandler::MaybeRegisterForNotifications() {
// Register for notifications that we need to reload the page.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_CREATED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_WARNING_CHANGED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
registrar_.Add(this,
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
NotificationService::AllBrowserContextsAndSources());
@@ -232,7 +232,7 @@ void ExtensionSettingsHandler::MaybeRegisterForNotifications() {
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED,
- Source<ExtensionPrefs>(profile->GetExtensionService()->
+ content::Source<ExtensionPrefs>(profile->GetExtensionService()->
extension_prefs()));
}
@@ -584,9 +584,10 @@ WebUIMessageHandler* ExtensionSettingsHandler::Attach(WebUI* web_ui) {
return handler;
}
-void ExtensionSettingsHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ExtensionSettingsHandler::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
Profile* profile = Profile::FromWebUI(web_ui_);
Profile* source_profile = NULL;
switch (type) {
@@ -605,28 +606,30 @@ void ExtensionSettingsHandler::Observe(int type,
// Doing it this way gets everything but causes the page to be rendered
// more than we need. It doesn't seem to result in any noticeable flicker.
case content::NOTIFICATION_RENDER_VIEW_HOST_DELETED:
- deleting_rvh_ = Source<RenderViewHost>(source).ptr();
+ deleting_rvh_ = content::Source<RenderViewHost>(source).ptr();
// Fall through.
case content::NOTIFICATION_RENDER_VIEW_HOST_CREATED:
source_profile = Profile::FromBrowserContext(
- Source<RenderViewHost>(source)->site_instance()->
+ content::Source<RenderViewHost>(source)->site_instance()->
browsing_instance()->browser_context());
if (!profile->IsSameProfile(source_profile))
return;
MaybeUpdateAfterNotification();
break;
case chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED:
- deleting_rvh_ = Details<BackgroundContents>(details)->render_view_host();
+ deleting_rvh_ =
+ content::Details<BackgroundContents>(details)->render_view_host();
// Fall through.
case chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED:
- source_profile = Source<Profile>(source).ptr();
+ source_profile = content::Source<Profile>(source).ptr();
if (!profile->IsSameProfile(source_profile))
return;
MaybeUpdateAfterNotification();
break;
case content::NOTIFICATION_NAV_ENTRY_COMMITTED:
source_profile = Profile::FromBrowserContext(
- Source<NavigationController>(source).ptr()->browser_context());
+ content::Source<NavigationController>(
+ source).ptr()->browser_context());
if (!profile->IsSameProfile(source_profile))
return;
MaybeUpdateAfterNotification();
diff --git a/chrome/browser/ui/webui/options/extension_settings_handler.h b/chrome/browser/ui/webui/options/extension_settings_handler.h
index 270adc9..c2c173e 100644
--- a/chrome/browser/ui/webui/options/extension_settings_handler.h
+++ b/chrome/browser/ui/webui/options/extension_settings_handler.h
@@ -16,8 +16,8 @@
#include "chrome/browser/ui/webui/options/options_ui.h"
#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "chrome/common/extensions/extension_resource.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
class Extension;
@@ -142,10 +142,10 @@ class ExtensionSettingsHandler : public OptionsPageUIHandler,
base::DictionaryValue* localized_strings) OVERRIDE;
virtual void Initialize() OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// ExtensionUninstallDialog::Delegate implementation, used for receiving
// notification about uninstall confirmation dialog selections.
diff --git a/chrome/browser/ui/webui/options/font_settings_handler.cc b/chrome/browser/ui/webui/options/font_settings_handler.cc
index 64157302..f319244 100644
--- a/chrome/browser/ui/webui/options/font_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/font_settings_handler.cc
@@ -20,7 +20,7 @@
#include "chrome/browser/ui/webui/options/font_settings_utils.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_details.h"
+#include "content/public/browser/notification_details.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -153,10 +153,10 @@ void FontSettingsHandler::FontsListHasLoaded(
}
void FontSettingsHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED) {
- std::string* pref_name = Details<std::string>(details).ptr();
+ std::string* pref_name = content::Details<std::string>(details).ptr();
if (*pref_name == prefs::kWebKitStandardFontFamily) {
SetUpStandardFontSample();
} else if (*pref_name == prefs::kWebKitSerifFontFamily) {
diff --git a/chrome/browser/ui/webui/options/font_settings_handler.h b/chrome/browser/ui/webui/options/font_settings_handler.h
index 5fc38f1..4ac650c 100644
--- a/chrome/browser/ui/webui/options/font_settings_handler.h
+++ b/chrome/browser/ui/webui/options/font_settings_handler.h
@@ -24,10 +24,10 @@ class FontSettingsHandler : public OptionsPageUIHandler {
virtual WebUIMessageHandler* Attach(WebUI* web_ui);
virtual void RegisterMessages();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
void HandleFetchFontsData(const ListValue* args);
diff --git a/chrome/browser/ui/webui/options/handler_options_handler.cc b/chrome/browser/ui/webui/options/handler_options_handler.cc
index c0002d7..1cf2a96 100644
--- a/chrome/browser/ui/webui/options/handler_options_handler.cc
+++ b/chrome/browser/ui/webui/options/handler_options_handler.cc
@@ -47,7 +47,7 @@ void HandlerOptionsHandler::Initialize() {
UpdateHandlerList();
notification_registrar_.Add(
this, chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED,
- Source<Profile>(Profile::FromWebUI(web_ui_)));
+ content::Source<Profile>(Profile::FromWebUI(web_ui_)));
}
void HandlerOptionsHandler::RegisterMessages() {
@@ -196,9 +196,10 @@ ProtocolHandler HandlerOptionsHandler::ParseHandlerFromArgs(
title);
}
-void HandlerOptionsHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void HandlerOptionsHandler::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED)
UpdateHandlerList();
else
diff --git a/chrome/browser/ui/webui/options/handler_options_handler.h b/chrome/browser/ui/webui/options/handler_options_handler.h
index 33132b1..4b37abc 100644
--- a/chrome/browser/ui/webui/options/handler_options_handler.h
+++ b/chrome/browser/ui/webui/options/handler_options_handler.h
@@ -10,7 +10,7 @@
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
#include "chrome/common/custom_handlers/protocol_handler.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
namespace base {
class DictionaryValue;
@@ -26,10 +26,10 @@ class HandlerOptionsHandler : public OptionsPageUIHandler {
virtual void Initialize();
virtual void RegisterMessages();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// Called when the user toggles whether custom handlers are enabled.
@@ -67,7 +67,7 @@ class HandlerOptionsHandler : public OptionsPageUIHandler {
ProtocolHandlerRegistry* GetProtocolHandlerRegistry();
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
DISALLOW_COPY_AND_ASSIGN(HandlerOptionsHandler);
};
diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.cc b/chrome/browser/ui/webui/options/manage_profile_handler.cc
index 0287dfa..b9fb4d2 100644
--- a/chrome/browser/ui/webui/options/manage_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc
@@ -63,9 +63,10 @@ void ManageProfileHandler::RegisterMessages() {
base::Unretained(this)));
}
-void ManageProfileHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ManageProfileHandler::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED)
SendProfileNames();
else
diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.h b/chrome/browser/ui/webui/options/manage_profile_handler.h
index c3e535c..fc36576 100644
--- a/chrome/browser/ui/webui/options/manage_profile_handler.h
+++ b/chrome/browser/ui/webui/options/manage_profile_handler.h
@@ -21,10 +21,10 @@ class ManageProfileHandler : public OptionsPageUIHandler {
// WebUIMessageHandler:
virtual void RegisterMessages();
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// Callback for the "requestDefaultProfileIcons" message.
diff --git a/chrome/browser/ui/webui/options/options_ui.h b/chrome/browser/ui/webui/options/options_ui.h
index 8dd9626..69813f8 100644
--- a/chrome/browser/ui/webui/options/options_ui.h
+++ b/chrome/browser/ui/webui/options/options_ui.h
@@ -12,8 +12,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/chrome_web_ui.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
class GURL;
@@ -22,7 +22,7 @@ struct UserMetricsAction;
// The base class handler of Javascript messages of options pages.
class OptionsPageUIHandler : public WebUIMessageHandler,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
OptionsPageUIHandler();
virtual ~OptionsPageUIHandler();
@@ -43,10 +43,10 @@ class OptionsPageUIHandler : public WebUIMessageHandler,
// WebUIMessageHandler implementation.
virtual void RegisterMessages() OVERRIDE {}
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE {}
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE {}
protected:
struct OptionsStringResource {
@@ -65,7 +65,7 @@ class OptionsPageUIHandler : public WebUIMessageHandler,
const std::string& variable_name,
int title_id);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
private:
DISALLOW_COPY_AND_ASSIGN(OptionsPageUIHandler);
diff --git a/chrome/browser/ui/webui/options/password_manager_handler.cc b/chrome/browser/ui/webui/options/password_manager_handler.cc
index 638f29c..50c904b 100644
--- a/chrome/browser/ui/webui/options/password_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/password_manager_handler.cc
@@ -14,8 +14,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "net/base/net_util.h"
@@ -120,11 +120,12 @@ PasswordStore* PasswordManagerHandler::GetPasswordStore() {
GetPasswordStore(Profile::EXPLICIT_ACCESS);
}
-void PasswordManagerHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void PasswordManagerHandler::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED) {
- std::string* pref_name = Details<std::string>(details).ptr();
+ std::string* pref_name = content::Details<std::string>(details).ptr();
if (*pref_name == prefs::kPasswordManagerAllowShowPasswords) {
UpdatePasswordLists(NULL);
}
diff --git a/chrome/browser/ui/webui/options/password_manager_handler.h b/chrome/browser/ui/webui/options/password_manager_handler.h
index 9b1e8f2..1fe9a9d 100644
--- a/chrome/browser/ui/webui/options/password_manager_handler.h
+++ b/chrome/browser/ui/webui/options/password_manager_handler.h
@@ -28,10 +28,10 @@ class PasswordManagerHandler : public OptionsPageUIHandler,
// PasswordStore::Observer implementation.
virtual void OnLoginsChanged();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// The password store associated with the currently active profile.
diff --git a/chrome/browser/ui/webui/options/personal_options_handler.cc b/chrome/browser/ui/webui/options/personal_options_handler.cc
index a8b97ec..434766c 100644
--- a/chrome/browser/ui/webui/options/personal_options_handler.cc
+++ b/chrome/browser/ui/webui/options/personal_options_handler.cc
@@ -220,9 +220,10 @@ void PersonalOptionsHandler::RegisterMessages() {
base::Unretained(this)));
}
-void PersonalOptionsHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void PersonalOptionsHandler::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) {
ObserveThemeChanged();
} else if (multiprofile_ &&
@@ -345,8 +346,8 @@ void PersonalOptionsHandler::Initialize() {
// Listen for theme installation.
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- Source<ThemeService>(ThemeServiceFactory::GetForProfile(
- profile)));
+ content::Source<ThemeService>(
+ ThemeServiceFactory::GetForProfile(profile)));
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
NotificationService::AllSources());
ObserveThemeChanged();
diff --git a/chrome/browser/ui/webui/options/personal_options_handler.h b/chrome/browser/ui/webui/options/personal_options_handler.h
index 4daee0b..a37b967 100644
--- a/chrome/browser/ui/webui/options/personal_options_handler.h
+++ b/chrome/browser/ui/webui/options/personal_options_handler.h
@@ -10,7 +10,7 @@
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
#if defined(OS_CHROMEOS)
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#endif
// Chrome personal options page UI handler.
@@ -27,10 +27,10 @@ class PersonalOptionsHandler : public OptionsPageUIHandler,
// WebUIMessageHandler implementation.
virtual void RegisterMessages();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// ProfileSyncServiceObserver implementation.
virtual void OnStateChanged();
@@ -44,7 +44,7 @@ class PersonalOptionsHandler : public OptionsPageUIHandler,
#if defined(OS_CHROMEOS)
void UpdateAccountPicture();
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
#endif
// Sends an array of Profile objects to javascript.
diff --git a/chrome/browser/ui/webui/plugins_ui.cc b/chrome/browser/ui/webui/plugins_ui.cc
index 8b6d3d6..07d609e 100644
--- a/chrome/browser/ui/webui/plugins_ui.cc
+++ b/chrome/browser/ui/webui/plugins_ui.cc
@@ -91,7 +91,7 @@ ChromeWebUIDataSource* CreatePluginsUIHTMLSource() {
// changes; maybe replumb plugin list through plugin service?
// <http://crbug.com/39101>
class PluginsDOMHandler : public WebUIMessageHandler,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit PluginsDOMHandler();
virtual ~PluginsDOMHandler() {}
@@ -112,10 +112,10 @@ class PluginsDOMHandler : public WebUIMessageHandler,
// Calback for the "getShowDetails" message.
void HandleGetShowDetails(const ListValue* args);
- // NotificationObserver method overrides
+ // content::NotificationObserver method overrides
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
// Call this to start getting the plugins on the UI thread.
@@ -124,7 +124,7 @@ class PluginsDOMHandler : public WebUIMessageHandler,
// Called on the UI thread when the plugin information is ready.
void PluginsLoaded(const std::vector<PluginGroup>& groups);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::WeakPtrFactory<PluginsDOMHandler> weak_ptr_factory_;
@@ -147,7 +147,7 @@ WebUIMessageHandler* PluginsDOMHandler::Attach(WebUI* web_ui) {
registrar_.Add(this,
chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED,
- Source<Profile>(profile));
+ content::Source<Profile>(profile));
return WebUIMessageHandler::Attach(web_ui);
}
@@ -227,8 +227,8 @@ void PluginsDOMHandler::HandleGetShowDetails(const ListValue* args) {
}
void PluginsDOMHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, type);
LoadPlugins();
}
diff --git a/chrome/browser/ui/webui/sync_promo_handler.cc b/chrome/browser/ui/webui/sync_promo_handler.cc
index 1e83618..ac96784 100644
--- a/chrome/browser/ui/webui/sync_promo_handler.cc
+++ b/chrome/browser/ui/webui/sync_promo_handler.cc
@@ -20,8 +20,8 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_details.h"
#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
SyncPromoHandler::SyncPromoHandler(ProfileManager* profile_manager)
: SyncSetupHandler(profile_manager),
@@ -49,7 +49,8 @@ WebUIMessageHandler* SyncPromoHandler::Attach(WebUI* web_ui) {
IsViewSourceMode()) {
// Listen to see if the tab we're in gets closed.
registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING,
- Source<NavigationController>(&web_ui->tab_contents()->controller()));
+ content::Source<NavigationController>(
+ &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());
@@ -93,8 +94,8 @@ void SyncPromoHandler::ShowConfigure(const base::DictionaryValue& args) {
}
void SyncPromoHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_TAB_CLOSING: {
if (!window_already_closed_)
@@ -103,7 +104,7 @@ void SyncPromoHandler::Observe(int type,
}
case chrome::NOTIFICATION_BROWSER_CLOSING: {
// Make sure we're in the tab strip of the closing window.
- Browser* browser = Source<Browser>(source).ptr();
+ Browser* browser = content::Source<Browser>(source).ptr();
if (browser->tabstrip_model()->GetWrapperIndex(
web_ui_->tab_contents()) != TabStripModel::kNoTab) {
RecordUserFlowAction(extension_misc::SYNC_PROMO_CLOSED_WINDOW);
diff --git a/chrome/browser/ui/webui/sync_promo_handler.h b/chrome/browser/ui/webui/sync_promo_handler.h
index bd1c1b1..392674c 100644
--- a/chrome/browser/ui/webui/sync_promo_handler.h
+++ b/chrome/browser/ui/webui/sync_promo_handler.h
@@ -8,9 +8,6 @@
#include "chrome/browser/ui/webui/sync_setup_handler.h"
-class NotificationSource;
-class NotificationDetails;
-
// The handler for Javascript messages related to the "sync promo" page.
class SyncPromoHandler : public SyncSetupHandler {
public:
@@ -28,10 +25,10 @@ class SyncPromoHandler : public SyncSetupHandler {
// SyncSetupFlowHandler implementation.
virtual void ShowConfigure(const base::DictionaryValue& args) OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
protected:
virtual void ShowSetupUI() OVERRIDE;
@@ -63,7 +60,7 @@ class SyncPromoHandler : public SyncSetupHandler {
// Use this to register for certain notifications (currently when tabs or
// windows close).
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Weak reference that's initialized and checked in Attach() (after that
// guaranteed to be non-NULL).
diff --git a/chrome/browser/ui/webui/task_manager_handler.cc b/chrome/browser/ui/webui/task_manager_handler.cc
index 32d332e..acd8f52 100644
--- a/chrome/browser/ui/webui/task_manager_handler.cc
+++ b/chrome/browser/ui/webui/task_manager_handler.cc
@@ -17,7 +17,7 @@
#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/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "webkit/glue/webpreferences.h"
@@ -356,7 +356,7 @@ void TaskManagerHandler::EnableTaskManager(const ListValue* indexes) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_TASK_MANAGER_WINDOW_READY,
- Source<TaskManagerModel>(model_),
+ content::Source<TaskManagerModel>(model_),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/ui/webui/web_ui_browsertest.cc b/chrome/browser/ui/webui/web_ui_browsertest.cc
index 2b77fd8..dc81c8f 100644
--- a/chrome/browser/ui/webui/web_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/web_ui_browsertest.cc
@@ -182,7 +182,7 @@ void WebUIBrowserTest::BrowsePreload(const GURL& browse_to,
preload_test_name_ = preload_test_name;
TestNavigationObserver navigation_observer(
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()),
this, 1);
browser::NavigateParams params(
diff --git a/chrome/browser/ui/webui/web_ui_test_handler.cc b/chrome/browser/ui/webui/web_ui_test_handler.cc
index 2673879..72e9999 100644
--- a/chrome/browser/ui/webui/web_ui_test_handler.cc
+++ b/chrome/browser/ui/webui/web_ui_test_handler.cc
@@ -12,8 +12,8 @@
#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/common/notification_details.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
WebUITestHandler::WebUITestHandler()
@@ -41,10 +41,10 @@ bool WebUITestHandler::RunJavaScriptTestWithResult(const string16& js_text) {
test_succeeded_ = false;
run_test_succeeded_ = false;
RenderViewHost* rvh = web_ui_->tab_contents()->render_view_host();
- NotificationRegistrar notification_registrar;
+ content::NotificationRegistrar notification_registrar;
notification_registrar.Add(
this, content::NOTIFICATION_EXECUTE_JAVASCRIPT_RESULT,
- Source<RenderViewHost>(rvh));
+ content::Source<RenderViewHost>(rvh));
rvh->ExecuteJavascriptInWebFrameNotifyResult(string16(), js_text);
return WaitForResult();
}
@@ -75,8 +75,8 @@ void WebUITestHandler::HandleTestResult(const ListValue* test_result) {
}
void WebUITestHandler::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
// Quit the message loop if |is_waiting_| so waiting process can get result or
// error. To ensure this gets done, do this before ASSERT* calls.
if (is_waiting_)
@@ -90,7 +90,7 @@ void WebUITestHandler::Observe(int type,
run_test_done_ = true;
run_test_succeeded_ = false;
- Value* value = Details<std::pair<int, Value*> >(details)->second;
+ Value* value = content::Details<std::pair<int, Value*> >(details)->second;
ASSERT_TRUE(value->GetAsBoolean(&run_test_succeeded_));
}
diff --git a/chrome/browser/ui/webui/web_ui_test_handler.h b/chrome/browser/ui/webui/web_ui_test_handler.h
index f58b895..64593a6 100644
--- a/chrome/browser/ui/webui/web_ui_test_handler.h
+++ b/chrome/browser/ui/webui/web_ui_test_handler.h
@@ -8,7 +8,7 @@
#include "base/string16.h"
#include "content/browser/webui/web_ui.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
namespace base {
@@ -18,7 +18,7 @@ class ListValue;
// This class registers test framework specific handlers on WebUI objects.
class WebUITestHandler : public WebUIMessageHandler,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
WebUITestHandler();
@@ -42,10 +42,10 @@ class WebUITestHandler : public WebUIMessageHandler,
// Receives testResult messages.
void HandleTestResult(const base::ListValue* test_result);
- // From NotificationObserver.
+ // From content::NotificationObserver.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Runs a message loop until test finishes. Returns the result of the
// test.
diff --git a/chrome/browser/upgrade_detector.cc b/chrome/browser/upgrade_detector.cc
index eb6dfa5..6fb47a1 100644
--- a/chrome/browser/upgrade_detector.cc
+++ b/chrome/browser/upgrade_detector.cc
@@ -78,7 +78,7 @@ void UpgradeDetector::NotifyUpgradeRecommended() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
- Source<UpgradeDetector>(this),
+ content::Source<UpgradeDetector>(this),
NotificationService::NoDetails());
if (is_critical_upgrade_) {
@@ -113,7 +113,7 @@ void UpgradeDetector::IdleCallback(IdleState state) {
idle_check_timer_.Stop();
NotificationService::current()->Notify(
chrome::NOTIFICATION_CRITICAL_UPGRADE_INSTALLED,
- Source<UpgradeDetector>(this),
+ content::Source<UpgradeDetector>(this),
NotificationService::NoDetails());
break;
case IDLE_STATE_ACTIVE:
diff --git a/chrome/browser/user_style_sheet_watcher.cc b/chrome/browser/user_style_sheet_watcher.cc
index 59c1cd7..ee26f960 100644
--- a/chrome/browser/user_style_sheet_watcher.cc
+++ b/chrome/browser/user_style_sheet_watcher.cc
@@ -81,7 +81,7 @@ void UserStyleSheetLoader::NotifyLoaded() {
if (has_loaded_) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_USER_STYLE_SHEET_UPDATED,
- Source<UserStyleSheetLoader>(this),
+ content::Source<UserStyleSheetLoader>(this),
NotificationService::NoDetails());
}
}
@@ -169,11 +169,12 @@ GURL UserStyleSheetWatcher::user_style_sheet() const {
}
void UserStyleSheetWatcher::Observe(int type,
- const NotificationSource& source, const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(type == content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB);
if (profile_->IsSameProfile(Profile::FromBrowserContext(
- Source<TabContents>(source)->browser_context()))) {
+ content::Source<TabContents>(source)->browser_context()))) {
loader_->NotifyLoaded();
registrar_.RemoveAll();
}
diff --git a/chrome/browser/user_style_sheet_watcher.h b/chrome/browser/user_style_sheet_watcher.h
index ecc91af..5a992a8 100644
--- a/chrome/browser/user_style_sheet_watcher.h
+++ b/chrome/browser/user_style_sheet_watcher.h
@@ -11,8 +11,8 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
class Profile;
@@ -23,7 +23,7 @@ class UserStyleSheetLoader;
class UserStyleSheetWatcher
: public base::RefCountedThreadSafe<UserStyleSheetWatcher,
BrowserThread::DeleteOnUIThread>,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
UserStyleSheetWatcher(Profile* profile, const FilePath& profile_path);
@@ -31,10 +31,10 @@ class UserStyleSheetWatcher
GURL user_style_sheet() const;
- // NotificationObserver interface
+ // content::NotificationObserver interface
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>;
@@ -54,7 +54,7 @@ class UserStyleSheetWatcher
// Watches for changes to the css file so we can reload the style sheet.
scoped_ptr<base::files::FilePathWatcher> file_watcher_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(UserStyleSheetWatcher);
};
diff --git a/chrome/browser/visitedlink/visitedlink_event_listener.cc b/chrome/browser/visitedlink/visitedlink_event_listener.cc
index 31be2e9..86c1ddb 100644
--- a/chrome/browser/visitedlink/visitedlink_event_listener.cc
+++ b/chrome/browser/visitedlink/visitedlink_event_listener.cc
@@ -162,12 +162,14 @@ void VisitedLinkEventListener::CommitVisitedLinks() {
pending_visited_links_.clear();
}
-void VisitedLinkEventListener::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void VisitedLinkEventListener::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_CREATED: {
- RenderProcessHost* process = Source<RenderProcessHost>(source).ptr();
+ RenderProcessHost* process =
+ content::Source<RenderProcessHost>(source).ptr();
Profile* profile =
Profile::FromBrowserContext(process->browser_context());
if (!profile_->IsSameProfile(profile))
@@ -185,14 +187,16 @@ void VisitedLinkEventListener::Observe(int type,
break;
}
case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED: {
- RenderProcessHost* process = Source<RenderProcessHost>(source).ptr();
+ RenderProcessHost* process =
+ content::Source<RenderProcessHost>(source).ptr();
if (updaters_.count(process->id())) {
updaters_.erase(process->id());
}
break;
}
case content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED: {
- RenderWidgetHost* widget = Source<RenderWidgetHost>(source).ptr();
+ RenderWidgetHost* widget =
+ content::Source<RenderWidgetHost>(source).ptr();
int child_id = widget->process()->id();
if (updaters_.count(child_id))
updaters_[child_id]->Update();
diff --git a/chrome/browser/visitedlink/visitedlink_event_listener.h b/chrome/browser/visitedlink/visitedlink_event_listener.h
index d491d80..fb2ffb6 100644
--- a/chrome/browser/visitedlink/visitedlink_event_listener.h
+++ b/chrome/browser/visitedlink/visitedlink_event_listener.h
@@ -15,8 +15,8 @@
#include "base/memory/linked_ptr.h"
#include "base/timer.h"
#include "chrome/browser/visitedlink/visitedlink_master.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class Profile;
class VisitedLinkUpdater;
@@ -26,7 +26,7 @@ class SharedMemory;
}
class VisitedLinkEventListener : public VisitedLinkMaster::Listener,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit VisitedLinkEventListener(Profile* profile);
virtual ~VisitedLinkEventListener();
@@ -38,15 +38,15 @@ class VisitedLinkEventListener : public VisitedLinkMaster::Listener,
private:
void CommitVisitedLinks();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
base::OneShotTimer<VisitedLinkEventListener> coalesce_timer_;
VisitedLinkCommon::Fingerprints pending_visited_links_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Map between renderer child ids and their VisitedLinkUpdater.
typedef std::map<int, linked_ptr<VisitedLinkUpdater> > Updaters;
diff --git a/chrome/browser/visitedlink/visitedlink_unittest.cc b/chrome/browser/visitedlink/visitedlink_unittest.cc
index d34277d..15c48a3 100644
--- a/chrome/browser/visitedlink/visitedlink_unittest.cc
+++ b/chrome/browser/visitedlink/visitedlink_unittest.cc
@@ -501,12 +501,14 @@ class VisitRelayingRenderProcessHost : public BrowserRenderProcessHost {
: BrowserRenderProcessHost(browser_context) {
NotificationService::current()->Notify(
content::NOTIFICATION_RENDERER_PROCESS_CREATED,
- Source<RenderProcessHost>(this), NotificationService::NoDetails());
+ content::Source<RenderProcessHost>(this),
+ NotificationService::NoDetails());
}
virtual ~VisitRelayingRenderProcessHost() {
NotificationService::current()->Notify(
content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- Source<RenderProcessHost>(this), NotificationService::NoDetails());
+ content::Source<RenderProcessHost>(this),
+ 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 7c9ff0d..5976798 100644
--- a/chrome/browser/web_resource/promo_resource_service.cc
+++ b/chrome/browser/web_resource/promo_resource_service.cc
@@ -370,7 +370,7 @@ void PromoResourceService::UnpackLogoSignal(
prefs_->SetDouble(prefs::kNTPCustomLogoEnd, logo_end);
NotificationService* service = NotificationService::current();
service->Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED,
- Source<WebResourceService>(this),
+ content::Source<WebResourceService>(this),
NotificationService::NoDetails());
}
}
@@ -421,7 +421,7 @@ void PromoResourceService::UnpackSyncPromoSignal(
// Notify the NTP resource cache if the promo has been disabled.
NotificationService::current()->Notify(
chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED,
- Source<WebResourceService>(this),
+ content::Source<WebResourceService>(this),
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 b4a2501..4468c1d 100644
--- a/chrome/browser/web_resource/promo_resource_service_unittest.cc
+++ b/chrome/browser/web_resource/promo_resource_service_unittest.cc
@@ -18,7 +18,7 @@
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_pref_service.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/test/test_url_fetcher_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -37,7 +37,7 @@ class PromoResourceServiceTest : public testing::Test {
};
class SyncPromoTest : public PromoResourceServiceTest,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
SyncPromoTest() : PromoResourceServiceTest(), notifications_allowed_(false) {
web_resource_service_->set_channel(chrome::VersionInfo::CHANNEL_DEV);
@@ -47,8 +47,8 @@ class SyncPromoTest : public PromoResourceServiceTest,
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
// If we get any unexpected notifications we should fail.
EXPECT_TRUE(notifications_allowed_);
}
@@ -102,7 +102,7 @@ class SyncPromoTest : public PromoResourceServiceTest,
private:
bool notifications_allowed_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
};
// Verifies that custom dates read from a web resource server are written to
diff --git a/chrome/browser/web_resource/web_resource_service.cc b/chrome/browser/web_resource/web_resource_service.cc
index 860cf72..d0381ac 100644
--- a/chrome/browser/web_resource/web_resource_service.cc
+++ b/chrome/browser/web_resource/web_resource_service.cc
@@ -267,7 +267,7 @@ void WebResourceService::WebResourceStateChange() {
return;
NotificationService* service = NotificationService::current();
service->Notify(notification_type_,
- Source<WebResourceService>(this),
+ content::Source<WebResourceService>(this),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/webdata/autofill_profile_syncable_service.cc b/chrome/browser/webdata/autofill_profile_syncable_service.cc
index 43025e0..fe1d922 100644
--- a/chrome/browser/webdata/autofill_profile_syncable_service.cc
+++ b/chrome/browser/webdata/autofill_profile_syncable_service.cc
@@ -48,9 +48,10 @@ AutofillProfileSyncableService::AutofillProfileSyncableService(
: web_data_service_(web_data_service) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
DCHECK(web_data_service_);
- notification_registrar_.Add(this,
- chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
- Source<WebDataService>(web_data_service_));
+ notification_registrar_.Add(
+ this,
+ chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
+ content::Source<WebDataService>(web_data_service_));
}
AutofillProfileSyncableService::~AutofillProfileSyncableService() {
@@ -193,10 +194,10 @@ SyncError AutofillProfileSyncableService::ProcessSyncChanges(
}
void AutofillProfileSyncableService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(type, chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED);
- DCHECK_EQ(web_data_service_, Source<WebDataService>(source).ptr());
+ DCHECK_EQ(web_data_service_, content::Source<WebDataService>(source).ptr());
// Check if sync is on. If we receive notification prior to the sync being set
// up we are going to process all when MergeData..() is called. If we receive
// notification after the sync exited, it will be sinced next time Chrome
@@ -204,7 +205,8 @@ void AutofillProfileSyncableService::Observe(int type,
if (!sync_processor_.get())
return;
- AutofillProfileChange* change = Details<AutofillProfileChange>(details).ptr();
+ AutofillProfileChange* change =
+ content::Details<AutofillProfileChange>(details).ptr();
ActOnChange(*change);
}
diff --git a/chrome/browser/webdata/autofill_profile_syncable_service.h b/chrome/browser/webdata/autofill_profile_syncable_service.h
index e3934e1..a8c42e6 100644
--- a/chrome/browser/webdata/autofill_profile_syncable_service.h
+++ b/chrome/browser/webdata/autofill_profile_syncable_service.h
@@ -20,8 +20,8 @@
#include "chrome/browser/sync/protocol/autofill_specifics.pb.h"
#include "chrome/browser/webdata/autofill_change.h"
#include "chrome/browser/webdata/autofill_entry.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
class AutofillProfile;
@@ -41,7 +41,7 @@ extern const char kAutofillProfileTag[];
// ProcessSyncChanges() and for each local change Observe() is called.
class AutofillProfileSyncableService
: public SyncableService,
- public NotificationObserver,
+ public content::NotificationObserver,
public base::NonThreadSafe {
public:
explicit AutofillProfileSyncableService(WebDataService* web_data_service);
@@ -60,10 +60,10 @@ class AutofillProfileSyncableService
const tracked_objects::Location& from_here,
const SyncChangeList& change_list) OVERRIDE;
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
protected:
// A convenience wrapper of a bunch of state we pass around while
@@ -134,7 +134,7 @@ class AutofillProfileSyncableService
}
WebDataService* web_data_service_; // WEAK
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
// Cached Autofill profiles. *Warning* deleted profiles are still in the
// vector - use the |profiles_map_| to iterate through actual profiles.
diff --git a/chrome/browser/webdata/web_data_service.cc b/chrome/browser/webdata/web_data_service.cc
index 8f5bf93..190b02e 100644
--- a/chrome/browser/webdata/web_data_service.cc
+++ b/chrome/browser/webdata/web_data_service.cc
@@ -25,9 +25,9 @@
#include "chrome/browser/webdata/web_database.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_details.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -55,7 +55,7 @@ void NotifyOfMultipleAutofillChangesTask(
NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_MULTIPLE_CHANGED,
- Source<WebDataService>(web_data_service.get()),
+ content::Source<WebDataService>(web_data_service.get()),
NotificationService::NoDetails());
}
@@ -642,7 +642,8 @@ void WebDataService::InitializeSyncableServices() {
void WebDataService::NotifyDatabaseLoadedOnUIThread() {
// Notify that the database has been initialized.
NotificationService::current()->Notify(
- chrome::NOTIFICATION_WEB_DATABASE_LOADED, Source<WebDataService>(this),
+ chrome::NOTIFICATION_WEB_DATABASE_LOADED,
+ content::Source<WebDataService>(this),
NotificationService::NoDetails());
}
@@ -1032,8 +1033,8 @@ void WebDataService::AddFormElementsImpl(
// done on the DB thread, and not the UI thread.
NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED,
- Source<WebDataService>(this),
- Details<AutofillChangeList>(&changes));
+ content::Source<WebDataService>(this),
+ content::Details<AutofillChangeList>(&changes));
}
request->RequestComplete();
@@ -1068,8 +1069,8 @@ void WebDataService::RemoveFormElementsAddedBetweenImpl(
// will be done on the DB thread, and not the UI thread.
NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED,
- Source<WebDataService>(this),
- Details<AutofillChangeList>(&changes));
+ content::Source<WebDataService>(this),
+ content::Details<AutofillChangeList>(&changes));
}
ScheduleCommit();
}
@@ -1095,8 +1096,8 @@ void WebDataService::RemoveFormValueForElementNameImpl(
// Post the notifications including the list of affected keys.
NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED,
- Source<WebDataService>(this),
- Details<AutofillChangeList>(&changes));
+ content::Source<WebDataService>(this),
+ content::Details<AutofillChangeList>(&changes));
}
}
request->RequestComplete();
@@ -1118,8 +1119,8 @@ void WebDataService::AddAutofillProfileImpl(
profile.guid(), &profile);
NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
- Source<WebDataService>(this),
- Details<AutofillProfileChange>(&change));
+ content::Source<WebDataService>(this),
+ content::Details<AutofillProfileChange>(&change));
}
request->RequestComplete();
}
@@ -1152,8 +1153,8 @@ void WebDataService::UpdateAutofillProfileImpl(
profile.guid(), &profile);
NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
- Source<WebDataService>(this),
- Details<AutofillProfileChange>(&change));
+ content::Source<WebDataService>(this),
+ content::Details<AutofillProfileChange>(&change));
}
request->RequestComplete();
}
@@ -1181,8 +1182,8 @@ void WebDataService::RemoveAutofillProfileImpl(
AutofillProfileChange change(AutofillProfileChange::REMOVE, guid, NULL);
NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
- Source<WebDataService>(this),
- Details<AutofillProfileChange>(&change));
+ content::Source<WebDataService>(this),
+ content::Details<AutofillProfileChange>(&change));
}
request->RequestComplete();
}
@@ -1218,8 +1219,8 @@ void WebDataService::EmptyMigrationTrashImpl(
*iter, NULL);
NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
- Source<WebDataService>(this),
- Details<AutofillProfileChange>(&change));
+ content::Source<WebDataService>(this),
+ content::Details<AutofillProfileChange>(&change));
}
// If we trashed any profiles they may have been merged, so send out
@@ -1234,8 +1235,8 @@ void WebDataService::EmptyMigrationTrashImpl(
(*iter)->guid(), *iter);
NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
- Source<WebDataService>(this),
- Details<AutofillProfileChange>(&change));
+ content::Source<WebDataService>(this),
+ content::Details<AutofillProfileChange>(&change));
}
STLDeleteElements(&profiles);
}
@@ -1266,8 +1267,8 @@ void WebDataService::AddCreditCardImpl(
credit_card.guid(), &credit_card);
NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED,
- Source<WebDataService>(this),
- Details<AutofillCreditCardChange>(&change));
+ content::Source<WebDataService>(this),
+ content::Details<AutofillCreditCardChange>(&change));
}
request->RequestComplete();
}
@@ -1299,8 +1300,8 @@ void WebDataService::UpdateCreditCardImpl(
credit_card.guid(), &credit_card);
NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED,
- Source<WebDataService>(this),
- Details<AutofillCreditCardChange>(&change));
+ content::Source<WebDataService>(this),
+ content::Details<AutofillCreditCardChange>(&change));
}
request->RequestComplete();
}
@@ -1321,8 +1322,8 @@ void WebDataService::RemoveCreditCardImpl(
NULL);
NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED,
- Source<WebDataService>(this),
- Details<AutofillCreditCardChange>(&change));
+ content::Source<WebDataService>(this),
+ content::Details<AutofillCreditCardChange>(&change));
}
request->RequestComplete();
}
@@ -1357,8 +1358,8 @@ void WebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetweenImpl(
NULL);
NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
- Source<WebDataService>(this),
- Details<AutofillProfileChange>(&change));
+ content::Source<WebDataService>(this),
+ content::Details<AutofillProfileChange>(&change));
}
for (std::vector<std::string>::iterator iter = credit_card_guids.begin();
@@ -1367,8 +1368,8 @@ void WebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetweenImpl(
*iter, NULL);
NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED,
- Source<WebDataService>(this),
- Details<AutofillCreditCardChange>(&change));
+ content::Source<WebDataService>(this),
+ content::Details<AutofillCreditCardChange>(&change));
}
// Note: It is the caller's responsibility to post notifications for any
// changes, e.g. by calling the Refresh() method of PersonalDataManager.
diff --git a/chrome/browser/webdata/web_data_service_unittest.cc b/chrome/browser/webdata/web_data_service_unittest.cc
index 582ad7c..581b39f 100644
--- a/chrome/browser/webdata/web_data_service_unittest.cc
+++ b/chrome/browser/webdata/web_data_service_unittest.cc
@@ -29,8 +29,8 @@
#include "chrome/common/guid.h"
#include "chrome/test/base/thread_observer_helper.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_details.h"
#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/glue/form_field.h"
@@ -184,8 +184,8 @@ TEST_F(WebDataServiceAutofillTest, FormFillAdd) {
EXPECT_CALL(
*observer_helper_->observer(),
Observe(int(chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED),
- Source<WebDataService>(wds_.get()),
- Property(&Details<const AutofillChangeList>::ptr,
+ content::Source<WebDataService>(wds_.get()),
+ Property(&content::Details<const AutofillChangeList>::ptr,
Pointee(ElementsAreArray(expected_changes))))).
WillOnce(SignalEvent(&done_event_));
@@ -230,8 +230,8 @@ TEST_F(WebDataServiceAutofillTest, FormFillRemoveOne) {
EXPECT_CALL(
*observer_helper_->observer(),
Observe(int(chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED),
- Source<WebDataService>(wds_.get()),
- Property(&Details<const AutofillChangeList>::ptr,
+ content::Source<WebDataService>(wds_.get()),
+ Property(&content::Details<const AutofillChangeList>::ptr,
Pointee(ElementsAreArray(expected_changes))))).
WillOnce(SignalEvent(&done_event_));
wds_->RemoveFormValueForElementName(name1_, value1_);
@@ -263,8 +263,8 @@ TEST_F(WebDataServiceAutofillTest, FormFillRemoveMany) {
EXPECT_CALL(
*observer_helper_->observer(),
Observe(int(chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED),
- Source<WebDataService>(wds_.get()),
- Property(&Details<const AutofillChangeList>::ptr,
+ content::Source<WebDataService>(wds_.get()),
+ Property(&content::Details<const AutofillChangeList>::ptr,
Pointee(ElementsAreArray(expected_changes))))).
WillOnce(SignalEvent(&done_event_));
wds_->RemoveFormElementsAddedBetween(t, t + one_day);
@@ -282,8 +282,8 @@ TEST_F(WebDataServiceAutofillTest, ProfileAdd) {
EXPECT_CALL(
*observer_helper_->observer(),
Observe(int(chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED),
- Source<WebDataService>(wds_.get()),
- Property(&Details<const AutofillProfileChange>::ptr,
+ content::Source<WebDataService>(wds_.get()),
+ Property(&content::Details<const AutofillProfileChange>::ptr,
Pointee(expected_change)))).
WillOnce(SignalEvent(&done_event_));
@@ -325,8 +325,8 @@ TEST_F(WebDataServiceAutofillTest, ProfileRemove) {
EXPECT_CALL(
*observer_helper_->observer(),
Observe(int(chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED),
- Source<WebDataService>(wds_.get()),
- Property(&Details<const AutofillProfileChange>::ptr,
+ content::Source<WebDataService>(wds_.get()),
+ Property(&content::Details<const AutofillProfileChange>::ptr,
Pointee(expected_change)))).
WillOnce(SignalEvent(&done_event_));
@@ -373,8 +373,8 @@ TEST_F(WebDataServiceAutofillTest, ProfileUpdate) {
EXPECT_CALL(
*observer_helper_->observer(),
Observe(int(chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED),
- Source<WebDataService>(wds_.get()),
- Property(&Details<const AutofillProfileChange>::ptr,
+ content::Source<WebDataService>(wds_.get()),
+ Property(&content::Details<const AutofillProfileChange>::ptr,
Pointee(expected_change)))).
WillOnce(SignalEvent(&done_event_));
@@ -403,8 +403,8 @@ TEST_F(WebDataServiceAutofillTest, CreditAdd) {
*observer_helper_->observer(),
Observe(
int(chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED),
- Source<WebDataService>(wds_.get()),
- Property(&Details<const AutofillCreditCardChange>::ptr,
+ content::Source<WebDataService>(wds_.get()),
+ Property(&content::Details<const AutofillCreditCardChange>::ptr,
Pointee(expected_change)))).
WillOnce(SignalEvent(&done_event_));
@@ -446,8 +446,8 @@ TEST_F(WebDataServiceAutofillTest, CreditCardRemove) {
*observer_helper_->observer(),
Observe(
int(chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED),
- Source<WebDataService>(wds_.get()),
- Property(&Details<const AutofillCreditCardChange>::ptr,
+ content::Source<WebDataService>(wds_.get()),
+ Property(&content::Details<const AutofillCreditCardChange>::ptr,
Pointee(expected_change)))).
WillOnce(SignalEvent(&done_event_));
wds_->RemoveCreditCard(credit_card.guid());
@@ -494,8 +494,8 @@ TEST_F(WebDataServiceAutofillTest, CreditUpdate) {
*observer_helper_->observer(),
Observe(
int(chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED),
- Source<WebDataService>(wds_.get()),
- Property(&Details<const AutofillCreditCardChange>::ptr,
+ content::Source<WebDataService>(wds_.get()),
+ Property(&content::Details<const AutofillCreditCardChange>::ptr,
Pointee(expected_change)))).
WillOnce(SignalEvent(&done_event_));
@@ -556,8 +556,8 @@ TEST_F(WebDataServiceAutofillTest, AutofillRemoveModifiedBetween) {
EXPECT_CALL(
*observer_helper_->observer(),
Observe(int(chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED),
- Source<WebDataService>(wds_.get()),
- Property(&Details<const AutofillProfileChange>::ptr,
+ content::Source<WebDataService>(wds_.get()),
+ Property(&content::Details<const AutofillProfileChange>::ptr,
Pointee(expected_profile_change)))).
WillOnce(SignalEvent(&done_event_));
@@ -568,8 +568,8 @@ TEST_F(WebDataServiceAutofillTest, AutofillRemoveModifiedBetween) {
*observer_helper_->observer(),
Observe(
int(chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED),
- Source<WebDataService>(wds_.get()),
- Property(&Details<const AutofillCreditCardChange>::ptr,
+ content::Source<WebDataService>(wds_.get()),
+ Property(&content::Details<const AutofillCreditCardChange>::ptr,
Pointee(expected_card_change)))).
WillOnce(SignalEvent(&done_event_));
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 94900ab..eebb34b 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -225,8 +225,8 @@
#'../content/browser/net/url_request_mock_http_job.cc',
#'../content/browser/net/url_request_mock_http_job.h',
'../content/browser/ssl/ssl_client_auth_handler_mock.h',
- '../content/common/notification_observer_mock.cc',
- '../content/common/notification_observer_mock.h',
+ '../content/test/notification_observer_mock.cc',
+ '../content/test/notification_observer_mock.h',
'../ui/gfx/image/image_unittest_util.h',
'../ui/gfx/image/image_unittest_util.cc',
'../webkit/quota/mock_quota_manager.cc',
diff --git a/chrome/common/native_window_notification_source.h b/chrome/common/native_window_notification_source.h
index 72901d9..be5cd81 100644
--- a/chrome/common/native_window_notification_source.h
+++ b/chrome/common/native_window_notification_source.h
@@ -6,20 +6,22 @@
#define CHROME_COMMON_NATIVE_WINDOW_NOTIFICATION_SOURCE_H_
#pragma once
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "ui/gfx/native_widget_types.h"
+namespace content {
+
// Specialization of the Source class for native windows. On Windows, these are
// HWNDs rather than pointers, and since the Source class expects a pointer
// type, this is necessary. On Mac/Linux, these are pointers, so this is
// unnecessary but harmless.
template<>
-class Source<gfx::NativeWindow> : public NotificationSource {
+class Source<gfx::NativeWindow> : public content::NotificationSource {
public:
- explicit Source(gfx::NativeWindow wnd) : NotificationSource(wnd) {}
+ explicit Source(gfx::NativeWindow wnd) : content::NotificationSource(wnd) {}
- explicit Source(const NotificationSource& other)
- : NotificationSource(other) {}
+ explicit Source(const content::NotificationSource& other)
+ : content::NotificationSource(other) {}
gfx::NativeWindow operator->() const { return ptr(); }
gfx::NativeWindow ptr() const {
@@ -27,4 +29,6 @@ class Source<gfx::NativeWindow> : public NotificationSource {
}
};
+}
+
#endif // CHROME_COMMON_NATIVE_WINDOW_NOTIFICATION_SOURCE_H_
diff --git a/chrome/test/base/test_html_dialog_observer.cc b/chrome/test/base/test_html_dialog_observer.cc
index 47c35cd..3b8fd8c 100644
--- a/chrome/test/base/test_html_dialog_observer.cc
+++ b/chrome/test/base/test_html_dialog_observer.cc
@@ -5,12 +5,12 @@
#include "chrome/test/base/test_html_dialog_observer.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_details.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/webui/web_ui.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "chrome/test/base/ui_test_utils.h"
@@ -23,12 +23,13 @@ TestHtmlDialogObserver::TestHtmlDialogObserver()
TestHtmlDialogObserver::~TestHtmlDialogObserver() {
}
-void TestHtmlDialogObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void TestHtmlDialogObserver::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_HTML_DIALOG_SHOWN:
- web_ui_ = Source<WebUI>(source).ptr();
+ web_ui_ = content::Source<WebUI>(source).ptr();
registrar_.Remove(this, chrome::NOTIFICATION_HTML_DIALOG_SHOWN,
NotificationService::AllSources());
// Wait for navigation on the new WebUI instance to complete. This depends
@@ -39,13 +40,13 @@ void TestHtmlDialogObserver::Observe(int type,
// TabContents::NavigateToEntry. The new RenderView is later told to
// navigate in this method, ensuring that this is not a race condition.
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&web_ui_->tab_contents()->controller()));
break;
case content::NOTIFICATION_LOAD_STOP:
DCHECK(web_ui_);
registrar_.Remove(this, content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&web_ui_->tab_contents()->controller()));
done_ = true;
// If the message loop is running stop it.
diff --git a/chrome/test/base/test_html_dialog_observer.h b/chrome/test/base/test_html_dialog_observer.h
index e2188c3..7959234 100644
--- a/chrome/test/base/test_html_dialog_observer.h
+++ b/chrome/test/base/test_html_dialog_observer.h
@@ -7,15 +7,15 @@
#pragma once
#include "base/compiler_specific.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class WebUI;
// For browser_tests, which run on the UI thread, run a second message
// MessageLoop to detect HtmlDialog creation and quit when the constructed
// WebUI instance is captured and ready.
-class TestHtmlDialogObserver : public NotificationObserver {
+class TestHtmlDialogObserver : public content::NotificationObserver {
public:
// Create and register a new TestHtmlDialogObserver.
TestHtmlDialogObserver();
@@ -26,11 +26,11 @@ class TestHtmlDialogObserver : public NotificationObserver {
WebUI* GetWebUI();
private:
- // NotificationObserver:
- virtual void Observe(int type, const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ // content::NotificationObserver:
+ virtual void Observe(int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
WebUI* web_ui_;
bool done_;
diff --git a/chrome/test/base/test_tab_strip_model_observer.cc b/chrome/test/base/test_tab_strip_model_observer.cc
index 1fe4531..e6a34f1 100644
--- a/chrome/test/base/test_tab_strip_model_observer.cc
+++ b/chrome/test/base/test_tab_strip_model_observer.cc
@@ -6,7 +6,7 @@
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
TestTabStripModelObserver::TestTabStripModelObserver(
TabStripModel* tab_strip_model,
@@ -23,5 +23,6 @@ TestTabStripModelObserver::~TestTabStripModelObserver() {
void TestTabStripModelObserver::TabInsertedAt(
TabContentsWrapper* contents, int index, bool foreground) {
- RegisterAsObserver(Source<NavigationController>(&contents->controller()));
+ RegisterAsObserver(
+ content::Source<NavigationController>(&contents->controller()));
}
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index f0617a8..fc17948 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -176,14 +176,14 @@ void TestingProfile::Init() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_CREATED,
- Source<Profile>(static_cast<Profile*>(this)),
+ content::Source<Profile>(static_cast<Profile*>(this)),
NotificationService::NoDetails());
}
TestingProfile::~TestingProfile() {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_DESTROYED,
- Source<Profile>(static_cast<Profile*>(this)),
+ content::Source<Profile>(static_cast<Profile*>(this)),
NotificationService::NoDetails());
profile_dependency_manager_->DestroyProfileServices(this);
diff --git a/chrome/test/base/thread_observer_helper.h b/chrome/test/base/thread_observer_helper.h
index a7551d3..b6fe3f1 100644
--- a/chrome/test/base/thread_observer_helper.h
+++ b/chrome/test/base/thread_observer_helper.h
@@ -9,8 +9,8 @@
#include "base/memory/ref_counted.h"
#include "base/synchronization/waitable_event.h"
#include "content/browser/browser_thread.h"
-#include "content/common/notification_observer_mock.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/test/notification_observer_mock.h"
// Helper class to add and remove observers on a non-UI thread from
// the UI thread.
@@ -34,7 +34,7 @@ class ThreadObserverHelper : public base::RefCountedThreadSafe<T, Traits> {
registrar_.RemoveAll();
}
- NotificationObserverMock* observer() {
+ content::NotificationObserverMock* observer() {
return &observer_;
}
@@ -43,8 +43,8 @@ class ThreadObserverHelper : public base::RefCountedThreadSafe<T, Traits> {
virtual void RegisterObservers() = 0;
- NotificationRegistrar registrar_;
- NotificationObserverMock observer_;
+ content::NotificationRegistrar registrar_;
+ content::NotificationObserverMock observer_;
private:
void RegisterObserversTask() {
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc
index e0ce317..f471f61 100644
--- a/chrome/test/base/ui_test_utils.cc
+++ b/chrome/test/base/ui_test_utils.cc
@@ -61,20 +61,20 @@ namespace ui_test_utils {
namespace {
-class DOMOperationObserver : public NotificationObserver {
+class DOMOperationObserver : public content::NotificationObserver {
public:
explicit DOMOperationObserver(RenderViewHost* render_view_host)
: did_respond_(false) {
registrar_.Add(this, chrome::NOTIFICATION_DOM_OPERATION_RESPONSE,
- Source<RenderViewHost>(render_view_host));
+ content::Source<RenderViewHost>(render_view_host));
ui_test_utils::RunMessageLoop();
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_DOM_OPERATION_RESPONSE);
- Details<DomOperationNotificationDetails> dom_op_details(details);
+ content::Details<DomOperationNotificationDetails> dom_op_details(details);
response_ = dom_op_details->json();
did_respond_ = true;
MessageLoopForUI::current()->Quit();
@@ -86,14 +86,14 @@ class DOMOperationObserver : public NotificationObserver {
}
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
std::string response_;
bool did_respond_;
DISALLOW_COPY_AND_ASSIGN(DOMOperationObserver);
};
-class FindInPageNotificationObserver : public NotificationObserver {
+class FindInPageNotificationObserver : public content::NotificationObserver {
public:
explicit FindInPageNotificationObserver(TabContentsWrapper* parent_tab)
: parent_tab_(parent_tab),
@@ -102,7 +102,7 @@ class FindInPageNotificationObserver : public NotificationObserver {
current_find_request_id_ =
parent_tab->find_tab_helper()->current_find_request_id();
registrar_.Add(this, chrome::NOTIFICATION_FIND_RESULT_AVAILABLE,
- Source<TabContents>(parent_tab_->tab_contents()));
+ content::Source<TabContents>(parent_tab_->tab_contents()));
ui_test_utils::RunMessageLoop();
}
@@ -110,10 +110,10 @@ class FindInPageNotificationObserver : public NotificationObserver {
int number_of_matches() const { return number_of_matches_; }
- virtual void Observe(int type, const NotificationSource& source,
- const NotificationDetails& details) {
+ virtual void Observe(int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_FIND_RESULT_AVAILABLE) {
- Details<FindNotificationDetails> find_details(details);
+ content::Details<FindNotificationDetails> find_details(details);
if (find_details->request_id() == current_find_request_id_) {
// We get multiple responses and one of those will contain the ordinal.
// This message comes to us before the final update is sent.
@@ -132,7 +132,7 @@ class FindInPageNotificationObserver : public NotificationObserver {
}
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
TabContentsWrapper* parent_tab_;
// We will at some point (before final update) be notified of the ordinal and
// we need to preserve it so we can send it later.
@@ -259,21 +259,22 @@ bool GetCurrentTabTitle(const Browser* browser, string16* title) {
void WaitForNavigations(NavigationController* controller,
int number_of_navigations) {
TestNavigationObserver observer(
- Source<NavigationController>(controller), NULL, number_of_navigations);
+ content::Source<NavigationController>(controller), NULL,
+ number_of_navigations);
observer.WaitForObservation();
}
void WaitForNewTab(Browser* browser) {
TestNotificationObserver observer;
RegisterAndWait(&observer, content::NOTIFICATION_TAB_ADDED,
- Source<TabContentsDelegate>(browser));
+ content::Source<TabContentsDelegate>(browser));
}
void WaitForBrowserActionUpdated(ExtensionAction* browser_action) {
TestNotificationObserver observer;
RegisterAndWait(&observer,
chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
- Source<ExtensionAction>(browser_action));
+ content::Source<ExtensionAction>(browser_action));
}
void WaitForLoadStop(TabContents* tab) {
@@ -284,14 +285,14 @@ void WaitForLoadStop(TabContents* tab) {
return;
TestNotificationObserver observer;
RegisterAndWait(&observer, content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->controller()));
}
Browser* WaitForNewBrowser() {
TestNotificationObserver observer;
RegisterAndWait(&observer, chrome::NOTIFICATION_BROWSER_WINDOW_READY,
NotificationService::AllSources());
- return Source<Browser>(observer.source()).ptr();
+ return content::Source<Browser>(observer.source()).ptr();
}
Browser* WaitForBrowserNotInSet(std::set<Browser*> excluded_browsers) {
@@ -334,7 +335,7 @@ static void NavigateToURLWithDispositionBlockUntilNavigationsComplete(
WindowOpenDisposition disposition,
int browser_test_flags) {
TestNavigationObserver same_tab_observer(
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser->GetSelectedTabContents()->controller()),
NULL,
number_of_navigations);
@@ -490,7 +491,7 @@ AppModalDialog* WaitForAppModalDialog() {
TestNotificationObserver observer;
RegisterAndWait(&observer, chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN,
NotificationService::AllSources());
- return Source<AppModalDialog>(observer.source()).ptr();
+ return content::Source<AppModalDialog>(observer.source()).ptr();
}
void CrashTab(TabContents* tab) {
@@ -498,19 +499,19 @@ void CrashTab(TabContents* tab) {
base::KillProcess(rph->GetHandle(), 0, false);
TestNotificationObserver observer;
RegisterAndWait(&observer, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- Source<RenderProcessHost>(rph));
+ content::Source<RenderProcessHost>(rph));
}
void WaitForFocusChange(TabContents* tab_contents) {
TestNotificationObserver observer;
RegisterAndWait(&observer, content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
}
void WaitForFocusInBrowser(Browser* browser) {
TestNotificationObserver observer;
RegisterAndWait(&observer, chrome::NOTIFICATION_FOCUS_RETURNED_TO_BROWSER,
- Source<Browser>(browser));
+ content::Source<Browser>(browser));
}
int FindInPage(TabContentsWrapper* tab_contents, const string16& search_string,
@@ -523,10 +524,10 @@ int FindInPage(TabContentsWrapper* tab_contents, const string16& search_string,
return observer.number_of_matches();
}
-void RegisterAndWait(NotificationObserver* observer,
+void RegisterAndWait(content::NotificationObserver* observer,
int type,
- const NotificationSource& source) {
- NotificationRegistrar registrar;
+ const content::NotificationSource& source) {
+ content::NotificationRegistrar registrar;
registrar.Add(observer, type, source);
RunMessageLoop();
}
@@ -618,7 +619,7 @@ bool SendKeyPressAndWait(const Browser* browser,
bool alt,
bool command,
int type,
- const NotificationSource& source) {
+ const content::NotificationSource& source) {
WindowedNotificationObserver observer(type, source);
if (!SendKeyPressSync(browser, key, control, shift, alt, command))
@@ -773,9 +774,10 @@ TestNotificationObserver::TestNotificationObserver()
TestNotificationObserver::~TestNotificationObserver() {}
-void TestNotificationObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void TestNotificationObserver::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
source_ = source;
details_ = details;
MessageLoopForUI::current()->Quit();
@@ -783,7 +785,7 @@ void TestNotificationObserver::Observe(int type,
WindowedNotificationObserver::WindowedNotificationObserver(
int notification_type,
- const NotificationSource& source)
+ const content::NotificationSource& source)
: seen_(false),
running_(false),
waiting_for_(source) {
@@ -802,9 +804,10 @@ void WindowedNotificationObserver::Wait() {
ui_test_utils::RunMessageLoop();
}
-void WindowedNotificationObserver::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void WindowedNotificationObserver::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (waiting_for_ == source ||
(running_ && waiting_for_ == NotificationService::AllSources())) {
seen_ = true;
@@ -824,7 +827,7 @@ TitleWatcher::TitleWatcher(TabContents* tab_contents,
expected_titles_.push_back(expected_title);
notification_registrar_.Add(this,
content::NOTIFICATION_TAB_CONTENTS_TITLE_UPDATED,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
// When navigating through the history, the restored NavigationEntry's title
// will be used. If the entry ends up having the same title after we return
@@ -834,7 +837,7 @@ TitleWatcher::TitleWatcher(TabContents* tab_contents,
notification_registrar_.Add(
this,
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab_contents->controller()));
+ content::Source<NavigationController>(&tab_contents->controller()));
}
void TitleWatcher::AlsoWaitForTitle(const string16& expected_title) {
@@ -853,14 +856,14 @@ const string16& TitleWatcher::WaitAndGetTitle() {
}
void TitleWatcher::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_TAB_CONTENTS_TITLE_UPDATED) {
- TabContents* source_contents = Source<TabContents>(source).ptr();
+ TabContents* source_contents = content::Source<TabContents>(source).ptr();
ASSERT_EQ(tab_contents_, source_contents);
} else if (type == content::NOTIFICATION_LOAD_STOP) {
NavigationController* controller =
- Source<NavigationController>(source).ptr();
+ content::Source<NavigationController>(source).ptr();
ASSERT_EQ(&tab_contents_->controller(), controller);
} else {
FAIL() << "Unexpected notification received.";
@@ -886,10 +889,10 @@ DOMMessageQueue::DOMMessageQueue() {
DOMMessageQueue::~DOMMessageQueue() {}
void DOMMessageQueue::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
- Details<DomOperationNotificationDetails> dom_op_details(details);
- Source<RenderViewHost> sender(source);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ content::Details<DomOperationNotificationDetails> dom_op_details(details);
+ content::Source<RenderViewHost> sender(source);
message_queue_.push(dom_op_details->json());
if (waiting_for_message_) {
waiting_for_message_ = false;
diff --git a/chrome/test/base/ui_test_utils.h b/chrome/test/base/ui_test_utils.h
index 4d1e423..1072383 100644
--- a/chrome/test/base/ui_test_utils.h
+++ b/chrome/test/base/ui_test_utils.h
@@ -18,10 +18,10 @@
#include "base/string16.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/test/automation/dom_element_proxy.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_source.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/gfx/native_widget_types.h"
@@ -211,9 +211,9 @@ void ClickOnView(const Browser* browser, ViewID vid);
// Register |observer| for the given |type| and |source| and run
// the message loop until the observer posts a quit task.
-void RegisterAndWait(NotificationObserver* observer,
+void RegisterAndWait(content::NotificationObserver* observer,
int type,
- const NotificationSource& source);
+ const content::NotificationSource& source);
// Blocks until |model| finishes loading.
void WaitForBookmarkModelToLoad(BookmarkModel* model);
@@ -257,7 +257,8 @@ bool SendKeyPressAndWait(const Browser* browser,
bool alt,
bool command,
int type,
- const NotificationSource& source) WARN_UNUSED_RESULT;
+ const content::NotificationSource& source)
+ WARN_UNUSED_RESULT;
// Run a message loop only for the specified amount of time.
class TimedMessageLoopRunner {
@@ -338,27 +339,27 @@ class TestWebSocketServer {
// A notification observer which quits the message loop when a notification
// is received. It also records the source and details of the notification.
-class TestNotificationObserver : public NotificationObserver {
+class TestNotificationObserver : public content::NotificationObserver {
public:
TestNotificationObserver();
virtual ~TestNotificationObserver();
- const NotificationSource& source() const {
+ const content::NotificationSource& source() const {
return source_;
}
- const NotificationDetails& details() const {
+ const content::NotificationDetails& details() const {
return details_;
}
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationSource source_;
- NotificationDetails details_;
+ content::NotificationSource source_;
+ content::NotificationDetails details_;
};
// A WindowedNotificationObserver allows code to watch for a notification
@@ -373,13 +374,13 @@ class TestNotificationObserver : public NotificationObserver {
// WindowedNotificationObserver signal(...)
// PerformAction()
// signal.Wait()
-class WindowedNotificationObserver : public NotificationObserver {
+class WindowedNotificationObserver : public content::NotificationObserver {
public:
// Register to listen for notifications of the given type from either a
// specific source, or from all sources if |source| is
// NotificationService::AllSources().
WindowedNotificationObserver(int notification_type,
- const NotificationSource& source);
+ const content::NotificationSource& source);
virtual ~WindowedNotificationObserver();
// Wait until the specified notification occurs. If the notification was
@@ -387,17 +388,17 @@ class WindowedNotificationObserver : public NotificationObserver {
// returns immediately.
void Wait();
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
bool seen_;
bool running_;
std::set<uintptr_t> sources_seen_;
- NotificationSource waiting_for_;
- NotificationRegistrar registrar_;
+ content::NotificationSource waiting_for_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(WindowedNotificationObserver);
};
@@ -410,8 +411,9 @@ template <class U>
class WindowedNotificationObserverWithDetails
: public WindowedNotificationObserver {
public:
- WindowedNotificationObserverWithDetails(int notification_type,
- const NotificationSource& source)
+ WindowedNotificationObserverWithDetails(
+ int notification_type,
+ const content::NotificationSource& source)
: WindowedNotificationObserver(notification_type, source) {}
// Fills |details| with the details of the notification received for |source|.
@@ -425,9 +427,9 @@ class WindowedNotificationObserverWithDetails
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
- const U* details_ptr = Details<U>(details).ptr();
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ const U* details_ptr = content::Details<U>(details).ptr();
if (details_ptr)
details_[source.map_key()] = *details_ptr;
WindowedNotificationObserver::Observe(type, source, details);
@@ -440,7 +442,7 @@ class WindowedNotificationObserverWithDetails
};
// Watches title changes on a tab, blocking until an expected title is set.
-class TitleWatcher : public NotificationObserver {
+class TitleWatcher : public content::NotificationObserver {
public:
// |tab_contents| must be non-NULL and needs to stay alive for the
// entire lifetime of |this|. |expected_title| is the title that |this|
@@ -457,14 +459,14 @@ class TitleWatcher : public NotificationObserver {
const string16& WaitAndGetTitle() WARN_UNUSED_RESULT;
private:
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
TabContents* tab_contents_;
std::vector<string16> expected_titles_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
// The most recently observed expected title, if any.
string16 observed_title_;
@@ -486,8 +488,8 @@ bool SendKeyPressAndWaitWithDetails(
bool alt,
bool command,
int type,
- const NotificationSource& source,
- const Details<U>& details) WARN_UNUSED_RESULT;
+ const content::NotificationSource& source,
+ const content::Details<U>& details) WARN_UNUSED_RESULT;
template <class U>
bool SendKeyPressAndWaitWithDetails(
@@ -498,8 +500,8 @@ bool SendKeyPressAndWaitWithDetails(
bool alt,
bool command,
int type,
- const NotificationSource& source,
- const Details<U>& details) {
+ const content::NotificationSource& source,
+ const content::Details<U>& details) {
WindowedNotificationObserverWithDetails<U> observer(type, source);
if (!SendKeyPressSync(browser, key, control, shift, alt, command))
@@ -522,7 +524,7 @@ void ShowAndFocusNativeWindow(gfx::NativeWindow window);
// Watches for responses from the DOMAutomationController and keeps them in a
// queue. Useful for waiting for a message to be received.
-class DOMMessageQueue : public NotificationObserver {
+class DOMMessageQueue : public content::NotificationObserver {
public:
// Constructs a DOMMessageQueue and begins listening for messages from the
// DOMAutomationController. Do not construct this until the browser has
@@ -534,13 +536,13 @@ class DOMMessageQueue : public NotificationObserver {
// message, if not null. Returns true on success.
bool WaitForMessage(std::string* message) WARN_UNUSED_RESULT;
- // Overridden NotificationObserver methods.
+ // Overridden content::NotificationObserver methods.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
std::queue<std::string> message_queue_;
bool waiting_for_message_;
diff --git a/chrome/test/test_navigation_observer.cc b/chrome/test/test_navigation_observer.cc
index 0531591..c817efb 100644
--- a/chrome/test/test_navigation_observer.cc
+++ b/chrome/test/test_navigation_observer.cc
@@ -39,7 +39,7 @@ TestNavigationObserver::JsInjectionReadyObserver::~JsInjectionReadyObserver() {
}
TestNavigationObserver::TestNavigationObserver(
- const NotificationSource& source,
+ const content::NotificationSource& source,
TestNavigationObserver::JsInjectionReadyObserver*
js_injection_ready_observer,
int number_of_navigations)
@@ -86,7 +86,7 @@ TestNavigationObserver::TestNavigationObserver(
}
void TestNavigationObserver::RegisterAsObserver(
- const NotificationSource& source) {
+ const content::NotificationSource& source) {
// Register for events to know when we've finished loading the page and are
// ready to quit the current message loop to return control back to the
// waiting test.
@@ -96,8 +96,8 @@ void TestNavigationObserver::RegisterAsObserver(
}
void TestNavigationObserver::Observe(
- int type, const NotificationSource& source,
- const NotificationDetails& details) {
+ int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_NAV_ENTRY_COMMITTED:
case content::NOTIFICATION_LOAD_START:
@@ -113,8 +113,9 @@ void TestNavigationObserver::Observe(
}
break;
case content::NOTIFICATION_RENDER_VIEW_HOST_CREATED:
- rvho_send_js_.reset(new RVHOSendJS(Source<RenderViewHost>(source).ptr(),
- js_injection_ready_observer_));
+ rvho_send_js_.reset(new RVHOSendJS(
+ content::Source<RenderViewHost>(source).ptr(),
+ js_injection_ready_observer_));
break;
default:
NOTREACHED();
diff --git a/chrome/test/test_navigation_observer.h b/chrome/test/test_navigation_observer.h
index 6f03cc7..401b4c0 100644
--- a/chrome/test/test_navigation_observer.h
+++ b/chrome/test/test_navigation_observer.h
@@ -8,8 +8,8 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class NavigationController;
class RenderViewHost;
@@ -19,7 +19,7 @@ class RenderViewHost;
// WebUI tests that need to inject javascript, construct with a
// JsInjectionReadyObserver and this class will call its
// OnJsInjectionReady() at the appropriate time.
-class TestNavigationObserver : public NotificationObserver {
+class TestNavigationObserver : public content::NotificationObserver {
public:
class RVHOSendJS;
@@ -39,7 +39,7 @@ class TestNavigationObserver : public NotificationObserver {
// OnEntryCommitted() after |number_of_navigations| navigations.
// Note: |js_injection_ready_observer| is owned by the caller and should be
// valid until this class is destroyed.
- TestNavigationObserver(const NotificationSource& source,
+ TestNavigationObserver(const content::NotificationSource& source,
JsInjectionReadyObserver* js_injection_ready_observer,
int number_of_navigations);
@@ -57,14 +57,14 @@ class TestNavigationObserver : public NotificationObserver {
int number_of_navigations);
// Register this TestNavigationObserver as an observer of the |source|.
- void RegisterAsObserver(const NotificationSource& source);
+ void RegisterAsObserver(const content::NotificationSource& source);
private:
- // NotificationObserver:
- virtual void Observe(int type, const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ // content::NotificationObserver:
+ virtual void Observe(int type, const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// If true the navigation has started.
bool navigation_started_;