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 23:17:07 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 23:17:07 +0000
commitad50def5e1165d0cc74b98f988bbd5962587d9f4 (patch)
tree3a751abaed2cc056ca60b8b1e3ff54532a6f4d3f /chrome/browser/ui
parent75c920505ddfb2d49c194c76bde64edd6b3f91f2 (diff)
downloadchromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.zip
chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.tar.gz
chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.tar.bz2
Make NotificationService an interface in the content namespace, and switch callers to use it. Move the implementation to content/browser. Stop creating it in all child processes since it's only used in the browser.
BUG=98716 Review URL: http://codereview.chromium.org/8342048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r--chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc6
-rw-r--r--chrome/browser/ui/auto_login_prompter.cc2
-rw-r--r--chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc1
-rw-r--r--chrome/browser/ui/bookmarks/bookmark_tab_helper.cc6
-rw-r--r--chrome/browser/ui/browser.cc36
-rw-r--r--chrome/browser/ui/browser_browsertest.cc33
-rw-r--r--chrome/browser/ui/browser_list.cc42
-rw-r--r--chrome/browser/ui/browser_navigator.cc3
-rw-r--r--chrome/browser/ui/browser_navigator_browsertest.cc48
-rw-r--r--chrome/browser/ui/cocoa/base_bubble_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm6
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/browser/avatar_button_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/browser_window_cocoa.mm2
-rw-r--r--chrome/browser/ui/cocoa/history_menu_bridge.mm2
-rw-r--r--chrome/browser/ui/cocoa/info_bubble_window.mm4
-rw-r--r--chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm12
-rw-r--r--chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm4
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm1
-rw-r--r--chrome/browser/ui/cocoa/theme_install_bubble_view.mm13
-rw-r--r--chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm7
-rw-r--r--chrome/browser/ui/content_settings/content_setting_bubble_model.cc6
-rw-r--r--chrome/browser/ui/find_bar/find_bar_host_browsertest.cc7
-rw-r--r--chrome/browser/ui/find_bar/find_tab_helper.cc4
-rw-r--r--chrome/browser/ui/global_error_service.cc4
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc3
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc6
-rw-r--r--chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc1
-rw-r--r--chrome/browser/ui/gtk/browser_titlebar.cc4
-rw-r--r--chrome/browser/ui/gtk/browser_toolbar_gtk.cc4
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.cc6
-rw-r--r--chrome/browser/ui/gtk/bubble/bubble_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/custom_button.cc3
-rw-r--r--chrome/browser/ui/gtk/download/download_item_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/download/download_shelf_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/find_bar_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/global_history_menu.cc2
-rw-r--r--chrome/browser/ui/gtk/global_menu_bar.cc1
-rw-r--r--chrome/browser/ui/gtk/gtk_theme_service.cc4
-rw-r--r--chrome/browser/ui/gtk/infobars/infobar_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/location_bar_view_gtk.cc14
-rw-r--r--chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/overflow_button.cc2
-rw-r--r--chrome/browser/ui/gtk/status_bubble_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc12
-rw-r--r--chrome/browser/ui/login/login_prompt.cc25
-rw-r--r--chrome/browser/ui/login/login_prompt_browsertest.cc3
-rw-r--r--chrome/browser/ui/omnibox/omnibox_view_browsertest.cc4
-rw-r--r--chrome/browser/ui/panels/base_panel_browser_test.cc3
-rw-r--r--chrome/browser/ui/panels/panel.cc1
-rw-r--r--chrome/browser/ui/panels/panel_browser_view.cc10
-rw-r--r--chrome/browser/ui/panels/panel_browser_window_gtk.cc14
-rw-r--r--chrome/browser/ui/panels/panel_window_controller_cocoa.mm14
-rw-r--r--chrome/browser/ui/tab_contents/tab_contents_wrapper.cc8
-rw-r--r--chrome/browser/ui/toolbar/wrench_menu_model.cc4
-rw-r--r--chrome/browser/ui/views/accessibility_event_router_views_unittest.cc4
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc3
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc4
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc8
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc6
-rw-r--r--chrome/browser/ui/views/bubble/bubble.cc1
-rw-r--r--chrome/browser/ui/views/constrained_window_views.cc1
-rw-r--r--chrome/browser/ui/views/dom_view_browsertest.cc7
-rw-r--r--chrome/browser/ui/views/file_manager_dialog_browsertest.cc9
-rw-r--r--chrome/browser/ui/views/find_bar_host_interactive_uitest.cc4
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc6
-rw-r--r--chrome/browser/ui/views/frame/glass_browser_frame_view.cc4
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.cc4
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.cc12
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_view_views.cc1
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_view_win.cc1
-rw-r--r--chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc4
-rw-r--r--chrome/browser/ui/views/theme_install_bubble_view.cc12
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc8
-rw-r--r--chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc16
-rw-r--r--chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc4
-rw-r--r--chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc4
-rw-r--r--chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc10
-rw-r--r--chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc10
-rw-r--r--chrome/browser/ui/webui/collected_cookies_ui_delegate.cc2
-rw-r--r--chrome/browser/ui/webui/conflicts_ui.cc4
-rw-r--r--chrome/browser/ui/webui/html_dialog_ui.cc6
-rw-r--r--chrome/browser/ui/webui/media/media_internals_proxy.cc4
-rw-r--r--chrome/browser/ui/webui/metrics_handler.cc4
-rw-r--r--chrome/browser/ui/webui/ntp/app_launcher_handler.cc4
-rw-r--r--chrome/browser/ui/webui/ntp/bookmarks_handler.cc1
-rw-r--r--chrome/browser/ui/webui/ntp/foreign_session_handler.cc3
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_page_handler.cc7
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_ui.cc4
-rw-r--r--chrome/browser/ui/webui/ntp/ntp_resource_cache.cc4
-rw-r--r--chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc4
-rw-r--r--chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc6
-rw-r--r--chrome/browser/ui/webui/options/content_settings_handler.cc10
-rw-r--r--chrome/browser/ui/webui/options/extension_settings_handler.cc12
-rw-r--r--chrome/browser/ui/webui/options/manage_profile_handler.cc4
-rw-r--r--chrome/browser/ui/webui/options/personal_options_handler.cc6
-rw-r--r--chrome/browser/ui/webui/plugins_ui.cc2
-rw-r--r--chrome/browser/ui/webui/sync_promo_handler.cc4
-rw-r--r--chrome/browser/ui/webui/task_manager_handler.cc6
105 files changed, 353 insertions, 326 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 3d7a778..e77f88d 100644
--- a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc
+++ b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc
@@ -9,7 +9,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/javascript_dialogs.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
AppModalDialog::AppModalDialog(content::DialogDelegate* delegate,
const string16& title)
@@ -28,10 +28,10 @@ void AppModalDialog::ShowModalDialog() {
CreateAndShowDialog();
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN,
content::Source<AppModalDialog>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void AppModalDialog::CreateAndShowDialog() {
diff --git a/chrome/browser/ui/auto_login_prompter.cc b/chrome/browser/ui/auto_login_prompter.cc
index 0e16490..0b4e3a2 100644
--- a/chrome/browser/ui/auto_login_prompter.cc
+++ b/chrome/browser/ui/auto_login_prompter.cc
@@ -26,9 +26,9 @@
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/url_canon.h"
diff --git a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc
index 3e4e257..94c70e9 100644
--- a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc
+++ b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc
@@ -13,7 +13,6 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
BlockedContentTabHelper::BlockedContentTabHelper(
TabContentsWrapper* tab_contents)
diff --git a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
index ab56535..6e5f641 100644
--- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
@@ -13,7 +13,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
namespace {
@@ -31,9 +31,9 @@ BookmarkTabHelper::BookmarkTabHelper(TabContentsWrapper* tab_contents)
bookmark_drag_(NULL) {
// Register for notifications about URL starredness changing on any profile.
registrar_.Add(this, chrome::NOTIFICATION_URLS_STARRED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
BookmarkTabHelper::~BookmarkTabHelper() {
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 8f44bbb..3ab3c19 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -150,7 +150,7 @@
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/user_metrics.h"
#include "content/common/content_restriction.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/page_zoom.h"
#include "content/public/browser/notification_details.h"
#include "content/public/common/content_switches.h"
@@ -295,7 +295,7 @@ Browser::Browser(Type type, Profile* profile)
mouse_lock_state_(MOUSELOCK_NOT_REQUESTED),
window_has_shown_(false) {
registrar_.Add(this, content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
@@ -305,17 +305,17 @@ Browser::Browser(Type type, Profile* profile)
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(
this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
content::Source<ThemeService>(
ThemeServiceFactory::GetForProfile(profile_)));
registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Need to know when to alert the user of theme install delay.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_READY_FOR_INSTALL,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
PrefService* local_state = g_browser_process->local_state();
if (local_state) {
@@ -500,10 +500,10 @@ void Browser::InitBrowserWindow() {
}
#endif
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BROWSER_WINDOW_READY,
content::Source<Browser>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
PrefService* local_state = g_browser_process->local_state();
if (local_state && local_state->FindPreference(
@@ -1013,7 +1013,7 @@ void Browser::OnWindowClosing() {
tab_restore_service->BrowserClosing(tab_restore_service_delegate());
// TODO(sky): convert session/tab restore to use notification.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BROWSER_CLOSING,
content::Source<Browser>(this),
content::Details<bool>(&exiting));
@@ -1321,10 +1321,10 @@ void Browser::WindowFullscreenStateChanged() {
}
void Browser::NotifyFullscreenChange() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
content::Source<Browser>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
///////////////////////////////////////////////////////////////////////////////
@@ -3201,10 +3201,10 @@ void Browser::TabInsertedAt(TabContentsWrapper* contents,
void Browser::TabClosingAt(TabStripModel* tab_strip_model,
TabContentsWrapper* contents,
int index) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_TAB_CLOSING,
content::Source<NavigationController>(&contents->controller()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
// Sever the TabContents' connection back to us.
SetAsDelegate(contents, NULL);
@@ -3584,10 +3584,10 @@ void Browser::TabContentsFocused(TabContents* tab_content) {
}
bool Browser::TakeFocus(bool reverse) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_FOCUS_RETURNED_TO_BROWSER,
content::Source<Browser>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
return false;
}
@@ -5270,11 +5270,11 @@ bool Browser::OpenInstant(WindowOpenDisposition disposition) {
}
if (disposition == CURRENT_TAB) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_INSTANT_COMMITTED,
content::Source<TabContentsWrapper>(instant()->CommitCurrentPreview(
INSTANT_COMMIT_PRESSED_ENTER)),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
return true;
}
if (disposition == NEW_FOREGROUND_TAB) {
@@ -5290,10 +5290,10 @@ bool Browser::OpenInstant(WindowOpenDisposition disposition) {
instant()->last_transition_type(),
TabStripModel::ADD_ACTIVE);
instant()->CompleteRelease(preview_contents);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_INSTANT_COMMITTED,
content::Source<TabContentsWrapper>(preview_contents),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
return true;
}
// The omnibox currently doesn't use other dispositions, so we don't attempt
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index 02bbd56..9ddb466 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -40,6 +40,7 @@
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/common/page_transition_types.h"
#include "content/public/common/url_constants.h"
@@ -299,7 +300,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, CancelBeforeUnloadResetsURL) {
ui_test_utils::WindowedNotificationObserver host_destroyed_observer(
content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Cancel the dialog.
AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog();
@@ -380,10 +381,10 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NullOpenerRedirectForksProcess) {
ui_test_utils::WindowedNotificationObserver popup_observer(
content::NOTIFICATION_TAB_ADDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ui_test_utils::WindowedNotificationObserver nav_observer(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
oldtab->render_view_host()->
ExecuteJavascriptInWebFrame(string16(), ASCIIToUTF16(redirect_popup));
@@ -413,10 +414,10 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NullOpenerRedirectForksProcess) {
ui_test_utils::WindowedNotificationObserver popup_observer2(
content::NOTIFICATION_TAB_ADDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ui_test_utils::WindowedNotificationObserver nav_observer2(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
oldtab->render_view_host()->
ExecuteJavascriptInWebFrame(string16(), ASCIIToUTF16(refresh_popup));
@@ -465,10 +466,10 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, OtherRedirectsDontForkProcess) {
ui_test_utils::WindowedNotificationObserver popup_observer(
content::NOTIFICATION_TAB_ADDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ui_test_utils::WindowedNotificationObserver nav_observer(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
oldtab->render_view_host()->
ExecuteJavascriptInWebFrame(string16(), ASCIIToUTF16(dont_fork_popup));
@@ -494,7 +495,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, OtherRedirectsDontForkProcess) {
ui_test_utils::WindowedNotificationObserver nav_observer2(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
oldtab->render_view_host()->
ExecuteJavascriptInWebFrame(string16(), ASCIIToUTF16(navigate_str));
nav_observer2.Wait();
@@ -824,7 +825,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_TestNewTabExitsFullscreen) {
{
ui_test_utils::WindowedNotificationObserver fullscreen_observer(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->ToggleFullscreenModeForTab(fullscreen_tab, true);
fullscreen_observer.Wait();
ASSERT_TRUE(browser()->window()->IsFullscreen());
@@ -833,7 +834,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_TestNewTabExitsFullscreen) {
{
ui_test_utils::WindowedNotificationObserver fullscreen_observer(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
AddTabAtIndex(
1, GURL(chrome::kAboutBlankURL), content::PAGE_TRANSITION_TYPED);
fullscreen_observer.Wait();
@@ -860,7 +861,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_TestTabExitsItselfFromFullscreen) {
{
ui_test_utils::WindowedNotificationObserver fullscreen_observer(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->ToggleFullscreenModeForTab(fullscreen_tab, true);
fullscreen_observer.Wait();
ASSERT_TRUE(browser()->window()->IsFullscreen());
@@ -869,7 +870,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_TestTabExitsItselfFromFullscreen) {
{
ui_test_utils::WindowedNotificationObserver fullscreen_observer(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->ToggleFullscreenModeForTab(fullscreen_tab, false);
fullscreen_observer.Wait();
ASSERT_FALSE(browser()->window()->IsFullscreen());
@@ -896,7 +897,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_TestFullscreenBubbleMouseLockState) {
{
ui_test_utils::WindowedNotificationObserver fullscreen_observer(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->ToggleFullscreenModeForTab(fullscreen_tab, true);
fullscreen_observer.Wait();
ASSERT_TRUE(browser()->window()->IsFullscreen());
@@ -927,7 +928,7 @@ IN_PROC_BROWSER_TEST_F(
{
ui_test_utils::WindowedNotificationObserver fullscreen_observer(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
EXPECT_FALSE(browser()->window()->IsFullscreen());
EXPECT_FALSE(browser()->window()->InPresentationMode());
browser()->ToggleFullscreenModeForTab(fullscreen_tab, true);
@@ -939,7 +940,7 @@ IN_PROC_BROWSER_TEST_F(
{
ui_test_utils::WindowedNotificationObserver fullscreen_observer(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->TogglePresentationMode(false);
fullscreen_observer.Wait();
ASSERT_FALSE(browser()->window()->IsFullscreen());
@@ -951,7 +952,7 @@ IN_PROC_BROWSER_TEST_F(
// on Lion.
ui_test_utils::WindowedNotificationObserver fullscreen_observer(
chrome::NOTIFICATION_FULLSCREEN_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->ToggleFullscreenMode(false);
fullscreen_observer.Wait();
ASSERT_TRUE(browser()->window()->IsFullscreen());
diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc
index 244b3b1..416784d 100644
--- a/chrome/browser/ui/browser_list.cc
+++ b/chrome/browser/ui/browser_list.cc
@@ -22,7 +22,7 @@
#include "content/browser/tab_contents/navigation_details.h"
#include "content/common/result_codes.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#if defined(OS_MACOSX)
#include "chrome/browser/chrome_browser_application_mac.h"
@@ -48,7 +48,7 @@ class BrowserActivityObserver : public content::NotificationObserver {
public:
BrowserActivityObserver() {
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
~BrowserActivityObserver() {}
@@ -248,10 +248,10 @@ void BrowserList::AddBrowser(Browser* browser) {
if (!activity_observer)
activity_observer = new BrowserActivityObserver;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BROWSER_OPENED,
content::Source<Browser>(browser),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
// Send out notifications after add has occurred. Do some basic checking to
// try to catch evil observers that change the list from under us.
@@ -269,10 +269,10 @@ void BrowserList::MarkAsCleanShutdown() {
}
void BrowserList::AttemptExitInternal() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_APP_EXITING,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
#if !defined(OS_MACOSX)
// On most platforms, closing all windows causes the application to exit.
@@ -293,10 +293,10 @@ void BrowserList::NotifyAndTerminate(bool fast_path) {
#endif
if (fast_path) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_APP_TERMINATING,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
}
#if defined(OS_CHROMEOS)
@@ -327,7 +327,7 @@ void BrowserList::RemoveBrowser(Browser* browser) {
// simply ignore the behavior on the Mac outside of unit tests.
// TODO(andybons): Fix the UI tests to Do The Right Thing.
bool closing_last_browser = (browsers_.size() == 1);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BROWSER_CLOSED,
content::Source<Browser>(browser),
content::Details<bool>(&closing_last_browser));
@@ -360,10 +360,10 @@ void BrowserList::RemoveBrowser(Browser* browser) {
// to call ProfileManager::ShutdownSessionServices() as part of the
// shutdown, because Browser::WindowClosing() already makes sure that the
// SessionService is created and notified.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_APP_TERMINATING,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
AllBrowsersClosedAndAppExiting();
}
}
@@ -524,16 +524,16 @@ static void TimeLimitedSessionEnding() {
static bool already_ended = false;
// We may get called in the middle of shutdown, e.g. http://crbug.com/70852
// In this case, do nothing.
- if (already_ended || !NotificationService::current())
+ if (already_ended || !content::NotificationService::current())
return;
already_ended = true;
browser_shutdown::OnShutdownStarting(browser_shutdown::END_SESSION);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_APP_EXITING,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
// Write important data first.
g_browser_process->EndSession();
@@ -542,10 +542,10 @@ static void TimeLimitedSessionEnding() {
// Send out notification. This is used during testing so that the test harness
// can properly shutdown before we exit.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_SESSION_END,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
// And shutdown.
browser_shutdown::Shutdown();
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index 60b0e5a..f12a381 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -33,6 +33,7 @@
#include "content/browser/browser_url_handler.h"
#include "content/browser/site_instance.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "net/http/http_util.h"
namespace {
@@ -565,7 +566,7 @@ void Navigate(NavigateParams* params) {
}
if (params->disposition != CURRENT_TAB) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_TAB_ADDED,
content::Source<TabContentsDelegate>(params->browser),
content::Details<TabContents>(params->target_contents->tab_contents()));
diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc
index 2ac3d38..1dbb518 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.cc
+++ b/chrome/browser/ui/browser_navigator_browsertest.cc
@@ -20,6 +20,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
namespace {
@@ -137,7 +138,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_SingletonTabExisting) {
// As the registrar object goes out of scope, this will get unregistered
registrar.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->AddSelectedTabWithURL(
singleton_url1, content::PAGE_TRANSITION_LINK);
@@ -922,7 +923,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
params.disposition = OFF_THE_RECORD;
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser::Navigate(&params);
observer.Wait();
}
@@ -989,7 +991,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
NavigateFromDefaultToOptionsInSameTab) {
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenOptionsDialog();
observer.Wait();
}
@@ -1006,7 +1009,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenOptionsDialog();
observer.Wait();
}
@@ -1026,7 +1030,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenOptionsDialog();
observer.Wait();
}
@@ -1045,7 +1050,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenOptionsDialog();
observer.Wait();
}
@@ -1058,7 +1064,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
NavigateFromNTPToOptionsSingleton) {
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenOptionsDialog();
observer.Wait();
}
@@ -1069,7 +1076,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenOptionsDialog();
observer.Wait();
}
@@ -1082,7 +1090,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
NavigateFromNTPToOptionsPageInSameTab) {
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->ShowOptionsTab(chrome::kPersonalOptionsSubPage);
observer.Wait();
}
@@ -1095,7 +1104,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->ShowOptionsTab(chrome::kPersonalOptionsSubPage);
observer.Wait();
}
@@ -1108,13 +1118,15 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
NavigateFromOtherTabToSingletonOptions) {
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenOptionsDialog();
observer.Wait();
}
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->AddSelectedTabWithURL(
GetGoogleURL(), content::PAGE_TRANSITION_LINK);
observer.Wait();
@@ -1122,7 +1134,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenOptionsDialog();
observer.Wait();
}
@@ -1173,7 +1186,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
NavigateFromDefaultToHistoryInSameTab) {
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->ShowHistoryTab();
observer.Wait();
}
@@ -1186,7 +1200,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
NavigateFromDefaultToBookmarksInSameTab) {
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->OpenBookmarkManager();
observer.Wait();
}
@@ -1199,7 +1214,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
NavigateFromDefaultToDownloadsInSameTab) {
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->ShowDownloadsTab();
observer.Wait();
}
diff --git a/chrome/browser/ui/cocoa/base_bubble_controller.mm b/chrome/browser/ui/cocoa/base_bubble_controller.mm
index 168fa71..0a7b509 100644
--- a/chrome/browser/ui/cocoa/base_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/base_bubble_controller.mm
@@ -11,7 +11,7 @@
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -28,7 +28,7 @@ class Bridge : public content::NotificationObserver {
public:
explicit Bridge(BaseBubbleController* controller) : controller_(controller) {
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_HIDDEN,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
// content::NotificationObserver:
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
index 201f852..28dcab6 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
@@ -14,7 +14,7 @@
#include "content/browser/user_metrics.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util_mac.h"
@@ -41,9 +41,9 @@ BookmarkBubbleNotificationBridge::BookmarkBubbleNotificationBridge(
// registrar_ will automatically RemoveAll() when destroyed so we
// don't need to do so explicitly.
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_TAB_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
// At this time all notifications instigate the same behavior (go
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm
index 641e2b5..fd09f81 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm
@@ -11,7 +11,7 @@
#include "chrome/browser/ui/cocoa/browser_window_controller.h"
#include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
#import "chrome/browser/ui/cocoa/info_bubble_window.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
#import "testing/gtest_mac.h"
#include "testing/platform_test.h"
@@ -472,10 +472,10 @@ TEST_F(BookmarkBubbleControllerTest, BubbleGoesAwayOnNewTab) {
// are "just enough" to run tests without being complete. Instead
// we fake the notification that would be triggered by a tab
// creation. See TabContents::NotifyConnected().
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
content::Source<TabContents>(NULL),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
// Confirm bubble going bye-bye.
EXPECT_TRUE(IsWindowClosing());
diff --git a/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm b/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
index 42192f6..0e05ef4 100644
--- a/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
+++ b/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
@@ -16,7 +16,7 @@
#import "chrome/browser/ui/cocoa/image_utils.h"
#import "chrome/browser/ui/cocoa/menu_controller.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/resource/resource_bundle.h"
@@ -40,7 +40,7 @@ class Observer : public content::NotificationObserver {
public:
Observer(AvatarButtonController* button) : button_(button) {
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
// NotificationObserver:
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
index 9038022..3980096 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -42,7 +42,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/notification_details.h"
#include "grit/chromium_strings.h"
diff --git a/chrome/browser/ui/cocoa/history_menu_bridge.mm b/chrome/browser/ui/cocoa/history_menu_bridge.mm
index 56eae82..93c7003 100644
--- a/chrome/browser/ui/cocoa/history_menu_bridge.mm
+++ b/chrome/browser/ui/cocoa/history_menu_bridge.mm
@@ -20,7 +20,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
diff --git a/chrome/browser/ui/cocoa/info_bubble_window.mm b/chrome/browser/ui/cocoa/info_bubble_window.mm
index 044055a..aa4b5c9 100644
--- a/chrome/browser/ui/cocoa/info_bubble_window.mm
+++ b/chrome/browser/ui/cocoa/info_bubble_window.mm
@@ -9,7 +9,7 @@
#include "base/memory/scoped_nsobject.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
@@ -34,7 +34,7 @@ class AppNotificationBridge : public content::NotificationObserver {
public:
explicit AppNotificationBridge(InfoBubbleWindow* owner) : owner_(owner) {
registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
// Overridden from content::NotificationObserver.
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index 17aa6b9..400078e 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -49,7 +49,7 @@
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "net/base/net_util.h"
@@ -105,7 +105,7 @@ LocationBarViewMac::LocationBarViewMac(
registrar_.Add(this,
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
edit_bookmarks_enabled_.Init(prefs::kEditBookmarksEnabled,
profile_->GetPrefs(), this);
@@ -184,10 +184,10 @@ void LocationBarViewMac::UpdatePageActions() {
RefreshPageActionDecorations();
Layout();
if (page_action_decorations_.size() != count_before) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
content::Source<LocationBar>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
}
@@ -196,10 +196,10 @@ void LocationBarViewMac::InvalidatePageActions() {
DeletePageActionDecorations();
Layout();
if (page_action_decorations_.size() != count_before) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
content::Source<LocationBar>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
}
diff --git a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
index 00c19b9..268132d 100644
--- a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
@@ -18,7 +18,7 @@
#include "chrome/common/extensions/extension_action.h"
#include "chrome/common/extensions/extension_resource.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "skia/ext/skia_utils_mac.h"
namespace {
@@ -186,7 +186,7 @@ void PageActionDecoration::UpdateVisibility(TabContents* contents,
if (IsVisible() != visible) {
SetVisible(visible);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
content::Source<ExtensionAction>(page_action_),
content::Details<TabContents>(contents));
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index fe4dead..5da896c 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -55,7 +55,6 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
diff --git a/chrome/browser/ui/cocoa/theme_install_bubble_view.mm b/chrome/browser/ui/cocoa/theme_install_bubble_view.mm
index 60d433e..ae97124 100644
--- a/chrome/browser/ui/cocoa/theme_install_bubble_view.mm
+++ b/chrome/browser/ui/cocoa/theme_install_bubble_view.mm
@@ -6,9 +6,10 @@
#import "chrome/browser/ui/cocoa/theme_install_bubble_view.h"
+#include "base/logging.h"
#include "base/memory/scoped_nsobject.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util_mac.h"
@@ -64,27 +65,27 @@ ThemeInstallBubbleView::ThemeInstallBubbleView(NSWindow* window)
registrar_.Add(
this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
// Close when we are installing an extension, not a theme.
registrar_.Add(
this,
chrome::NOTIFICATION_NO_THEME_DETECTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_INSTALLED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Don't let the bubble overlap the confirm dialog.
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_WILL_SHOW_CONFIRM_DIALOG,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Add the view.
[cocoa_view_ setFrame:parent_bounds];
diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
index 342dd89..a5f5f68 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
@@ -49,7 +49,7 @@
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_observer.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -104,7 +104,7 @@ class NotificationBridge : public content::NotificationObserver {
explicit NotificationBridge(ToolbarController* controller)
: controller_(controller) {
registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED,
content::Source<Profile>([controller browser]->profile()));
}
diff --git a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
index afcbd19..bd4b9c1 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
+++ b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
@@ -21,7 +21,7 @@
#include "chrome/browser/profiles/profile.h"
#include "content/browser/user_metrics.h"
#include "content/public/browser/notification_observer.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/chromium_strings.h"
@@ -64,8 +64,9 @@ class ZoomLevelObserver : public content::NotificationObserver {
public:
explicit ZoomLevelObserver(WrenchMenuController* controller)
: controller_(controller) {
- registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
- NotificationService::AllBrowserContextsAndSources());
+ registrar_.Add(
+ this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
+ content::NotificationService::AllBrowserContextsAndSources());
}
void Observe(int type,
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
index 5c7ffd3..65833ac 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -23,7 +23,7 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "net/base/net_util.h"
#include "ui/base/l10n/l10n_util.h"
@@ -327,11 +327,11 @@ class ContentSettingCookiesBubbleModel : public ContentSettingSingleRadioGroup {
virtual void OnCustomLinkClicked() OVERRIDE {
if (!tab_contents())
return;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN,
content::Source<TabSpecificContentSettings>(
tab_contents()->content_settings()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
browser()->ShowCollectedCookiesDialog(tab_contents());
}
};
diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
index a0966ec..3341305 100644
--- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
+++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
@@ -21,6 +21,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "net/test/test_server.h"
#include "ui/base/keycodes/keyboard_codes.h"
@@ -1061,7 +1062,8 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_NoIncognitoPrepopulate) {
Profile* incognito_profile = browser()->profile()->GetOffTheRecordProfile();
Browser* incognito_browser = Browser::Create(incognito_profile);
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
incognito_browser->AddSelectedTabWithURL(
url, content::PAGE_TRANSITION_START_PAGE);
observer.Wait();
@@ -1120,7 +1122,8 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FitWindow) {
params.initial_bounds = gfx::Rect(0, 0, 250, 500);
Browser* popup = Browser::CreateWithParams(params);
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
popup->AddSelectedTabWithURL(GURL(chrome::kAboutBlankURL),
content::PAGE_TRANSITION_LINK);
// Wait for the page to finish loading.
diff --git a/chrome/browser/ui/find_bar/find_tab_helper.cc b/chrome/browser/ui/find_bar/find_tab_helper.cc
index 3fff646..96c442a 100644
--- a/chrome/browser/ui/find_bar/find_tab_helper.cc
+++ b/chrome/browser/ui/find_bar/find_tab_helper.cc
@@ -11,7 +11,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/common/view_message_enums.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h"
@@ -146,7 +146,7 @@ void FindTabHelper::HandleFindReply(int request_id,
last_search_result_ = FindNotificationDetails(
request_id, number_of_matches, selection, active_match_ordinal,
final_update);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_FIND_RESULT_AVAILABLE,
content::Source<TabContents>(tab_contents()),
content::Details<FindNotificationDetails>(&last_search_result_));
diff --git a/chrome/browser/ui/global_error_service.cc b/chrome/browser/ui/global_error_service.cc
index 30a4b7bb..3e47cc8 100644
--- a/chrome/browser/ui/global_error_service.cc
+++ b/chrome/browser/ui/global_error_service.cc
@@ -9,7 +9,7 @@
#include "base/stl_util.h"
#include "chrome/browser/ui/global_error.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
GlobalErrorService::GlobalErrorService(Profile* profile) : profile_(profile) {
}
@@ -60,7 +60,7 @@ GlobalError* GlobalErrorService::GetFirstGlobalErrorWithBubbleView() const {
}
void GlobalErrorService::NotifyErrorsChanged(GlobalError* error) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED,
content::Source<Profile>(profile_),
content::Details<GlobalError>(error));
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
index 4bf68e7..b9c15f2 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
@@ -38,7 +38,8 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/ui_resources.h"
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc
index 395f929b..861e57e 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
index 3a148a8..2ae7d51 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
@@ -24,7 +24,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/gtk/gtk_hig_constants.h"
#include "ui/base/l10n/l10n_util.h"
@@ -59,10 +59,10 @@ void BookmarkBubbleGtk::BubbleClosing(BubbleGtk* bubble,
apply_edits_ = false;
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_BUBBLE_HIDDEN,
content::Source<Profile>(profile_->GetOriginalProfile()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void BookmarkBubbleGtk::Observe(int type,
diff --git a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
index 6209bf9..35b3ac0 100644
--- a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
@@ -32,7 +32,6 @@
#include "chrome/common/extensions/extension_action.h"
#include "chrome/common/extensions/extension_resource.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/ui/gtk/browser_titlebar.cc b/chrome/browser/ui/gtk/browser_titlebar.cc
index 87a0f79..ae2b935 100644
--- a/chrome/browser/ui/gtk/browser_titlebar.cc
+++ b/chrome/browser/ui/gtk/browser_titlebar.cc
@@ -41,7 +41,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
@@ -336,7 +336,7 @@ void BrowserTitlebar::Init() {
avatar_button_.reset(new AvatarMenuButtonGtk(browser_window_->browser()));
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
#if defined(USE_GCONF)
// Either read the gconf database and register for updates (on GNOME), or use
diff --git a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
index 1380dc2..17df62c 100644
--- a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
@@ -44,7 +44,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -102,7 +102,7 @@ BrowserToolbarGtk::BrowserToolbarGtk(Browser* browser, BrowserWindowGtk* window)
registrar_.Add(this,
chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this,
chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED,
content::Source<Profile>(browser_->profile()));
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc
index dd196c0..674b6e1 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc
@@ -84,7 +84,7 @@
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -1529,10 +1529,10 @@ bool BrowserWindowGtk::CanClose() const {
}
// Empty TabStripModel, it's now safe to allow the Window to be closed.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_WINDOW_CLOSED,
content::Source<GtkWindow>(window_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
return true;
}
diff --git a/chrome/browser/ui/gtk/bubble/bubble_gtk.cc b/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
index 3a3962a..089dae6 100644
--- a/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "ui/base/gtk/gtk_hig_constants.h"
#include "ui/base/gtk/gtk_windowing.h"
#include "ui/gfx/gtk_util.h"
diff --git a/chrome/browser/ui/gtk/custom_button.cc b/chrome/browser/ui/gtk/custom_button.cc
index 1d7f8e4..0e0bfef 100644
--- a/chrome/browser/ui/gtk/custom_button.cc
+++ b/chrome/browser/ui/gtk/custom_button.cc
@@ -5,12 +5,13 @@
#include "chrome/browser/ui/gtk/custom_button.h"
#include "base/basictypes.h"
+#include "base/logging.h"
#include "chrome/browser/ui/gtk/cairo_cached_surface.h"
#include "chrome/browser/ui/gtk/gtk_chrome_button.h"
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/theme_resources_standard.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/ui/gtk/download/download_item_gtk.cc b/chrome/browser/ui/gtk/download/download_item_gtk.cc
index 4449d5c..38bfa84 100644
--- a/chrome/browser/ui/gtk/download/download_item_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_item_gtk.cc
@@ -24,7 +24,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/download/download_item.h"
#include "content/browser/download/download_manager.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "third_party/skia/include/core/SkBitmap.h"
diff --git a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
index 713ddf8..68e5cfa 100644
--- a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
@@ -20,7 +20,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/download/download_item.h"
#include "content/browser/download/download_stats.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
diff --git a/chrome/browser/ui/gtk/find_bar_gtk.cc b/chrome/browser/ui/gtk/find_bar_gtk.cc
index 1513267..2a4337b 100644
--- a/chrome/browser/ui/gtk/find_bar_gtk.cc
+++ b/chrome/browser/ui/gtk/find_bar_gtk.cc
@@ -34,7 +34,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/ui/gtk/global_history_menu.cc b/chrome/browser/ui/gtk/global_history_menu.cc
index 7028c3ba..d075b1a 100644
--- a/chrome/browser/ui/gtk/global_history_menu.cc
+++ b/chrome/browser/ui/gtk/global_history_menu.cc
@@ -23,7 +23,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/url_constants.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "ui/base/gtk/owned_widget_gtk.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/gtk/global_menu_bar.cc b/chrome/browser/ui/gtk/global_menu_bar.cc
index 2840f32..3639dde 100644
--- a/chrome/browser/ui/gtk/global_menu_bar.cc
+++ b/chrome/browser/ui/gtk/global_menu_bar.cc
@@ -17,7 +17,6 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/ui/gtk/gtk_theme_service.cc b/chrome/browser/ui/gtk/gtk_theme_service.cc
index 17c5341..f90aa9c 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.cc
+++ b/chrome/browser/ui/gtk/gtk_theme_service.cc
@@ -27,7 +27,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "grit/theme_resources.h"
@@ -338,7 +338,7 @@ bool GtkThemeService::HasCustomImage(int id) const {
void GtkThemeService::InitThemesFor(NotificationObserver* observer) {
observer->Observe(chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
content::Source<ThemeService>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void GtkThemeService::SetTheme(const Extension* extension) {
diff --git a/chrome/browser/ui/gtk/infobars/infobar_gtk.cc b/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
index e0a2db6..eb22a33 100644
--- a/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
+++ b/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "ui/base/gtk/gtk_expanded_container.h"
#include "ui/base/gtk/gtk_hig_constants.h"
#include "ui/base/gtk/gtk_signal_registrar.h"
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index 3b39f4e..c6f0dd6 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -54,7 +54,7 @@
#include "chrome/common/extensions/extension_resource.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
@@ -553,7 +553,7 @@ void LocationBarViewGtk::OnSetFocus() {
Profile* profile = browser_->profile();
AccessibilityTextBoxInfo info(profile,
l10n_util::GetStringUTF8(IDS_ACCNAME_LOCATION), false);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED,
content::Source<Profile>(profile),
content::Details<AccessibilityTextBoxInfo>(&info));
@@ -659,10 +659,10 @@ void LocationBarViewGtk::UpdatePageActions() {
gtk_box_pack_end(GTK_BOX(page_action_hbox_.get()),
page_action_views_[i]->widget(), FALSE, FALSE, 0);
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
content::Source<LocationBar>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
TabContents* contents = GetTabContents();
@@ -685,10 +685,10 @@ void LocationBarViewGtk::InvalidatePageActions() {
size_t count_before = page_action_views_.size();
page_action_views_.reset();
if (page_action_views_.size() != count_before) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
content::Source<LocationBar>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
}
@@ -1535,7 +1535,7 @@ void LocationBarViewGtk::PageActionViewGtk::UpdateVisibility(
gtk_widget_hide_all(event_box_.get());
if (visible != old_visible) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
content::Source<ExtensionAction>(page_action_),
content::Details<TabContents>(contents));
diff --git a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
index 9aa37a8..b49f72c 100644
--- a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
+++ b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
@@ -32,8 +32,6 @@
#include "chrome/common/extensions/extension.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#include "content/common/notification_service.h"
-#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc b/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc
index 2d875c5..5cf9267 100644
--- a/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc
+++ b/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc
@@ -26,7 +26,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/omnibox/omnibox_view.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/theme_resources.h"
#include "ui/base/gtk/gtk_hig_constants.h"
#include "ui/base/gtk/gtk_windowing.h"
diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc
index af059c2..2768926 100644
--- a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc
+++ b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc
@@ -26,7 +26,7 @@
#include "chrome/browser/ui/toolbar/toolbar_model.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
#include "net/base/escape.h"
diff --git a/chrome/browser/ui/gtk/overflow_button.cc b/chrome/browser/ui/gtk/overflow_button.cc
index 9f31401..ae2137a 100644
--- a/chrome/browser/ui/gtk/overflow_button.cc
+++ b/chrome/browser/ui/gtk/overflow_button.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/theme_resources.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/ui/gtk/status_bubble_gtk.cc b/chrome/browser/ui/gtk/status_bubble_gtk.cc
index 30fb60c..f081ff7 100644
--- a/chrome/browser/ui/gtk/status_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/status_bubble_gtk.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/ui/gtk/rounded_window.h"
#include "chrome/browser/ui/gtk/slide_animator_gtk.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/gtk/gtk_hig_constants.h"
#include "ui/base/text/text_elider.h"
diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
index 84d3300c..8867d75 100644
--- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
@@ -20,7 +20,7 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
index a14ea30..cbd8618 100644
--- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
@@ -27,7 +27,7 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
#include "grit/ui_resources.h"
diff --git a/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc b/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc
index 8c4b766..ba964db 100644
--- a/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc
+++ b/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/gtk/rounded_window.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/gtk/gtk_hig_constants.h"
#include "ui/base/gtk/gtk_screen_utils.h"
@@ -60,27 +60,27 @@ ThemeInstallBubbleViewGtk::ThemeInstallBubbleViewGtk(GtkWidget* parent)
registrar_.Add(
this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
// Close when we are installing an extension, not a theme.
registrar_.Add(
this,
chrome::NOTIFICATION_NO_THEME_DETECTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_INSTALLED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Don't let the bubble overlap the confirm dialog.
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_WILL_SHOW_CONFIRM_DIALOG,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ThemeInstallBubbleViewGtk::~ThemeInstallBubbleViewGtk() {
diff --git a/chrome/browser/ui/login/login_prompt.cc b/chrome/browser/ui/login/login_prompt.cc
index 8e11439..0e5135e 100644
--- a/chrome/browser/ui/login/login_prompt.cc
+++ b/chrome/browser/ui/login/login_prompt.cc
@@ -21,7 +21,7 @@
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "net/base/auth.h"
#include "net/base/net_util.h"
@@ -195,18 +195,20 @@ void LoginHandler::AddObservers() {
// This is probably OK; we need to listen to everything and we break out of
// the Observe() if we aren't handling the same auth_info().
registrar_.Add(this, chrome::NOTIFICATION_AUTH_SUPPLIED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, chrome::NOTIFICATION_AUTH_CANCELLED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
void LoginHandler::RemoveObservers() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- registrar_.Remove(this, chrome::NOTIFICATION_AUTH_SUPPLIED,
- NotificationService::AllBrowserContextsAndSources());
- registrar_.Remove(this, chrome::NOTIFICATION_AUTH_CANCELLED,
- NotificationService::AllBrowserContextsAndSources());
+ registrar_.Remove(
+ this, chrome::NOTIFICATION_AUTH_SUPPLIED,
+ content::NotificationService::AllBrowserContextsAndSources());
+ registrar_.Remove(
+ this, chrome::NOTIFICATION_AUTH_CANCELLED,
+ content::NotificationService::AllBrowserContextsAndSources());
DCHECK(registrar_.IsEmpty());
}
@@ -265,7 +267,8 @@ void LoginHandler::NotifyAuthNeeded() {
if (WasAuthHandled())
return;
- NotificationService* service = NotificationService::current();
+ content::NotificationService* service =
+ content::NotificationService::current();
NavigationController* controller = NULL;
TabContents* requesting_contents = GetTabContentsForLogin();
@@ -283,7 +286,8 @@ void LoginHandler::NotifyAuthCancelled() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(WasAuthHandled());
- NotificationService* service = NotificationService::current();
+ content::NotificationService* service =
+ content::NotificationService::current();
NavigationController* controller = NULL;
TabContents* requesting_contents = GetTabContentsForLogin();
@@ -306,7 +310,8 @@ void LoginHandler::NotifyAuthSupplied(const string16& username,
if (!requesting_contents)
return;
- NotificationService* service = NotificationService::current();
+ content::NotificationService* service =
+ content::NotificationService::current();
NavigationController* controller = &requesting_contents->controller();
AuthSuppliedLoginNotificationDetails details(this, username, password);
diff --git a/chrome/browser/ui/login/login_prompt_browsertest.cc b/chrome/browser/ui/login/login_prompt_browsertest.cc
index 09821f3..528edfd 100644
--- a/chrome/browser/ui/login/login_prompt_browsertest.cc
+++ b/chrome/browser/ui/login/login_prompt_browsertest.cc
@@ -16,7 +16,8 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "net/base/auth.h"
#include "net/base/mock_host_resolver.h"
diff --git a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
index 850ddca..718f89b 100644
--- a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
+++ b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
@@ -32,7 +32,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/base/mock_host_resolver.h"
#include "ui/base/events.h"
#include "ui/base/keycodes/keyboard_codes.h"
@@ -229,7 +229,7 @@ class OmniboxViewTest : public InProcessBrowserTest,
(tab_count < expected_tab_count ?
content::NOTIFICATION_TAB_PARENTED :
content::NOTIFICATION_TAB_CLOSED),
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
while (!HasFailure() && browser->tab_count() != expected_tab_count)
ui_test_utils::RunMessageLoop();
diff --git a/chrome/browser/ui/panels/base_panel_browser_test.cc b/chrome/browser/ui/panels/base_panel_browser_test.cc
index 187298d..08a2a80 100644
--- a/chrome/browser/ui/panels/base_panel_browser_test.cc
+++ b/chrome/browser/ui/panels/base_panel_browser_test.cc
@@ -18,6 +18,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/test_tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/common/url_constants.h"
#if defined(OS_MACOSX)
@@ -246,7 +247,7 @@ Panel* BasePanelBrowserTest::CreatePanelWithParams(
} else {
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
panel_browser->AddSelectedTabWithURL(params.url,
content::PAGE_TRANSITION_START_PAGE);
observer.Wait();
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index 74e1f1a..246636e 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -17,6 +17,7 @@
#include "chrome/common/extensions/extension.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "ui/gfx/rect.h"
diff --git a/chrome/browser/ui/panels/panel_browser_view.cc b/chrome/browser/ui/panels/panel_browser_view.cc
index 746e47c..de26f11 100644
--- a/chrome/browser/ui/panels/panel_browser_view.cc
+++ b/chrome/browser/ui/panels/panel_browser_view.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/ui/webui/task_manager_dialog.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/l10n/l10n_util.h"
@@ -176,10 +176,10 @@ void PanelBrowserView::OnWidgetActivationChanged(views::Widget* widget,
StopDrawingAttention();
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
content::Source<Panel>(panel()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
bool PanelBrowserView::AcceleratorPressed(
@@ -197,10 +197,10 @@ bool PanelBrowserView::AcceleratorPressed(
}
void PanelBrowserView::AnimationEnded(const ui::Animation* animation) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
content::Source<Panel>(panel()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void PanelBrowserView::AnimationProgressed(const ui::Animation* animation) {
diff --git a/chrome/browser/ui/panels/panel_browser_window_gtk.cc b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
index 4c8f9f0..954554c 100644
--- a/chrome/browser/ui/panels/panel_browser_window_gtk.cc
+++ b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/ui/panels/panel_manager.h"
#include "chrome/browser/ui/panels/panel_settings_menu_model.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/dragdrop/gtk_dnd_util.h"
@@ -148,10 +148,10 @@ void PanelBrowserWindowGtk::OnSizeChanged(int width, int height) {
StartBoundsAnimation(gfx::Rect(bounds_.x(), top, width, height));
panel_->OnWindowSizeAvailable();
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_WINDOW_SIZE_KNOWN,
content::Source<Panel>(panel_.get()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
bool PanelBrowserWindowGtk::UseCustomFrame() {
@@ -196,10 +196,10 @@ void PanelBrowserWindowGtk::ActiveWindowChanged(GdkWindow* active_window) {
if (was_active == IsActive()) // State didn't change.
return;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
content::Source<Panel>(panel_.get()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
BrowserWindowGtk::TitleDecoration PanelBrowserWindowGtk::GetWindowTitle(
@@ -428,10 +428,10 @@ void PanelBrowserWindowGtk::DidProcessEvent(GdkEvent* event) {
}
void PanelBrowserWindowGtk::AnimationEnded(const ui::Animation* animation) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
content::Source<Panel>(panel_.get()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void PanelBrowserWindowGtk::AnimationProgressed(
diff --git a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
index 05e0664..b1c07fd 100644
--- a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
+++ b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
@@ -33,7 +33,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/ui_resources.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image.h"
@@ -442,10 +442,10 @@ enum {
if (windowShim_->panel()->expansion_state() == Panel::EXPANDED)
[self enableTabContentsViewAutosizing];
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
content::Source<Panel>(windowShim_->panel()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
- (void)terminateBoundsAnimation {
@@ -512,10 +512,10 @@ enum {
[[self titlebarView] stopDrawingAttention];
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
content::Source<Panel>(windowShim_->panel()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
- (void)windowDidResignKey:(NSNotification*)notification {
@@ -534,10 +534,10 @@ enum {
rwhv->SetActive(false);
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
content::Source<Panel>(windowShim_->panel()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
@end
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
index db38d5d..a862aa4 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
@@ -54,7 +54,7 @@
#include "chrome/common/render_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "grit/platform_locale_settings.h"
@@ -296,9 +296,9 @@ TabContentsWrapper::TabContentsWrapper(TabContents* contents)
omnibox_search_hint_.reset(new OmniboxSearchHint(this));
registrar_.Add(this, chrome::NOTIFICATION_GOOGLE_URL_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_USER_STYLE_SHEET_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
#if defined(OS_POSIX) && !defined(OS_MACOSX)
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
content::Source<ThemeService>(
@@ -615,7 +615,7 @@ void TabContentsWrapper::Observe(int type,
// Internal helpers
void TabContentsWrapper::OnSnapshot(const SkBitmap& bitmap) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_SNAPSHOT_TAKEN,
content::Source<TabContentsWrapper>(this),
content::Details<const SkBitmap>(&bitmap));
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index a884f78..11bddf2 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -35,7 +35,7 @@
#include "chrome/common/profiling.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/chromium_strings.h"
@@ -211,7 +211,7 @@ WrenchMenuModel::WrenchMenuModel(ui::AcceleratorProvider* provider,
this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
content::Source<HostZoomMap>(browser_->profile()->GetHostZoomMap()));
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
WrenchMenuModel::~WrenchMenuModel() {
diff --git a/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc b/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc
index 684ae7a..692def3 100644
--- a/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc
+++ b/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc
@@ -12,7 +12,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "views/controls/button/text_button.h"
#include "views/layout/grid_layout.h"
@@ -160,7 +160,7 @@ TEST_F(AccessibilityEventRouterViewsTest, MAYBE_TestFocusNotification) {
content::NotificationRegistrar registrar;
registrar.Add(this,
chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Switch on accessibility event notifications.
ExtensionAccessibilityEventRouter* accessibility_event_router =
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
index 3fc1553..9333a6f 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -40,7 +40,8 @@
#include "content/browser/tab_contents/page_navigator.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/common/page_transition_types.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
index 1888bf8..7fe3804 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
@@ -22,7 +22,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/base/view_event_test_base.h"
#include "content/browser/tab_contents/page_navigator.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/accessibility/accessibility_types.h"
#include "ui/base/clipboard/clipboard.h"
@@ -479,7 +479,7 @@ class ContextMenuNotificationObserver : public content::NotificationObserver {
: task_(task) {
registrar_.Add(this,
chrome::NOTIFICATION_BOOKMARK_CONTEXT_MENU_SHOWN,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
virtual void Observe(int type,
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
index 1b6ddfb..c887083 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
@@ -17,7 +17,7 @@
#include "chrome/browser/ui/views/bubble/bubble.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/keycodes/keyboard_codes.h"
@@ -103,7 +103,7 @@ void BookmarkBubbleView::Show(views::Widget* parent,
bookmark_bubble_->set_bubble(bubble);
bubble->SizeToContents();
GURL url_ptr(url);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_BUBBLE_SHOWN,
content::Source<Profile>(profile->GetOriginalProfile()),
content::Details<GURL>(&url_ptr));
@@ -317,10 +317,10 @@ void BookmarkBubbleView::BubbleClosing(Bubble* bubble,
if (delegate_)
delegate_->BubbleClosing(bubble, closed_by_escape);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_BUBBLE_HIDDEN,
content::Source<Profile>(profile_->GetOriginalProfile()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
bool BookmarkBubbleView::CloseOnEscape() {
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc b/chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc
index f63b779..0972af4 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "views/controls/menu/menu_item_view.h"
@@ -43,10 +43,10 @@ BookmarkContextMenu::~BookmarkContextMenu() {
}
void BookmarkContextMenu::RunMenuAt(const gfx::Point& point) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_CONTEXT_MENU_SHOWN,
content::Source<BookmarkContextMenu>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
// width/height don't matter here.
if (menu_runner_->RunMenuAt(
parent_widget_, NULL, gfx::Rect(point.x(), point.y(), 0, 0),
diff --git a/chrome/browser/ui/views/bubble/bubble.cc b/chrome/browser/ui/views/bubble/bubble.cc
index 37940db..7745709 100644
--- a/chrome/browser/ui/views/bubble/bubble.cc
+++ b/chrome/browser/ui/views/bubble/bubble.cc
@@ -8,7 +8,6 @@
#include "chrome/browser/ui/views/bubble/border_contents.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/common/notification_service.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/gfx/color_utils.h"
diff --git a/chrome/browser/ui/views/constrained_window_views.cc b/chrome/browser/ui/views/constrained_window_views.cc
index 1bedf82..d48427c 100644
--- a/chrome/browser/ui/views/constrained_window_views.cc
+++ b/chrome/browser/ui/views/constrained_window_views.cc
@@ -19,7 +19,6 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/ui/views/dom_view_browsertest.cc b/chrome/browser/ui/views/dom_view_browsertest.cc
index cfa8e43..9781993 100644
--- a/chrome/browser/ui/views/dom_view_browsertest.cc
+++ b/chrome/browser/ui/views/dom_view_browsertest.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/ui/views/dom_view.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "views/widget/widget.h"
@@ -33,7 +34,7 @@ IN_PROC_BROWSER_TEST_F(DOMViewTest, TestShowAndHide) {
dom_view->Init(browser()->profile(), NULL);
ui_test_utils::WindowedNotificationObserver load_stop_observer(
content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
dom_view->LoadURL(GURL("http://www.google.com"));
load_stop_observer.Wait();
one->Show();
@@ -54,7 +55,7 @@ IN_PROC_BROWSER_TEST_F(DOMViewTest, TestRemoveAndDelete) {
dom_view->Init(browser()->profile(), NULL);
ui_test_utils::WindowedNotificationObserver load_stop_observer(
content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
dom_view->LoadURL(GURL("http://www.google.com"));
load_stop_observer.Wait();
one->Show();
@@ -79,7 +80,7 @@ IN_PROC_BROWSER_TEST_F(DOMViewTest, TestReparent) {
dom_view->Init(browser()->profile(), NULL);
ui_test_utils::WindowedNotificationObserver load_stop_observer(
content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
dom_view->LoadURL(GURL("http://www.google.com"));
load_stop_observer.Wait();
one->Show();
diff --git a/chrome/browser/ui/views/file_manager_dialog_browsertest.cc b/chrome/browser/ui/views/file_manager_dialog_browsertest.cc
index 1a6bed8..38146c1 100644
--- a/chrome/browser/ui/views/file_manager_dialog_browsertest.cc
+++ b/chrome/browser/ui/views/file_manager_dialog_browsertest.cc
@@ -22,6 +22,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/renderer_host/render_view_host.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "webkit/fileapi/file_system_context.h"
#include "webkit/fileapi/file_system_mount_point_provider.h"
@@ -143,7 +144,7 @@ IN_PROC_BROWSER_TEST_F(FileManagerDialogBrowserTest, SelectFileAndCancel) {
// that the window has closed.
ui_test_utils::WindowedNotificationObserver host_destroyed(
content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
RenderViewHost* host = dialog_->GetRenderViewHost();
string16 main_frame;
string16 script = ASCIIToUTF16(
@@ -213,7 +214,7 @@ IN_PROC_BROWSER_TEST_F(FileManagerDialogBrowserTest, SelectFileAndOpen) {
// that the window has closed.
ui_test_utils::WindowedNotificationObserver host_destroyed(
content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
RenderViewHost* host = dialog_->GetRenderViewHost();
string16 main_frame;
string16 script = ASCIIToUTF16(
@@ -279,7 +280,7 @@ IN_PROC_BROWSER_TEST_F(FileManagerDialogBrowserTest, SelectFileAndSave) {
// that the window has closed.
ui_test_utils::WindowedNotificationObserver host_destroyed(
content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
RenderViewHost* host = dialog_->GetRenderViewHost();
string16 main_frame;
string16 script = ASCIIToUTF16(
@@ -340,7 +341,7 @@ IN_PROC_BROWSER_TEST_F(FileManagerDialogBrowserTest,
// that the window has closed.
ui_test_utils::WindowedNotificationObserver host_destroyed(
content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
RenderViewHost* host = dialog_->GetRenderViewHost();
string16 main_frame;
string16 script = ASCIIToUTF16(
diff --git a/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc b/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
index 0408ed0..89c3749 100644
--- a/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
+++ b/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
@@ -16,6 +16,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "net/test/test_server.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/keycodes/keyboard_codes.h"
@@ -163,7 +164,8 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, FocusRestoreOnTabSwitch) {
// Open another tab (tab B).
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->AddSelectedTabWithURL(url, content::PAGE_TRANSITION_TYPED);
observer.Wait();
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 31d8ec6..a268212 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -81,7 +81,7 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/common/content_switches.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -1675,10 +1675,10 @@ bool BrowserView::CanClose() {
}
// Empty TabStripModel, it's now safe to allow the Window to be closed.
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_WINDOW_CLOSED,
content::Source<gfx::NativeWindow>(frame_->GetNativeWindow()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
return true;
}
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index febcc68..8086cee 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -21,7 +21,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
@@ -84,7 +84,7 @@ GlassBrowserFrameView::GlassBrowserFrameView(BrowserFrame* frame,
UpdateAvatarInfo();
if (!browser_view_->IsOffTheRecord()) {
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
}
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index dc623fd..d47a170 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -25,7 +25,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -206,7 +206,7 @@ OpaqueBrowserFrameView::OpaqueBrowserFrameView(BrowserFrame* frame,
UpdateAvatarInfo();
if (!browser_view_->IsOffTheRecord()) {
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
#if defined(USE_VIRTUAL_KEYBOARD)
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 82f1119..aefe220 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -43,7 +43,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
@@ -335,10 +335,10 @@ void LocationBarView::UpdatePageActions() {
size_t count_before = page_action_views_.size();
RefreshPageActionViews();
if (page_action_views_.size() != count_before) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
content::Source<LocationBar>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
Layout();
@@ -349,10 +349,10 @@ void LocationBarView::InvalidatePageActions() {
size_t count_before = page_action_views_.size();
DeletePageActionViews();
if (page_action_views_.size() != count_before) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
content::Source<LocationBar>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
}
@@ -995,7 +995,7 @@ void LocationBarView::RefreshPageActionViews() {
ExtensionAction* action = (*i)->image_view()->page_action();
if (old_visibility.find(action) == old_visibility.end() ||
old_visibility[action] != (*i)->IsVisible()) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
content::Source<ExtensionAction>(action),
content::Details<TabContents>(contents));
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index a7b9408..f958484 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -15,7 +15,6 @@
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
#include "net/base/escape.h"
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
index 33cb8a0..0561bfe 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
@@ -33,7 +33,6 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
#include "googleurl/src/url_util.h"
#include "grit/generated_resources.h"
#include "net/base/escape.h"
diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index 6bfd318..0455cbd 100644
--- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -23,7 +23,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "views/controls/menu/menu_item_view.h"
#include "views/controls/menu/menu_model_adapter.h"
#include "views/controls/menu/menu_runner.h"
@@ -140,7 +140,7 @@ BrowserTabStripController::BrowserTabStripController(Browser* browser,
notification_registrar_.Add(this,
chrome::NOTIFICATION_TAB_CLOSEABLE_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
BrowserTabStripController::~BrowserTabStripController() {
diff --git a/chrome/browser/ui/views/theme_install_bubble_view.cc b/chrome/browser/ui/views/theme_install_bubble_view.cc
index d4824d2..edef346 100644
--- a/chrome/browser/ui/views/theme_install_bubble_view.cc
+++ b/chrome/browser/ui/views/theme_install_bubble_view.cc
@@ -7,7 +7,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
@@ -49,27 +49,27 @@ ThemeInstallBubbleView::ThemeInstallBubbleView(TabContents* tab_contents)
registrar_.Add(
this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
// Close when we are installing an extension, not a theme.
registrar_.Add(
this,
chrome::NOTIFICATION_NO_THEME_DETECTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_INSTALLED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Don't let the bubble overlap the confirm dialog.
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_WILL_SHOW_CONFIRM_DIALOG,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
popup_ = new views::Widget;
views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index f51ba3f..106a768 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -23,7 +23,7 @@
#include "chrome/common/pref_names.h"
#include "content/browser/accessibility/browser_accessibility_state.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -115,14 +115,14 @@ ToolbarView::ToolbarView(Browser* browser)
}
registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
#if defined(OS_WIN) && !defined(USE_AURA)
registrar_.Add(this, chrome::NOTIFICATION_CRITICAL_UPGRADE_INSTALLED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
#endif
registrar_.Add(this,
chrome::NOTIFICATION_MODULE_INCOMPATIBILITY_BADGE_CHANGE,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED,
content::Source<Profile>(browser_->profile()));
}
diff --git a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
index de7d612..e69f2b8 100644
--- a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
+++ b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
@@ -21,7 +21,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/site_instance.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/ime/text_input_type.h"
@@ -210,16 +210,16 @@ KeyboardWidget::KeyboardWidget()
views::TextInputTypeTracker::GetInstance()->AddTextInputTypeObserver(this);
registrar_.Add(this,
chrome::NOTIFICATION_FOCUSED_EDITABLE_NODE_TOUCHED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this,
chrome::NOTIFICATION_HIDE_KEYBOARD_INVOKED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this,
chrome::NOTIFICATION_SET_KEYBOARD_HEIGHT_INVOKED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this,
content::NOTIFICATION_APP_TERMINATING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
#if defined(OS_CHROMEOS)
chromeos::input_method::InputMethodManager* manager =
@@ -262,7 +262,7 @@ void KeyboardWidget::ShowKeyboardForWidget(views::Widget* widget) {
Show();
bool visible = true;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_KEYBOARD_VISIBILITY_CHANGED,
content::Source<KeyboardWidget>(this),
content::Details<bool>(&visible));
@@ -276,7 +276,7 @@ void KeyboardWidget::Hide() {
animation_->Hide();
bool visible = false;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_KEYBOARD_VISIBILITY_CHANGED,
content::Source<KeyboardWidget>(this),
content::Details<bool>(&visible));
@@ -328,7 +328,7 @@ void KeyboardWidget::AnimationEnded(const ui::Animation* animation) {
else
keyboard_rect = GetWindowScreenBounds();
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_KEYBOARD_VISIBLE_BOUNDS_CHANGED,
content::Source<KeyboardWidget>(this),
content::Details<gfx::Rect>(&keyboard_rect));
diff --git a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc
index e51e3d8..32d1e66 100644
--- a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc
+++ b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc
@@ -25,7 +25,7 @@ class VirtualKeyboardManagerTest : public InProcessBrowserTest,
void SetupNotificationListener() {
registrar_.Add(this,
chrome::NOTIFICATION_KEYBOARD_VISIBILITY_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
private:
@@ -82,7 +82,7 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardManagerTest, TestVisibility) {
// Open a new tab that does not give focus to a textfield onload.
ui_test_utils::WindowedNotificationObserver load_stop_observer(
content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser()->AddSelectedTabWithURL(base_url.Resolve("blank.html"),
content::PAGE_TRANSITION_LINK);
load_stop_observer.Wait();
diff --git a/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc b/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc
index 59faec3..c0bfba6 100644
--- a/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc
+++ b/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc
@@ -7,7 +7,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
@@ -19,7 +19,7 @@ class NavigationNotificationObserver : public content::NotificationObserver {
: got_navigation_(false),
http_status_code_(0) {
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
virtual void Observe(int type,
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
index 8948d5a..64c98fa 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
@@ -30,7 +30,7 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "net/base/dnsrr_resolver.h"
#include "ui/base/l10n/l10n_util.h"
@@ -136,7 +136,7 @@ NetworkStateInformer::NetworkStateInformer(WebUI* web_ui) : web_ui_(web_ui) {
cros->AddNetworkManagerObserver(this);
registrar_.Add(this,
chrome::NOTIFICATION_LOGIN_PROXY_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
NetworkStateInformer::~NetworkStateInformer() {
@@ -623,10 +623,10 @@ void SigninScreenHandler::SendUserList(bool animated) {
}
void SigninScreenHandler::HandleLoginWebuiReady(const base::ListValue* args) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_WEBUI_READY,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
+ content::NotificationService::AllSources(),
+ content::NotificationService::NoDetails());
}
void SigninScreenHandler::HandleLoginRequestNetworkState(
diff --git a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
index 4509a2f..ab9cc7c 100644
--- a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
@@ -22,7 +22,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -461,16 +461,16 @@ void SimUnlockHandler::EnterCode(const std::string& code,
}
void SimUnlockHandler::NotifyOnEnterPinEnded(bool cancelled) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_ENTER_PIN_ENDED,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
content::Details<bool>(&cancelled));
}
void SimUnlockHandler::NotifyOnRequirePinChangeEnded(bool new_value) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_REQUIRE_PIN_SETTING_CHANGE_ENDED,
- NotificationService::AllSources(),
+ content::NotificationService::AllSources(),
content::Details<bool>(&new_value));
}
diff --git a/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc b/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
index a278ef0..36636fb 100644
--- a/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
+++ b/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
@@ -21,7 +21,7 @@
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/webui/conflicts_ui.cc b/chrome/browser/ui/webui/conflicts_ui.cc
index 4bb477c..979ae3b 100644
--- a/chrome/browser/ui/webui/conflicts_ui.cc
+++ b/chrome/browser/ui/webui/conflicts_ui.cc
@@ -23,7 +23,7 @@
#include "content/browser/user_metrics.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -102,7 +102,7 @@ void ConflictsDOMHandler::RegisterMessages() {
void ConflictsDOMHandler::HandleRequestModuleList(const ListValue* args) {
// This request is handled asynchronously. See Observe for when we reply back.
registrar_.Add(this, chrome::NOTIFICATION_MODULE_LIST_ENUMERATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
EnumerateModulesModel::GetInstance()->ScanNow();
}
diff --git a/chrome/browser/ui/webui/html_dialog_ui.cc b/chrome/browser/ui/webui/html_dialog_ui.cc
index 66c5046..77da852 100644
--- a/chrome/browser/ui/webui/html_dialog_ui.cc
+++ b/chrome/browser/ui/webui/html_dialog_ui.cc
@@ -11,7 +11,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/common/bindings_policy.h"
static base::LazyInstance<PropertyAccessor<HtmlDialogUIDelegate*> >
@@ -68,10 +68,10 @@ void HtmlDialogUI::RenderViewCreated(RenderViewHost* render_view_host) {
AddMessageHandler(*it);
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_HTML_DIALOG_SHOWN,
content::Source<HtmlDialogUI>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void HtmlDialogUI::OnDialogClosed(const ListValue* args) {
diff --git a/chrome/browser/ui/webui/media/media_internals_proxy.cc b/chrome/browser/ui/webui/media/media_internals_proxy.cc
index c532e4e..c04bc0c 100644
--- a/chrome/browser/ui/webui/media/media_internals_proxy.cc
+++ b/chrome/browser/ui/webui/media/media_internals_proxy.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/io_thread.h"
#include "chrome/browser/media/media_internals.h"
#include "chrome/browser/ui/webui/media/media_internals_handler.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/public/browser/notification_types.h"
@@ -27,7 +27,7 @@ MediaInternalsProxy::MediaInternalsProxy()
: ThreadSafeObserverImpl(net::NetLog::LOG_ALL_BUT_BYTES) {
io_thread_ = g_browser_process->io_thread();
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
}
void MediaInternalsProxy::Observe(int type,
diff --git a/chrome/browser/ui/webui/metrics_handler.cc b/chrome/browser/ui/webui/metrics_handler.cc
index e74edd5..4b9301c 100644
--- a/chrome/browser/ui/webui/metrics_handler.cc
+++ b/chrome/browser/ui/webui/metrics_handler.cc
@@ -15,7 +15,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
using base::ListValue;
@@ -98,7 +98,7 @@ void MetricsHandler::HandleLogEventTime(const ListValue* args) {
} else {
NOTREACHED();
}
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_METRIC_EVENT_DURATION,
content::Source<TabContents>(tab),
content::Details<MetricEventDurationDetails>(&details));
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index 6f87803..aec33db 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -42,7 +42,7 @@
#include "chrome/common/web_apps.h"
#include "content/browser/disposition_utils.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
@@ -542,7 +542,7 @@ void AppLauncherHandler::HandleGetApps(const ListValue* args) {
pref_change_registrar_.Add(prefs::kNTPAppPageNames, this);
registrar_.Add(this, chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
diff --git a/chrome/browser/ui/webui/ntp/bookmarks_handler.cc b/chrome/browser/ui/webui/ntp/bookmarks_handler.cc
index ca7a866..aa928eda 100644
--- a/chrome/browser/ui/webui/ntp/bookmarks_handler.cc
+++ b/chrome/browser/ui/webui/ntp/bookmarks_handler.cc
@@ -17,7 +17,6 @@
#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
// TODO(csilv):
// Much of this implementation is based on the classes defined in
diff --git a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
index 548234ac..f585889 100644
--- a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
+++ b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
@@ -19,8 +19,7 @@
#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/url_constants.h"
-#include "content/common/notification_service.h"
-#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
namespace browser_sync {
diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
index 300ff34..59f451b 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/web_resource/notification_promo.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -157,8 +157,9 @@ void NewTabPageHandler::DismissIntroMessage(PrefService* prefs) {
}
void NewTabPageHandler::NotifyPromoResourceChanged() {
- NotificationService* service = NotificationService::current();
+ content::NotificationService* service =
+ content::NotificationService::current();
service->Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED,
content::Source<NewTabPageHandler>(this),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
index 5664e2f..4d4a35c 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -46,7 +46,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -138,7 +138,7 @@ void NewTabUI::PaintTimeout() {
// Painting has quieted down. Log this as the full time to run.
base::TimeDelta load_time = last_paint_ - start_;
int load_time_ms = static_cast<int>(load_time.InMilliseconds());
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_INITIAL_NEW_TAB_UI_LOAD,
content::Source<Profile>(GetProfile()),
content::Details<int>(&load_time_ms));
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index 955d50b..21a7f27 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -38,7 +38,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -172,7 +172,7 @@ NTPResourceCache::NTPResourceCache(Profile* profile) : profile_(profile) {
content::Source<ThemeService>(
ThemeServiceFactory::GetForProfile(profile)));
registrar_.Add(this, chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Watch for pref changes that cause us to need to invalidate the HTML cache.
pref_change_registrar_.Init(profile_->GetPrefs());
diff --git a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
index 8a926d0..92d5827 100644
--- a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
@@ -22,7 +22,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/url_constants.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/common/url_constants.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -62,7 +62,7 @@ ChangePictureOptionsHandler::ChangePictureOptionsHandler()
profile_image_data_url_(chrome::kAboutBlankURL),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
ChangePictureOptionsHandler::~ChangePictureOptionsHandler() {
diff --git a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
index 1f5c300..a2a274b 100644
--- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
@@ -43,7 +43,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/time_format.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -59,9 +59,9 @@ InternetOptionsHandler::InternetOptionsHandler()
: chromeos::CrosOptionsPageUIHandler(NULL),
proxy_settings_(NULL) {
registrar_.Add(this, chrome::NOTIFICATION_REQUIRE_PIN_SETTING_CHANGE_ENDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_ENTER_PIN_ENDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
cros_ = chromeos::CrosLibrary::Get()->GetNetworkLibrary();
if (cros_) {
cros_->AddNetworkManagerObserver(this);
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index a4280c5..34299a3 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -28,7 +28,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/public/common/content_switches.h"
@@ -277,19 +277,19 @@ void ContentSettingsHandler::GetLocalizedValues(
void ContentSettingsHandler::Initialize() {
notification_registrar_.Add(
this, chrome::NOTIFICATION_PROFILE_CREATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
notification_registrar_.Add(
this, chrome::NOTIFICATION_PROFILE_DESTROYED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
UpdateHandlersEnabledRadios();
UpdateAllExceptionsViewsFromModel();
notification_registrar_.Add(
this, chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
notification_registrar_.Add(
this, chrome::NOTIFICATION_DESKTOP_NOTIFICATION_SETTINGS_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
Profile* profile = Profile::FromWebUI(web_ui_);
notification_registrar_.Add(
this, chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED,
diff --git a/chrome/browser/ui/webui/options/extension_settings_handler.cc b/chrome/browser/ui/webui/options/extension_settings_handler.cc
index 5ee7afa..b26030a 100644
--- a/chrome/browser/ui/webui/options/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/extension_settings_handler.cc
@@ -32,7 +32,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
@@ -216,19 +216,19 @@ void ExtensionSettingsHandler::MaybeRegisterForNotifications() {
content::Source<Profile>(profile));
registrar_.Add(this,
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this,
content::NOTIFICATION_RENDER_VIEW_HOST_CREATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this,
content::NOTIFICATION_RENDER_VIEW_HOST_DELETED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this,
chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this,
chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED,
diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.cc b/chrome/browser/ui/webui/options/manage_profile_handler.cc
index b9fb4d2..971b184 100644
--- a/chrome/browser/ui/webui/options/manage_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc
@@ -15,7 +15,7 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
ManageProfileHandler::ManageProfileHandler() {
@@ -44,7 +44,7 @@ void ManageProfileHandler::GetLocalizedValues(
void ManageProfileHandler::Initialize() {
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
SendProfileNames();
}
diff --git a/chrome/browser/ui/webui/options/personal_options_handler.cc b/chrome/browser/ui/webui/options/personal_options_handler.cc
index 434766c..80bdd68 100644
--- a/chrome/browser/ui/webui/options/personal_options_handler.cc
+++ b/chrome/browser/ui/webui/options/personal_options_handler.cc
@@ -33,7 +33,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -56,7 +56,7 @@ PersonalOptionsHandler::PersonalOptionsHandler() {
#if defined(OS_CHROMEOS)
registrar_.Add(this,
chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
#endif
}
@@ -349,7 +349,7 @@ void PersonalOptionsHandler::Initialize() {
content::Source<ThemeService>(
ThemeServiceFactory::GetForProfile(profile)));
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
ObserveThemeChanged();
ProfileSyncService* sync_service = profile->GetProfileSyncService();
diff --git a/chrome/browser/ui/webui/plugins_ui.cc b/chrome/browser/ui/webui/plugins_ui.cc
index 07d609e..55d49384 100644
--- a/chrome/browser/ui/webui/plugins_ui.cc
+++ b/chrome/browser/ui/webui/plugins_ui.cc
@@ -31,7 +31,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/plugin_service.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_source.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/ui/webui/sync_promo_handler.cc b/chrome/browser/ui/webui/sync_promo_handler.cc
index dc57b42..8129813 100644
--- a/chrome/browser/ui/webui/sync_promo_handler.cc
+++ b/chrome/browser/ui/webui/sync_promo_handler.cc
@@ -20,7 +20,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
SyncPromoHandler::SyncPromoHandler(ProfileManager* profile_manager)
@@ -53,7 +53,7 @@ WebUIMessageHandler* SyncPromoHandler::Attach(WebUI* web_ui) {
&web_ui->tab_contents()->controller()));
// Listen to see if the window we're in gets closed.
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSING,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
return SyncSetupHandler::Attach(web_ui);
}
diff --git a/chrome/browser/ui/webui/task_manager_handler.cc b/chrome/browser/ui/webui/task_manager_handler.cc
index acd8f52..1ac7463 100644
--- a/chrome/browser/ui/webui/task_manager_handler.cc
+++ b/chrome/browser/ui/webui/task_manager_handler.cc
@@ -16,7 +16,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "webkit/glue/webpreferences.h"
@@ -354,10 +354,10 @@ void TaskManagerHandler::EnableTaskManager(const ListValue* indexes) {
model_->AddObserver(this);
model_->StartUpdating();
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TASK_MANAGER_WINDOW_READY,
content::Source<TaskManagerModel>(model_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void TaskManagerHandler::OpenAboutMemory(const ListValue* indexes) {