summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui
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/browser/ui
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/browser/ui')
-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
255 files changed, 1639 insertions, 1561 deletions
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.