summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/gtk
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-10 15:52:27 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-10 15:52:27 +0000
commit43211582b1fa8c69136385250e7b0446cf364b5c (patch)
tree655ab01543012b6fd5699dee8fab92876959b7d9 /chrome/browser/ui/gtk
parentd43970a7ceee5fc5433787b0f28b64234a4039f2 (diff)
downloadchromium_src-43211582b1fa8c69136385250e7b0446cf364b5c.zip
chromium_src-43211582b1fa8c69136385250e7b0446cf364b5c.tar.gz
chromium_src-43211582b1fa8c69136385250e7b0446cf364b5c.tar.bz2
Moving notification types which are chrome specific to a new header file chrome_notification_types.h.
This file lives in chrome\common. The chrome specific notifications start from NOTIFICATION_CONTENT_END which defines the end of the enum used by content to define notification types. The notificaton_type.h file in content\common has been renamed to content_notification_types.h BUG=76698 Review URL: http://codereview.chromium.org/7327007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91972 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/gtk')
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc9
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc7
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc9
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc14
-rw-r--r--chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/browser_titlebar.cc11
-rw-r--r--chrome/browser/ui/gtk/browser_titlebar.h2
-rw-r--r--chrome/browser/ui/gtk/browser_toolbar_gtk.cc18
-rw-r--r--chrome/browser/ui/gtk/browser_toolbar_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.cc9
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/bubble/bubble_gtk.cc7
-rw-r--r--chrome/browser/ui/gtk/bubble/bubble_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/collected_cookies_gtk.cc7
-rw-r--r--chrome/browser/ui/gtk/collected_cookies_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/content_setting_bubble_gtk.cc8
-rw-r--r--chrome/browser/ui/gtk/content_setting_bubble_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/custom_button.cc15
-rw-r--r--chrome/browser/ui/gtk/custom_button.h4
-rw-r--r--chrome/browser/ui/gtk/download/download_item_gtk.cc7
-rw-r--r--chrome/browser/ui/gtk/download/download_item_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/download/download_shelf_gtk.cc7
-rw-r--r--chrome/browser/ui/gtk/download/download_shelf_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/download/download_started_animation_gtk.cc12
-rw-r--r--chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc12
-rw-r--r--chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc17
-rw-r--r--chrome/browser/ui/gtk/extensions/extension_popup_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/find_bar_gtk.cc7
-rw-r--r--chrome/browser/ui/gtk/find_bar_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/global_bookmark_menu.cc7
-rw-r--r--chrome/browser/ui/gtk/global_bookmark_menu.h2
-rw-r--r--chrome/browser/ui/gtk/global_history_menu.cc7
-rw-r--r--chrome/browser/ui/gtk/global_history_menu.h2
-rw-r--r--chrome/browser/ui/gtk/global_menu_bar.cc10
-rw-r--r--chrome/browser/ui/gtk/global_menu_bar.h2
-rw-r--r--chrome/browser/ui/gtk/gtk_theme_service.cc8
-rw-r--r--chrome/browser/ui/gtk/gtk_theme_service.h2
-rw-r--r--chrome/browser/ui/gtk/infobars/infobar_gtk.cc5
-rw-r--r--chrome/browser/ui/gtk/infobars/infobar_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/location_bar_view_gtk.cc17
-rw-r--r--chrome/browser/ui/gtk/location_bar_view_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc14
-rw-r--r--chrome/browser/ui/gtk/notifications/balloon_view_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc7
-rw-r--r--chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc9
-rw-r--r--chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/overflow_button.cc6
-rw-r--r--chrome/browser/ui/gtk/overflow_button.h2
-rw-r--r--chrome/browser/ui/gtk/reload_button_gtk.cc7
-rw-r--r--chrome/browser/ui/gtk/reload_button_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/repost_form_warning_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/status_bubble_gtk.cc7
-rw-r--r--chrome/browser/ui/gtk/status_bubble_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/tab_contents_container_gtk.cc12
-rw-r--r--chrome/browser/ui/gtk/tab_contents_container_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc8
-rw-r--r--chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc13
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h4
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc8
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_strip_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc14
-rw-r--r--chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h2
68 files changed, 215 insertions, 192 deletions
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
index a0902d9..b4ba446 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
@@ -33,6 +33,7 @@
#include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h"
#include "chrome/browser/ui/gtk/tabstrip_origin_provider.h"
#include "chrome/browser/ui/gtk/view_id_util.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
@@ -156,7 +157,7 @@ BookmarkBarGtk::BookmarkBarGtk(BrowserWindowGtk* window,
SetBookmarkBarState(BookmarkBar::SHOW,
BookmarkBar::DONT_ANIMATE_STATE_CHANGE);
- registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(theme_service_));
edit_bookmarks_enabled_.Init(prefs::kEditBookmarksEnabled,
@@ -929,10 +930,10 @@ void BookmarkBarGtk::BookmarkNodeChildrenReordered(BookmarkModel* model,
CreateAllBookmarkButtons();
}
-void BookmarkBarGtk::Observe(NotificationType type,
+void BookmarkBarGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type == NotificationType::BROWSER_THEME_CHANGED) {
+ if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) {
if (model_ && model_->IsLoaded()) {
// Regenerate the bookmark bar with all new objects with their theme
// properties set correctly for the new theme.
@@ -954,7 +955,7 @@ void BookmarkBarGtk::Observe(NotificationType type,
}
SetOverflowButtonAppearance();
- } else if (type == NotificationType::PREF_CHANGED) {
+ } else if (type == chrome::NOTIFICATION_PREF_CHANGED) {
const std::string& pref_name = *Details<std::string>(details).ptr();
if (pref_name == prefs::kEditBookmarksEnabled)
OnEditBookmarksEnabledChanged();
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h
index 8ae89bd..7d0562b 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h
@@ -233,7 +233,7 @@ class BookmarkBarGtk : public ui::AnimationDelegate,
const BookmarkNode* node) OVERRIDE;
// Overridden from NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
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 b8dc6e9..fc070ec 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.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 "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -47,15 +48,15 @@ BookmarkBarInstructionsGtk::BookmarkBarInstructionsGtk(Delegate* delegate,
G_CALLBACK(gtk_util::InitLabelSizeRequestAndEllipsizeMode),
NULL);
- registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
}
-void BookmarkBarInstructionsGtk::Observe(NotificationType type,
+void BookmarkBarInstructionsGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type == NotificationType::BROWSER_THEME_CHANGED)
+ if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED)
UpdateColors();
}
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h
index 509e8fd..3e075a8 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h
@@ -34,7 +34,7 @@ class BookmarkBarInstructionsGtk : public NotificationObserver {
private:
// Overridden from NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
index a41f5ae..856a550 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/profiles/profile.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/browser/user_metrics.h"
#include "content/common/notification_service.h"
#include "grit/generated_resources.h"
@@ -52,15 +53,15 @@ void BookmarkBubbleGtk::BubbleClosing(BubbleGtk* bubble,
}
NotificationService::current()->Notify(
- NotificationType::BOOKMARK_BUBBLE_HIDDEN,
+ chrome::BOOKMARK_BUBBLE_HIDDEN,
Source<Profile>(profile_->GetOriginalProfile()),
NotificationService::NoDetails());
}
-void BookmarkBubbleGtk::Observe(NotificationType type,
+void BookmarkBubbleGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type == NotificationType::BROWSER_THEME_CHANGED);
+ DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
if (theme_service_->UsingNativeTheme()) {
for (std::vector<GtkWidget*>::iterator it = labels_.begin();
@@ -181,7 +182,7 @@ BookmarkBubbleGtk::BookmarkBubbleGtk(GtkWidget* anchor,
g_signal_connect(remove_button_, "clicked",
G_CALLBACK(&OnRemoveClickedThunk), this);
- registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
}
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h
index a563828..13971e5 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h
@@ -46,7 +46,7 @@ class BookmarkBubbleGtk : public BubbleDelegateGtk,
virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE;
// NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) OVERRIDE;
diff --git a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
index e1b0577..c5ad9bd 100644
--- a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
@@ -26,6 +26,7 @@
#include "chrome/browser/ui/gtk/menu_gtk.h"
#include "chrome/browser/ui/gtk/view_id_util.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_action.h"
#include "chrome/common/extensions/extension_resource.h"
@@ -33,7 +34,6 @@
#include "content/common/notification_details.h"
#include "content/common/notification_service.h"
#include "content/common/notification_source.h"
-#include "content/common/notification_type.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
#include "grit/ui_resources.h"
@@ -129,7 +129,7 @@ class BrowserActionButton : public NotificationObserver,
signals_.ConnectAfter(widget(), "expose-event",
G_CALLBACK(OnExposeEvent), this);
- registrar_.Add(this, NotificationType::EXTENSION_BROWSER_ACTION_UPDATED,
+ registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
Source<ExtensionAction>(extension->browser_action()));
}
@@ -150,10 +150,10 @@ class BrowserActionButton : public NotificationObserver,
const Extension* extension() { return extension_; }
// NotificationObserver implementation.
- void Observe(NotificationType type,
+ void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type == NotificationType::EXTENSION_BROWSER_ACTION_UPDATED)
+ if (type == chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED)
UpdateState();
else
NOTREACHED();
@@ -449,7 +449,7 @@ BrowserActionsToolbarGtk::BrowserActionsToolbarGtk(Browser* browser)
ViewIDUtil::SetID(button_hbox_.get(), VIEW_ID_BROWSER_ACTION_TOOLBAR);
registrar_.Add(this,
- NotificationType::BROWSER_THEME_CHANGED,
+ chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
NotificationService::AllSources());
theme_service_->InitThemesFor(this);
}
@@ -476,10 +476,10 @@ void BrowserActionsToolbarGtk::Update() {
}
}
-void BrowserActionsToolbarGtk::Observe(NotificationType type,
+void BrowserActionsToolbarGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(NotificationType::BROWSER_THEME_CHANGED == type);
+ DCHECK(chrome::NOTIFICATION_BROWSER_THEME_CHANGED == type);
gtk_widget_set_visible(separator_, theme_service_->UsingNativeTheme());
}
diff --git a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h
index f49e18d..2b720cb 100644
--- a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h
+++ b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h
@@ -61,7 +61,7 @@ class BrowserActionsToolbarGtk : public ExtensionToolbarModel::Observer,
void Update();
// NotificationObserver implementation.
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/browser_titlebar.cc b/chrome/browser/ui/gtk/browser_titlebar.cc
index b3c1d43..7c87a8d 100644
--- a/chrome/browser/ui/gtk/browser_titlebar.cc
+++ b/chrome/browser/ui/gtk/browser_titlebar.cc
@@ -35,6 +35,7 @@
#include "chrome/browser/ui/gtk/unity_service.h"
#include "chrome/browser/ui/toolbar/encoding_menu_controller.h"
#include "chrome/browser/ui/toolbar/wrench_menu_model.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
@@ -403,7 +404,7 @@ void BrowserTitlebar::Init() {
// color.
theme_service_ = GtkThemeService::GetFrom(
browser_window_->browser()->profile());
- registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
UpdateTitleAndIcon();
@@ -942,15 +943,15 @@ bool BrowserTitlebar::GetAcceleratorForCommandId(
return accelerator_gtk;
}
-void BrowserTitlebar::Observe(NotificationType type,
+void BrowserTitlebar::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- switch (type.value) {
- case NotificationType::BROWSER_THEME_CHANGED:
+ switch (type) {
+ case chrome::NOTIFICATION_BROWSER_THEME_CHANGED:
UpdateTextColor();
break;
- case NotificationType::PREF_CHANGED: {
+ case chrome::NOTIFICATION_PREF_CHANGED: {
std::string* name = Details<std::string>(details).ptr();
if (prefs::kGoogleServicesUsername == *name)
profile_button_->UpdateText();
diff --git a/chrome/browser/ui/gtk/browser_titlebar.h b/chrome/browser/ui/gtk/browser_titlebar.h
index 7485d0c..7030e21 100644
--- a/chrome/browser/ui/gtk/browser_titlebar.h
+++ b/chrome/browser/ui/gtk/browser_titlebar.h
@@ -161,7 +161,7 @@ class BrowserTitlebar : public NotificationObserver,
ui::Accelerator* accelerator);
// Overridden from NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
index 71fadf1..d1ac0cc 100644
--- a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
@@ -36,13 +36,13 @@
#include "chrome/browser/ui/gtk/view_id_util.h"
#include "chrome/browser/ui/toolbar/encoding_menu_controller.h"
#include "chrome/browser/upgrade_detector.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
#include "content/common/notification_details.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_type.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -97,10 +97,10 @@ BrowserToolbarGtk::BrowserToolbarGtk(Browser* browser, BrowserWindowGtk* window)
browser_->command_updater()->AddCommandObserver(IDC_BOOKMARK_PAGE, this);
registrar_.Add(this,
- NotificationType::BROWSER_THEME_CHANGED,
+ chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
NotificationService::AllSources());
registrar_.Add(this,
- NotificationType::UPGRADE_RECOMMENDED,
+ chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
NotificationService::AllSources());
}
@@ -222,7 +222,7 @@ void BrowserToolbarGtk::Init(Profile* profile,
gtk_box_pack_start(GTK_BOX(toolbar_), wrench_box, FALSE, FALSE, 4);
wrench_menu_.reset(new MenuGtk(this, &wrench_menu_model_));
- registrar_.Add(this, NotificationType::ZOOM_LEVEL_CHANGED,
+ registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
Source<HostZoomMap>(browser_->profile()->GetHostZoomMap()));
if (ShouldOnlyShowLocation()) {
@@ -346,12 +346,12 @@ bool BrowserToolbarGtk::GetAcceleratorForCommandId(
// NotificationObserver --------------------------------------------------------
-void BrowserToolbarGtk::Observe(NotificationType type,
+void BrowserToolbarGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type == NotificationType::PREF_CHANGED) {
+ if (type == chrome::NOTIFICATION_PREF_CHANGED) {
NotifyPrefChanged(Details<std::string>(details).ptr());
- } else if (type == NotificationType::BROWSER_THEME_CHANGED) {
+ } else if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) {
// Update the spacing around the menu buttons
bool use_gtk = theme_service_->UsingNativeTheme();
int border = use_gtk ? 0 : 2;
@@ -384,10 +384,10 @@ void BrowserToolbarGtk::Observe(NotificationType type,
}
UpdateRoundedness();
- } else if (type == NotificationType::UPGRADE_RECOMMENDED) {
+ } else if (type == chrome::NOTIFICATION_UPGRADE_RECOMMENDED) {
// Redraw the wrench menu to update the badge.
gtk_widget_queue_draw(wrench_menu_button_->widget());
- } else if (type == NotificationType::ZOOM_LEVEL_CHANGED) {
+ } else if (type == content::NOTIFICATION_ZOOM_LEVEL_CHANGED) {
// If our zoom level changed, we need to tell the menu to update its state,
// since the menu could still be open.
wrench_menu_->UpdateMenu();
diff --git a/chrome/browser/ui/gtk/browser_toolbar_gtk.h b/chrome/browser/ui/gtk/browser_toolbar_gtk.h
index 33e7c84..090ef6a 100644
--- a/chrome/browser/ui/gtk/browser_toolbar_gtk.h
+++ b/chrome/browser/ui/gtk/browser_toolbar_gtk.h
@@ -97,7 +97,7 @@ class BrowserToolbarGtk : public CommandUpdater::CommandObserver,
ui::Accelerator* accelerator);
// NotificationObserver implementation.
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc
index a3d5fec..2d6c9f4 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc
@@ -75,6 +75,7 @@
#include "chrome/browser/ui/webui/bug_report_ui.h"
#include "chrome/browser/ui/window_sizer.h"
#include "chrome/browser/web_applications/web_app.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/browser/debugger/devtools_window.h"
@@ -1161,11 +1162,11 @@ void BrowserWindowGtk::ConfirmBrowserCloseWithPendingDownloads() {
new DownloadInProgressDialogGtk(browser());
}
-void BrowserWindowGtk::Observe(NotificationType type,
+void BrowserWindowGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- switch (type.value) {
- case NotificationType::PREF_CHANGED: {
+ switch (type) {
+ case chrome::NOTIFICATION_PREF_CHANGED: {
std::string* pref_name = Details<std::string>(details).ptr();
if (*pref_name == prefs::kUseCustomChromeFrame) {
UpdateCustomFrame();
@@ -1508,7 +1509,7 @@ bool BrowserWindowGtk::CanClose() const {
// Empty TabStripModel, it's now safe to allow the Window to be closed.
NotificationService::current()->Notify(
- NotificationType::WINDOW_CLOSED,
+ chrome::NOTIFICATION_WINDOW_CLOSED,
Source<GtkWindow>(window_),
NotificationService::NoDetails());
return true;
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.h b/chrome/browser/ui/gtk/browser_window_gtk.h
index a686695..c04f9d4 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.h
+++ b/chrome/browser/ui/gtk/browser_window_gtk.h
@@ -137,7 +137,7 @@ class BrowserWindowGtk : public BrowserWindow,
const gfx::Rect& bounds);
// Overridden from NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/bubble/bubble_gtk.cc b/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
index e962568..cc096a7 100644
--- a/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/ui/gtk/bubble/bubble_accelerators_gtk.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 "ui/base/gtk/gtk_windowing.h"
#include "ui/gfx/gtk_util.h"
@@ -179,7 +180,7 @@ void BubbleGtk::Init(GtkWidget* anchor_widget,
GrabPointerAndKeyboard();
}
- registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
}
@@ -343,10 +344,10 @@ void BubbleGtk::StackWindow() {
ui::StackPopupWindow(window_, GTK_WIDGET(toplevel_window_));
}
-void BubbleGtk::Observe(NotificationType type,
+void BubbleGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK_EQ(type.value, NotificationType::BROWSER_THEME_CHANGED);
+ DCHECK_EQ(type, chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
if (theme_service_->UsingNativeTheme() && match_system_theme_) {
gtk_widget_modify_bg(window_, GTK_STATE_NORMAL, NULL);
} else {
diff --git a/chrome/browser/ui/gtk/bubble/bubble_gtk.h b/chrome/browser/ui/gtk/bubble/bubble_gtk.h
index dc7c5a5..b11b45f 100644
--- a/chrome/browser/ui/gtk/bubble/bubble_gtk.h
+++ b/chrome/browser/ui/gtk/bubble/bubble_gtk.h
@@ -77,7 +77,7 @@ class BubbleGtk : public NotificationObserver {
void Close();
// NotificationObserver implementation.
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) OVERRIDE;
diff --git a/chrome/browser/ui/gtk/collected_cookies_gtk.cc b/chrome/browser/ui/gtk/collected_cookies_gtk.cc
index 38d993c..15a4e86 100644
--- a/chrome/browser/ui/gtk/collected_cookies_gtk.cc
+++ b/chrome/browser/ui/gtk/collected_cookies_gtk.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/ui/gtk/gtk_chrome_cookie_view.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/common/chrome_notification_types.h"
#include "content/common/notification_source.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -82,7 +83,7 @@ CollectedCookiesGtk::CollectedCookiesGtk(GtkWindow* parent,
TabSpecificContentSettings* content_settings =
TabContentsWrapper::GetCurrentWrapperForContents(tab_contents)->
content_settings();
- registrar_.Add(this, NotificationType::COLLECTED_COOKIES_SHOWN,
+ registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN,
Source<TabSpecificContentSettings>(content_settings));
Init();
@@ -420,10 +421,10 @@ void CollectedCookiesGtk::EnableControls() {
enable_for_blocked_cookies);
}
-void CollectedCookiesGtk::Observe(NotificationType type,
+void CollectedCookiesGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type == NotificationType::COLLECTED_COOKIES_SHOWN);
+ DCHECK(type == chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN);
window_->CloseConstrainedWindow();
}
diff --git a/chrome/browser/ui/gtk/collected_cookies_gtk.h b/chrome/browser/ui/gtk/collected_cookies_gtk.h
index 974e668..612c629 100644
--- a/chrome/browser/ui/gtk/collected_cookies_gtk.h
+++ b/chrome/browser/ui/gtk/collected_cookies_gtk.h
@@ -55,7 +55,7 @@ class CollectedCookiesGtk : public ConstrainedDialogDelegate,
ContentSetting setting);
// Notification Observer implementation.
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc b/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc
index 0b94783..1018b41 100644
--- a/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc
@@ -18,8 +18,8 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/common/content_settings.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/common/content_notification_types.h"
#include "content/common/notification_source.h"
-#include "content/common/notification_type.h"
#include "grit/generated_resources.h"
#include "grit/ui_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -58,7 +58,7 @@ ContentSettingBubbleGtk::ContentSettingBubbleGtk(
delegate_(delegate),
content_setting_bubble_model_(content_setting_bubble_model),
bubble_(NULL) {
- registrar_.Add(this, NotificationType::TAB_CONTENTS_DESTROYED,
+ registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
Source<TabContents>(tab_contents));
BuildBubble();
}
@@ -77,10 +77,10 @@ void ContentSettingBubbleGtk::BubbleClosing(BubbleGtk* bubble,
delete this;
}
-void ContentSettingBubbleGtk::Observe(NotificationType type,
+void ContentSettingBubbleGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type == NotificationType::TAB_CONTENTS_DESTROYED);
+ DCHECK(type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED);
DCHECK(source == Source<TabContents>(tab_contents_));
tab_contents_ = NULL;
}
diff --git a/chrome/browser/ui/gtk/content_setting_bubble_gtk.h b/chrome/browser/ui/gtk/content_setting_bubble_gtk.h
index e8b8f19..edad286 100644
--- a/chrome/browser/ui/gtk/content_setting_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/content_setting_bubble_gtk.h
@@ -44,7 +44,7 @@ class ContentSettingBubbleGtk : public BubbleDelegateGtk,
virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE;
// NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/custom_button.cc b/chrome/browser/ui/gtk/custom_button.cc
index 9cd2d98..a92abc5 100644
--- a/chrome/browser/ui/gtk/custom_button.cc
+++ b/chrome/browser/ui/gtk/custom_button.cc
@@ -9,6 +9,7 @@
#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 "grit/theme_resources_standard.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -39,7 +40,7 @@ CustomDrawButtonBase::CustomDrawButtonBase(GtkThemeService* theme_provider,
theme_provider->InitThemesFor(this);
registrar_.Add(this,
- NotificationType::BROWSER_THEME_CHANGED,
+ chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
NotificationService::AllSources());
} else {
// Load the button images from the resource bundle.
@@ -140,10 +141,10 @@ void CustomDrawButtonBase::SetBackground(SkColor color,
}
}
-void CustomDrawButtonBase::Observe(NotificationType type,
+void CustomDrawButtonBase::Observe(int type,
const NotificationSource& source, const NotificationDetails& details) {
DCHECK(theme_service_);
- DCHECK(NotificationType::BROWSER_THEME_CHANGED == type);
+ DCHECK(chrome::NOTIFICATION_BROWSER_THEME_CHANGED == type);
surfaces_[GTK_STATE_NORMAL]->UsePixbuf(normal_id_ ?
theme_service_->GetRTLEnabledPixbufNamed(normal_id_) : NULL);
@@ -244,7 +245,7 @@ CustomDrawButton::CustomDrawButton(GtkThemeService* theme_provider,
theme_service_->InitThemesFor(this);
registrar_.Add(this,
- NotificationType::BROWSER_THEME_CHANGED,
+ chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
NotificationService::AllSources());
}
@@ -262,7 +263,7 @@ CustomDrawButton::CustomDrawButton(GtkThemeService* theme_provider,
theme_service_->InitThemesFor(this);
registrar_.Add(this,
- NotificationType::BROWSER_THEME_CHANGED,
+ chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
NotificationService::AllSources());
}
@@ -279,9 +280,9 @@ void CustomDrawButton::Init() {
hover_controller_.Init(widget());
}
-void CustomDrawButton::Observe(NotificationType type,
+void CustomDrawButton::Observe(int type,
const NotificationSource& source, const NotificationDetails& details) {
- DCHECK(NotificationType::BROWSER_THEME_CHANGED == type);
+ DCHECK(chrome::NOTIFICATION_BROWSER_THEME_CHANGED == type);
SetBrowserTheme();
}
diff --git a/chrome/browser/ui/gtk/custom_button.h b/chrome/browser/ui/gtk/custom_button.h
index 6bb3c1f..82e1442 100644
--- a/chrome/browser/ui/gtk/custom_button.h
+++ b/chrome/browser/ui/gtk/custom_button.h
@@ -57,7 +57,7 @@ class CustomDrawButtonBase : public NotificationObserver {
void SetBackground(SkColor color, SkBitmap* image, SkBitmap* mask);
// Provide NotificationObserver implementation.
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
@@ -185,7 +185,7 @@ class CustomDrawButton : public NotificationObserver {
void SetBackground(SkColor color, SkBitmap* image, SkBitmap* mask);
// NotificationObserver implementation.
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/download/download_item_gtk.cc b/chrome/browser/ui/gtk/download/download_item_gtk.cc
index e189c93..d0cbcff 100644
--- a/chrome/browser/ui/gtk/download/download_item_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_item_gtk.cc
@@ -22,6 +22,7 @@
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/gtk/nine_box.h"
+#include "chrome/common/chrome_notification_types.h"
#include "content/common/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -242,7 +243,7 @@ DownloadItemGtk::DownloadItemGtk(DownloadShelfGtk* parent_shelf,
gtk_widget_show_all(dangerous_prompt_);
}
- registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
@@ -367,10 +368,10 @@ void DownloadItemGtk::AnimationProgressed(const ui::Animation* animation) {
}
}
-void DownloadItemGtk::Observe(NotificationType type,
+void DownloadItemGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type == NotificationType::BROWSER_THEME_CHANGED) {
+ if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) {
// Our GtkArrow is only visible in gtk mode. Otherwise, we let the custom
// rendering code do whatever it wants.
if (theme_service_->UsingNativeTheme()) {
diff --git a/chrome/browser/ui/gtk/download/download_item_gtk.h b/chrome/browser/ui/gtk/download/download_item_gtk.h
index d66fce6..624eddf 100644
--- a/chrome/browser/ui/gtk/download/download_item_gtk.h
+++ b/chrome/browser/ui/gtk/download/download_item_gtk.h
@@ -55,7 +55,7 @@ class DownloadItemGtk : public DownloadItem::Observer,
virtual void AnimationProgressed(const ui::Animation* animation);
// Overridden from NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
index ef8e8d0..9c9986f 100644
--- a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.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 "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -142,7 +143,7 @@ DownloadShelfGtk::DownloadShelfGtk(Browser* browser, GtkWidget* parent)
false, true, this));
theme_service_->InitThemesFor(this);
- registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(theme_service_));
gtk_widget_show_all(shelf_.get());
@@ -220,10 +221,10 @@ void DownloadShelfGtk::Closed() {
}
}
-void DownloadShelfGtk::Observe(NotificationType type,
+void DownloadShelfGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type == NotificationType::BROWSER_THEME_CHANGED) {
+ if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) {
GdkColor color = theme_service_->GetGdkColor(
ThemeService::COLOR_TOOLBAR);
gtk_widget_modify_bg(padding_bg_, GTK_STATE_NORMAL, &color);
diff --git a/chrome/browser/ui/gtk/download/download_shelf_gtk.h b/chrome/browser/ui/gtk/download/download_shelf_gtk.h
index a8e39fd..fd777a9 100644
--- a/chrome/browser/ui/gtk/download/download_shelf_gtk.h
+++ b/chrome/browser/ui/gtk/download/download_shelf_gtk.h
@@ -52,7 +52,7 @@ class DownloadShelfGtk : public DownloadShelf,
virtual void Closed();
// Overridden from NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc b/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc
index c69ed6b..51e9abf 100644
--- a/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc
@@ -49,7 +49,7 @@ class DownloadStartedAnimationGtk : public ui::LinearAnimation,
virtual void AnimateToState(double state);
// NotificationObserver
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
@@ -98,11 +98,11 @@ DownloadStartedAnimationGtk::DownloadStartedAnimationGtk(
registrar_.Add(
this,
- NotificationType::TAB_CONTENTS_HIDDEN,
+ content::NOTIFICATION_TAB_CONTENTS_HIDDEN,
Source<TabContents>(tab_contents_));
registrar_.Add(
this,
- NotificationType::TAB_CONTENTS_DESTROYED,
+ content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
Source<TabContents>(tab_contents_));
// TODO(estade): don't show up on the wrong virtual desktop.
@@ -150,11 +150,11 @@ void DownloadStartedAnimationGtk::Close() {
registrar_.Remove(
this,
- NotificationType::TAB_CONTENTS_HIDDEN,
+ content::NOTIFICATION_TAB_CONTENTS_HIDDEN,
Source<TabContents>(tab_contents_));
registrar_.Remove(
this,
- NotificationType::TAB_CONTENTS_DESTROYED,
+ content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
Source<TabContents>(tab_contents_));
tab_contents_ = NULL;
@@ -180,7 +180,7 @@ void DownloadStartedAnimationGtk::AnimateToState(double state) {
}
}
-void DownloadStartedAnimationGtk::Observe(NotificationType type,
+void DownloadStartedAnimationGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
Close();
diff --git a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc
index 767e4a8..7f6800e 100644
--- a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc
@@ -19,9 +19,9 @@
#include "chrome/browser/ui/gtk/location_bar_view_gtk.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_action.h"
+#include "content/common/content_notification_types.h"
#include "content/common/notification_details.h"
#include "content/common/notification_source.h"
-#include "content/common/notification_type.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -89,25 +89,25 @@ ExtensionInstalledBubbleGtk::ExtensionInstalledBubbleGtk(
// fired, but all of the EXTENSION_LOADED Observers have run. Only then can we
// be sure that a browser action or page action has had views created which we
// can inspect for the purpose of pointing to them.
- registrar_.Add(this, NotificationType::EXTENSION_LOADED,
+ registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
Source<Profile>(browser->profile()));
- registrar_.Add(this, NotificationType::EXTENSION_UNLOADED,
+ registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
Source<Profile>(browser->profile()));
}
ExtensionInstalledBubbleGtk::~ExtensionInstalledBubbleGtk() {}
-void ExtensionInstalledBubbleGtk::Observe(NotificationType type,
+void ExtensionInstalledBubbleGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type == NotificationType::EXTENSION_LOADED) {
+ if (type == chrome::NOTIFICATION_EXTENSION_LOADED) {
const Extension* extension = Details<const Extension>(details).ptr();
if (extension == extension_) {
// PostTask to ourself to allow all EXTENSION_LOADED Observers to run.
MessageLoopForUI::current()->PostTask(FROM_HERE, NewRunnableMethod(this,
&ExtensionInstalledBubbleGtk::ShowInternal));
}
- } else if (type == NotificationType::EXTENSION_UNLOADED) {
+ } else if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) {
const Extension* extension =
Details<UnloadedExtensionInfo>(details)->extension;
if (extension == extension_)
diff --git a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.h b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.h
index fa943be..1a06242 100644
--- a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.h
@@ -64,7 +64,7 @@ class ExtensionInstalledBubbleGtk
void ShowInternal();
// NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) OVERRIDE;
diff --git a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc
index 276df4a..556f3eb 100644
--- a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc
+++ b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "content/browser/debugger/devtools_window.h"
+#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/common/notification_details.h"
#include "content/common/notification_source.h"
@@ -50,30 +51,30 @@ ExtensionPopupGtk::ExtensionPopupGtk(Browser* browser,
if (host->did_stop_loading()) {
ShowPopup();
} else {
- registrar_.Add(this, NotificationType::EXTENSION_HOST_DID_STOP_LOADING,
+ registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
Source<Profile>(host->profile()));
}
- registrar_.Add(this, NotificationType::EXTENSION_HOST_VIEW_SHOULD_CLOSE,
+ registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
Source<Profile>(host->profile()));
}
ExtensionPopupGtk::~ExtensionPopupGtk() {
}
-void ExtensionPopupGtk::Observe(NotificationType type,
+void ExtensionPopupGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- switch (type.value) {
- case NotificationType::EXTENSION_HOST_DID_STOP_LOADING:
+ switch (type) {
+ case chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING:
if (Details<ExtensionHost>(host_.get()) == details)
ShowPopup();
break;
- case NotificationType::EXTENSION_HOST_VIEW_SHOULD_CLOSE:
+ case chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE:
if (Details<ExtensionHost>(host_.get()) == details)
DestroyPopup();
break;
- case NotificationType::DEVTOOLS_WINDOW_CLOSING:
+ case content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING:
// Make sure its the devtools window that inspecting our popup.
if (Details<RenderViewHost>(host_->render_view_host()) != details)
break;
@@ -98,7 +99,7 @@ void ExtensionPopupGtk::ShowPopup() {
if (being_inspected_) {
DevToolsWindow::OpenDevToolsWindow(host_->render_view_host());
// Listen for the the devtools window closing.
- registrar_.Add(this, NotificationType::DEVTOOLS_WINDOW_CLOSING,
+ registrar_.Add(this, content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING,
Source<Profile>(host_->profile()));
}
diff --git a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.h b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.h
index 926bb2e..1b41510 100644
--- a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.h
+++ b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.h
@@ -35,7 +35,7 @@ class ExtensionPopupGtk : public NotificationObserver,
bool inspect);
// NotificationObserver implementation.
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) OVERRIDE;
diff --git a/chrome/browser/ui/gtk/find_bar_gtk.cc b/chrome/browser/ui/gtk/find_bar_gtk.cc
index 439a815..ae1a647 100644
--- a/chrome/browser/ui/gtk/find_bar_gtk.cc
+++ b/chrome/browser/ui/gtk/find_bar_gtk.cc
@@ -32,6 +32,7 @@
#include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h"
#include "chrome/browser/ui/gtk/view_id_util.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#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/native_web_keyboard_event.h"
@@ -300,7 +301,7 @@ void FindBarGtk::InitWidgets() {
gtk_box_pack_end(GTK_BOX(hbox), border_bin_, TRUE, TRUE, 0);
theme_service_->InitThemesFor(this);
- registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(theme_service_));
g_signal_connect(widget(), "parent-set", G_CALLBACK(OnParentSet), this);
@@ -456,10 +457,10 @@ FindBarTesting* FindBarGtk::GetFindBarTesting() {
return this;
}
-void FindBarGtk::Observe(NotificationType type,
+void FindBarGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK_EQ(type.value, NotificationType::BROWSER_THEME_CHANGED);
+ DCHECK_EQ(type, chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
// Force reshapings of the find bar window.
container_width_ = -1;
diff --git a/chrome/browser/ui/gtk/find_bar_gtk.h b/chrome/browser/ui/gtk/find_bar_gtk.h
index 10606b2..68ecac9 100644
--- a/chrome/browser/ui/gtk/find_bar_gtk.h
+++ b/chrome/browser/ui/gtk/find_bar_gtk.h
@@ -68,7 +68,7 @@ class FindBarGtk : public FindBar,
virtual int GetWidth();
// Overridden from NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/global_bookmark_menu.cc b/chrome/browser/ui/gtk/global_bookmark_menu.cc
index 23ec551..d2c8ee8d 100644
--- a/chrome/browser/ui/gtk/global_bookmark_menu.cc
+++ b/chrome/browser/ui/gtk/global_bookmark_menu.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/ui/gtk/global_menu_bar.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 "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -60,7 +61,7 @@ GlobalBookmarkMenu::GlobalBookmarkMenu(Browser* browser)
default_favicon_ = GtkThemeService::GetDefaultFavicon(true);
default_folder_ = GtkThemeService::GetFolderIcon(true);
- registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(
ThemeServiceFactory::GetForProfile(profile_)));
}
@@ -225,10 +226,10 @@ void GlobalBookmarkMenu::ClearBookmarkItemCallback(GtkWidget* menu_item,
gtk_widget_destroy(menu_item);
}
-void GlobalBookmarkMenu::Observe(NotificationType type,
+void GlobalBookmarkMenu::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type.value == NotificationType::BROWSER_THEME_CHANGED);
+ DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
// Change the icon and invalidate the menu.
default_favicon_ = GtkThemeService::GetDefaultFavicon(true);
diff --git a/chrome/browser/ui/gtk/global_bookmark_menu.h b/chrome/browser/ui/gtk/global_bookmark_menu.h
index 9c7d4e2..b60c557 100644
--- a/chrome/browser/ui/gtk/global_bookmark_menu.h
+++ b/chrome/browser/ui/gtk/global_bookmark_menu.h
@@ -78,7 +78,7 @@ class GlobalBookmarkMenu : public GlobalMenuOwner,
void* unused);
// NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/global_history_menu.cc b/chrome/browser/ui/gtk/global_history_menu.cc
index 2bdc126..7938324 100644
--- a/chrome/browser/ui/gtk/global_history_menu.cc
+++ b/chrome/browser/ui/gtk/global_history_menu.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/gtk/owned_widget_gtk.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/url_constants.h"
#include "content/common/notification_service.h"
#include "grit/generated_resources.h"
@@ -118,7 +119,7 @@ void GlobalHistoryMenu::Init(GtkWidget* history_menu,
// Register for notification when TopSites changes so that we can update
// ourself.
- registrar_.Add(this, NotificationType::TOP_SITES_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_TOP_SITES_CHANGED,
Source<history::TopSites>(top_sites_));
}
}
@@ -278,10 +279,10 @@ void GlobalHistoryMenu::ClearMenuCallback(GtkWidget* menu_item,
}
}
-void GlobalHistoryMenu::Observe(NotificationType type,
+void GlobalHistoryMenu::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type.value == NotificationType::TOP_SITES_CHANGED) {
+ if (type == chrome::NOTIFICATION_TOP_SITES_CHANGED) {
if (Source<history::TopSites>(source).ptr() == top_sites_)
GetTopSitesData();
} else {
diff --git a/chrome/browser/ui/gtk/global_history_menu.h b/chrome/browser/ui/gtk/global_history_menu.h
index 7356963..9ddf74e 100644
--- a/chrome/browser/ui/gtk/global_history_menu.h
+++ b/chrome/browser/ui/gtk/global_history_menu.h
@@ -81,7 +81,7 @@ class GlobalHistoryMenu : public GlobalMenuOwner,
static void ClearMenuCallback(GtkWidget* widget, ClearMenuClosure* closure);
// NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/global_menu_bar.cc b/chrome/browser/ui/gtk/global_menu_bar.cc
index c6980ad..6e0b726 100644
--- a/chrome/browser/ui/gtk/global_menu_bar.cc
+++ b/chrome/browser/ui/gtk/global_menu_bar.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/ui/gtk/accelerators_gtk.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 "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/common/notification_service.h"
@@ -213,9 +214,10 @@ GlobalMenuBar::GlobalMenuBar(Browser* browser)
}
// Listen for bookmark bar visibility changes and set the initial state.
- registrar_.Add(this, NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
+ registrar_.Add(this,
+ chrome::NOTIFICATION_BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
NotificationService::AllSources());
- Observe(NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
+ Observe(chrome::NOTIFICATION_BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
NotificationService::AllSources(),
NotificationService::NoDetails());
}
@@ -302,10 +304,10 @@ void GlobalMenuBar::EnabledStateChangedForCommand(int id, bool enabled) {
gtk_widget_set_sensitive(it->second, enabled);
}
-void GlobalMenuBar::Observe(NotificationType type,
+void GlobalMenuBar::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type.value == NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED);
+ DCHECK(type == chrome::NOTIFICATION_BOOKMARK_BAR_VISIBILITY_PREF_CHANGED);
CommandIDMenuItemMap::iterator it =
id_to_menu_item_.find(IDC_SHOW_BOOKMARK_BAR);
diff --git a/chrome/browser/ui/gtk/global_menu_bar.h b/chrome/browser/ui/gtk/global_menu_bar.h
index d4dbc27..784e003 100644
--- a/chrome/browser/ui/gtk/global_menu_bar.h
+++ b/chrome/browser/ui/gtk/global_menu_bar.h
@@ -65,7 +65,7 @@ class GlobalMenuBar : public CommandUpdater::CommandObserver,
virtual void EnabledStateChangedForCommand(int id, bool enabled);
// NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/gtk_theme_service.cc b/chrome/browser/ui/gtk/gtk_theme_service.cc
index 696826c..e624c02 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.cc
+++ b/chrome/browser/ui/gtk/gtk_theme_service.cc
@@ -23,12 +23,12 @@
#include "chrome/browser/ui/gtk/gtk_chrome_link_button.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/gtk/hover_controller_gtk.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/user_metrics.h"
#include "content/common/notification_details.h"
#include "content/common/notification_service.h"
#include "content/common/notification_source.h"
-#include "content/common/notification_type.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
#include "grit/ui_resources.h"
@@ -334,7 +334,7 @@ bool GtkThemeService::HasCustomImage(int id) const {
}
void GtkThemeService::InitThemesFor(NotificationObserver* observer) {
- observer->Observe(NotificationType::BROWSER_THEME_CHANGED,
+ observer->Observe(chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(this),
NotificationService::NoDetails());
}
@@ -366,10 +366,10 @@ bool GtkThemeService::UsingNativeTheme() const {
return use_gtk_;
}
-void GtkThemeService::Observe(NotificationType type,
+void GtkThemeService::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if ((type == NotificationType::PREF_CHANGED) &&
+ if ((type == chrome::NOTIFICATION_PREF_CHANGED) &&
(*Details<std::string>(details).ptr() == prefs::kUsesSystemTheme)) {
#if !defined(OS_CHROMEOS)
use_gtk_ = profile()->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme);
diff --git a/chrome/browser/ui/gtk/gtk_theme_service.h b/chrome/browser/ui/gtk/gtk_theme_service.h
index c101d68..0875cbf 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.h
+++ b/chrome/browser/ui/gtk/gtk_theme_service.h
@@ -60,7 +60,7 @@ class GtkThemeService : public ThemeService {
virtual bool UsingNativeTheme() const;
// Overridden from ThemeService, NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/infobars/infobar_gtk.cc b/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
index d65a66b..6ff20cb 100644
--- a/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
+++ b/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/gtk/infobars/infobar_container_gtk.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/common/chrome_notification_types.h"
#include "content/common/notification_service.h"
#include "ui/gfx/gtk_util.h"
#include "ui/gfx/image/image.h"
@@ -91,7 +92,7 @@ InfoBarGtk::InfoBarGtk(TabContentsWrapper* owner, InfoBarDelegate* delegate)
G_CALLBACK(OnChildSizeRequestThunk),
this);
- registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(theme_service_));
UpdateBorderColor();
}
@@ -251,7 +252,7 @@ void InfoBarGtk::PlatformSpecificOnHeightsRecalculated() {
gtk_widget_queue_draw(widget_.get());
}
-void InfoBarGtk::Observe(NotificationType type,
+void InfoBarGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
UpdateBorderColor();
diff --git a/chrome/browser/ui/gtk/infobars/infobar_gtk.h b/chrome/browser/ui/gtk/infobars/infobar_gtk.h
index de832f7..a757a3a 100644
--- a/chrome/browser/ui/gtk/infobars/infobar_gtk.h
+++ b/chrome/browser/ui/gtk/infobars/infobar_gtk.h
@@ -76,7 +76,7 @@ class InfoBarGtk : public InfoBar,
virtual void PlatformSpecificOnHeightsRecalculated() OVERRIDE;
// NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) OVERRIDE;
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index 4047e23..498f397 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -47,6 +47,7 @@
#include "chrome/browser/ui/gtk/view_id_util.h"
#include "chrome/browser/ui/omnibox/location_bar_util.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_action.h"
#include "chrome/common/extensions/extension_resource.h"
@@ -331,7 +332,7 @@ void LocationBarViewGtk::Init(bool popup_window_mode) {
G_CALLBACK(&OnHboxSizeAllocateThunk), this);
registrar_.Add(this,
- NotificationType::BROWSER_THEME_CHANGED,
+ chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
NotificationService::AllSources());
edit_bookmarks_enabled_.Init(prefs::kEditBookmarksEnabled,
profile_->GetPrefs(), this);
@@ -558,7 +559,7 @@ void LocationBarViewGtk::OnSetFocus() {
l10n_util::GetStringUTF8(IDS_ACCNAME_LOCATION).c_str(),
false);
NotificationService::current()->Notify(
- NotificationType::ACCESSIBILITY_CONTROL_FOCUSED,
+ chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED,
Source<Profile>(profile_),
Details<AccessibilityTextBoxInfo>(&info));
@@ -662,7 +663,7 @@ void LocationBarViewGtk::UpdatePageActions() {
page_action_views_[i]->widget(), FALSE, FALSE, 0);
}
NotificationService::current()->Notify(
- NotificationType::EXTENSION_PAGE_ACTION_COUNT_CHANGED,
+ chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
Source<LocationBar>(this),
NotificationService::NoDetails());
}
@@ -688,7 +689,7 @@ void LocationBarViewGtk::InvalidatePageActions() {
page_action_views_.reset();
if (page_action_views_.size() != count_before) {
NotificationService::current()->Notify(
- NotificationType::EXTENSION_PAGE_ACTION_COUNT_CHANGED,
+ chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
Source<LocationBar>(this),
NotificationService::NoDetails());
}
@@ -756,15 +757,15 @@ void LocationBarViewGtk::TestPageActionPressed(size_t index) {
page_action_views_[index]->TestActivatePageAction();
}
-void LocationBarViewGtk::Observe(NotificationType type,
+void LocationBarViewGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type.value == NotificationType::PREF_CHANGED) {
+ if (type == chrome::NOTIFICATION_PREF_CHANGED) {
UpdateStarIcon();
return;
}
- DCHECK_EQ(type.value, NotificationType::BROWSER_THEME_CHANGED);
+ DCHECK_EQ(type, chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
if (theme_service_->UsingNativeTheme()) {
gtk_widget_modify_bg(tab_to_search_box_, GTK_STATE_NORMAL, NULL);
@@ -1523,7 +1524,7 @@ void LocationBarViewGtk::PageActionViewGtk::UpdateVisibility(
if (visible != old_visible) {
NotificationService::current()->Notify(
- NotificationType::EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
+ chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
Source<ExtensionAction>(page_action_),
Details<TabContents>(contents));
}
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.h b/chrome/browser/ui/gtk/location_bar_view_gtk.h
index 75c981a..dbb4272 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.h
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.h
@@ -137,7 +137,7 @@ class LocationBarViewGtk : public AutocompleteEditController,
virtual void TestPageActionPressed(size_t index);
// Implement the NotificationObserver interface.
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
index 062470b..fd76b3b 100644
--- a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
+++ b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
@@ -27,13 +27,13 @@
#include "chrome/browser/ui/gtk/menu_gtk.h"
#include "chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.h"
#include "chrome/browser/ui/gtk/rounded_window.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/common/notification_details.h"
#include "content/common/notification_service.h"
#include "content/common/notification_source.h"
-#include "content/common/notification_type.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
@@ -313,7 +313,7 @@ void BalloonViewImpl::Show(Balloon* balloon) {
options_menu_button_->widget());
gtk_box_pack_end(GTK_BOX(hbox_), options_alignment, FALSE, FALSE, 0);
- notification_registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ notification_registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(theme_service_));
// We don't do InitThemesFor() because it just forces a redraw.
@@ -337,7 +337,7 @@ void BalloonViewImpl::Show(Balloon* balloon) {
gtk_widget_show_all(frame_container_);
notification_registrar_.Add(this,
- NotificationType::NOTIFY_BALLOON_DISCONNECTED, Source<Balloon>(balloon));
+ chrome::NOTIFY_BALLOON_DISCONNECTED, Source<Balloon>(balloon));
}
void BalloonViewImpl::Update() {
@@ -380,17 +380,17 @@ gfx::Rect BalloonViewImpl::GetContentsRectangle() const {
content_size.width(), content_size.height());
}
-void BalloonViewImpl::Observe(NotificationType type,
+void BalloonViewImpl::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type == NotificationType::NOTIFY_BALLOON_DISCONNECTED) {
+ if (type == chrome::NOTIFY_BALLOON_DISCONNECTED) {
// If the renderer process attached to this balloon is disconnected
// (e.g., because of a crash), we want to close the balloon.
notification_registrar_.Remove(this,
- NotificationType::NOTIFY_BALLOON_DISCONNECTED,
+ chrome::NOTIFY_BALLOON_DISCONNECTED,
Source<Balloon>(balloon_));
Close(false);
- } else if (type == NotificationType::BROWSER_THEME_CHANGED) {
+ } else if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) {
// Since all the buttons change their own properties, and our expose does
// all the real differences, we'll need a redraw.
gtk_widget_queue_draw(frame_container_);
diff --git a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.h b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.h
index e1a218f..b055379 100644
--- a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.h
+++ b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.h
@@ -56,7 +56,7 @@ class BalloonViewImpl : public BalloonView,
private:
// NotificationObserver interface.
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
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 bb8bfc2..4df64aa 100644
--- a/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc
+++ b/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc
@@ -25,6 +25,7 @@
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#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 "grit/theme_resources.h"
#include "ui/base/gtk/gtk_windowing.h"
@@ -311,7 +312,7 @@ OmniboxPopupViewGtk::OmniboxPopupViewGtk(const gfx::Font& font,
G_CALLBACK(HandleExposeThunk), this);
registrar_.Add(this,
- NotificationType::BROWSER_THEME_CHANGED,
+ chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
NotificationService::AllSources());
theme_service_->InitThemesFor(this);
@@ -388,10 +389,10 @@ void OmniboxPopupViewGtk::OnDragCanceled() {
ignore_mouse_drag_ = true;
}
-void OmniboxPopupViewGtk::Observe(NotificationType type,
+void OmniboxPopupViewGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type == NotificationType::BROWSER_THEME_CHANGED);
+ DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
if (theme_service_->UsingNativeTheme()) {
gtk_util::UndoForceFontSize(window_);
diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h b/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h
index 64710be..025e432 100644
--- a/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h
+++ b/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h
@@ -47,7 +47,7 @@ class OmniboxPopupViewGtk : public AutocompletePopupView,
virtual void OnDragCanceled();
// Overridden from NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc
index e8c5b8c..dc93435 100644
--- a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc
+++ b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/gtk/view_id_util.h"
#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 "googleurl/src/gurl.h"
@@ -212,7 +213,7 @@ OmniboxViewGtk::OmniboxViewGtk(
}
OmniboxViewGtk::~OmniboxViewGtk() {
- NotificationService::current()->Notify(NotificationType::OMNIBOX_DESTROYED,
+ NotificationService::current()->Notify(chrome::OMNIBOX_DESTROYED,
Source<OmniboxViewGtk>(this),
NotificationService::NoDetails());
@@ -408,7 +409,7 @@ void OmniboxViewGtk::Init() {
#if !defined(TOOLKIT_VIEWS)
registrar_.Add(this,
- NotificationType::BROWSER_THEME_CHANGED,
+ chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
NotificationService::AllSources());
theme_service_->InitThemesFor(this);
#else
@@ -910,10 +911,10 @@ OmniboxView* OmniboxViewGtk::Create(AutocompleteEditController* controller,
}
#endif
-void OmniboxViewGtk::Observe(NotificationType type,
+void OmniboxViewGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type == NotificationType::BROWSER_THEME_CHANGED);
+ DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
SetBaseColor();
}
diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h
index 7750f76..f52e03b 100644
--- a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h
+++ b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h
@@ -163,7 +163,7 @@ class OmniboxViewGtk : public OmniboxView,
#endif
// Overridden from NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) OVERRIDE;
diff --git a/chrome/browser/ui/gtk/overflow_button.cc b/chrome/browser/ui/gtk/overflow_button.cc
index b37005c..deb1433 100644
--- a/chrome/browser/ui/gtk/overflow_button.cc
+++ b/chrome/browser/ui/gtk/overflow_button.cc
@@ -8,8 +8,8 @@
#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/common/notification_type.h"
#include "grit/theme_resources.h"
#include "ui/base/resource/resource_bundle.h"
@@ -18,7 +18,7 @@ OverflowButton::OverflowButton(Profile* profile) : profile_(profile) {
gtk_widget_set_no_show_all(widget_.get(), TRUE);
GtkThemeService* theme_service = GtkThemeService::GetFrom(profile);
- registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(theme_service));
theme_service->InitThemesFor(this);
}
@@ -27,7 +27,7 @@ OverflowButton::~OverflowButton() {
widget_.Destroy();
}
-void OverflowButton::Observe(NotificationType type,
+void OverflowButton::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
GtkWidget* former_child = gtk_bin_get_child(GTK_BIN(widget()));
diff --git a/chrome/browser/ui/gtk/overflow_button.h b/chrome/browser/ui/gtk/overflow_button.h
index 91583f1..9f4f099 100644
--- a/chrome/browser/ui/gtk/overflow_button.h
+++ b/chrome/browser/ui/gtk/overflow_button.h
@@ -24,7 +24,7 @@ class OverflowButton : public NotificationObserver {
private:
// NotificationObserver implementation.
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/reload_button_gtk.cc b/chrome/browser/ui/gtk/reload_button_gtk.cc
index 9dd6a36..890baa3 100644
--- a/chrome/browser/ui/gtk/reload_button_gtk.cc
+++ b/chrome/browser/ui/gtk/reload_button_gtk.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/gtk/location_bar_view_gtk.h"
+#include "chrome/common/chrome_notification_types.h"
#include "content/common/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -61,7 +62,7 @@ ReloadButtonGtk::ReloadButtonGtk(LocationBarViewGtk* location_bar,
if (theme_service_) {
theme_service_->InitThemesFor(this);
registrar_.Add(this,
- NotificationType::BROWSER_THEME_CHANGED,
+ chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(theme_service_));
}
@@ -127,10 +128,10 @@ void ReloadButtonGtk::ChangeMode(Mode mode, bool force) {
////////////////////////////////////////////////////////////////////////////////
// ReloadButtonGtk, NotificationObserver implementation:
-void ReloadButtonGtk::Observe(NotificationType type,
+void ReloadButtonGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& /* details */) {
- DCHECK(NotificationType::BROWSER_THEME_CHANGED == type);
+ DCHECK(chrome::NOTIFICATION_BROWSER_THEME_CHANGED == type);
GtkThemeService* provider = static_cast<GtkThemeService*>(
Source<ThemeService>(source).ptr());
diff --git a/chrome/browser/ui/gtk/reload_button_gtk.h b/chrome/browser/ui/gtk/reload_button_gtk.h
index d623462..8f7700e 100644
--- a/chrome/browser/ui/gtk/reload_button_gtk.h
+++ b/chrome/browser/ui/gtk/reload_button_gtk.h
@@ -35,7 +35,7 @@ class ReloadButtonGtk : public NotificationObserver {
void ChangeMode(Mode mode, bool force);
// Provide NotificationObserver implementation.
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& /* details */);
diff --git a/chrome/browser/ui/gtk/repost_form_warning_gtk.cc b/chrome/browser/ui/gtk/repost_form_warning_gtk.cc
index f7a79aa..d37c7b1 100644
--- a/chrome/browser/ui/gtk/repost_form_warning_gtk.cc
+++ b/chrome/browser/ui/gtk/repost_form_warning_gtk.cc
@@ -10,7 +10,7 @@
#include "content/browser/browser_thread.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_type.h"
+#include "content/common/content_notification_types.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/gtk/status_bubble_gtk.cc b/chrome/browser/ui/gtk/status_bubble_gtk.cc
index de16765..fb548be 100644
--- a/chrome/browser/ui/gtk/status_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/status_bubble_gtk.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#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 "ui/base/animation/slide_animation.h"
#include "ui/base/text/text_elider.h"
@@ -49,7 +50,7 @@ StatusBubbleGtk::StatusBubbleGtk(Profile* profile)
InitWidgets();
theme_service_->InitThemesFor(this);
- registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(theme_service_));
}
@@ -234,10 +235,10 @@ void StatusBubbleGtk::UpdateDownloadShelfVisibility(bool visible) {
download_shelf_is_visible_ = visible;
}
-void StatusBubbleGtk::Observe(NotificationType type,
+void StatusBubbleGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type == NotificationType::BROWSER_THEME_CHANGED) {
+ if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) {
UserChangedTheme();
}
}
diff --git a/chrome/browser/ui/gtk/status_bubble_gtk.h b/chrome/browser/ui/gtk/status_bubble_gtk.h
index a3be4a6..5962972 100644
--- a/chrome/browser/ui/gtk/status_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/status_bubble_gtk.h
@@ -58,7 +58,7 @@ class StatusBubbleGtk : public StatusBubble,
virtual void UpdateDownloadShelfVisibility(bool visible);
// Overridden from NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/tab_contents_container_gtk.cc b/chrome/browser/ui/gtk/tab_contents_container_gtk.cc
index 64ea11f..026d11a 100644
--- a/chrome/browser/ui/gtk/tab_contents_container_gtk.cc
+++ b/chrome/browser/ui/gtk/tab_contents_container_gtk.cc
@@ -64,7 +64,7 @@ void TabContentsContainerGtk::Init() {
void TabContentsContainerGtk::SetTab(TabContentsWrapper* tab) {
HideTab(tab_);
if (tab_) {
- registrar_.Remove(this, NotificationType::TAB_CONTENTS_DESTROYED,
+ registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
Source<TabContents>(tab_->tab_contents()));
}
@@ -77,7 +77,7 @@ void TabContentsContainerGtk::SetTab(TabContentsWrapper* tab) {
} else if (tab_) {
// Otherwise we actually have to add it to the widget hierarchy.
PackTab(tab);
- registrar_.Add(this, NotificationType::TAB_CONTENTS_DESTROYED,
+ registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
Source<TabContents>(tab_->tab_contents()));
}
}
@@ -95,7 +95,7 @@ void TabContentsContainerGtk::SetPreview(TabContentsWrapper* preview) {
preview_ = preview;
PackTab(preview);
- registrar_.Add(this, NotificationType::TAB_CONTENTS_DESTROYED,
+ registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
Source<TabContents>(preview_->tab_contents()));
}
@@ -109,7 +109,7 @@ void TabContentsContainerGtk::RemovePreview() {
if (preview_widget)
gtk_container_remove(GTK_CONTAINER(expanded_), preview_widget);
- registrar_.Remove(this, NotificationType::TAB_CONTENTS_DESTROYED,
+ registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
Source<TabContents>(preview_->tab_contents()));
preview_ = NULL;
}
@@ -168,10 +168,10 @@ void TabContentsContainerGtk::DetachTab(TabContentsWrapper* tab) {
}
}
-void TabContentsContainerGtk::Observe(NotificationType type,
+void TabContentsContainerGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type == NotificationType::TAB_CONTENTS_DESTROYED);
+ DCHECK(type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED);
TabContentsDestroyed(Source<TabContents>(source).ptr());
}
diff --git a/chrome/browser/ui/gtk/tab_contents_container_gtk.h b/chrome/browser/ui/gtk/tab_contents_container_gtk.h
index f3e48c2..de70475 100644
--- a/chrome/browser/ui/gtk/tab_contents_container_gtk.h
+++ b/chrome/browser/ui/gtk/tab_contents_container_gtk.h
@@ -46,7 +46,7 @@ class TabContentsContainerGtk : public NotificationObserver,
void DetachTab(TabContentsWrapper* tab);
// NotificationObserver implementation.
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
index 8f017e7..4fa858c 100644
--- a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
@@ -164,10 +164,10 @@ DraggedTabControllerGtk::GetJavaScriptDialogCreator() {
////////////////////////////////////////////////////////////////////////////////
// DraggedTabControllerGtk, NotificationObserver implementation:
-void DraggedTabControllerGtk::Observe(NotificationType type,
+void DraggedTabControllerGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type == NotificationType::TAB_CONTENTS_DESTROYED);
+ DCHECK(type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED);
DCHECK_EQ(Source<TabContents>(source).ptr(),
dragged_contents_->tab_contents());
EndDragImpl(TAB_DESTROYED);
@@ -187,7 +187,7 @@ void DraggedTabControllerGtk::SetDraggedContents(
TabContentsWrapper* new_contents) {
if (dragged_contents_) {
registrar_.Remove(this,
- NotificationType::TAB_CONTENTS_DESTROYED,
+ content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
Source<TabContents>(dragged_contents_->tab_contents()));
if (original_delegate_)
dragged_contents_->tab_contents()->set_delegate(original_delegate_);
@@ -196,7 +196,7 @@ void DraggedTabControllerGtk::SetDraggedContents(
dragged_contents_ = new_contents;
if (dragged_contents_) {
registrar_.Add(this,
- NotificationType::TAB_CONTENTS_DESTROYED,
+ content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
Source<TabContents>(dragged_contents_->tab_contents()));
// We need to be the delegate so we receive messages about stuff,
diff --git a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h
index 41c732d..d6fdb63 100644
--- a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h
+++ b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h
@@ -88,7 +88,7 @@ class DraggedTabControllerGtk : public NotificationObserver,
GetJavaScriptDialogCreator() OVERRIDE;
// Overridden from NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
index dda7ae0..64fe5ed 100644
--- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/notification_service.h"
#include "grit/generated_resources.h"
@@ -156,7 +157,7 @@ TabRendererGtk::LoadingAnimation::LoadingAnimation(
animation_state_(ANIMATION_NONE),
animation_frame_(0) {
registrar_.Add(this,
- NotificationType::BROWSER_THEME_CHANGED,
+ chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(theme_service_));
}
@@ -200,10 +201,10 @@ bool TabRendererGtk::LoadingAnimation::ValidateLoadingAnimation(
}
void TabRendererGtk::LoadingAnimation::Observe(
- NotificationType type,
+ int type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type == NotificationType::BROWSER_THEME_CHANGED);
+ DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
data_.reset(new Data(theme_service_));
}
@@ -273,7 +274,7 @@ TabRendererGtk::TabRendererGtk(ThemeService* theme_service)
hover_animation_.reset(new ui::SlideAnimation(this));
hover_animation_->SetSlideDuration(kHoverDurationMs);
- registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(theme_service_));
}
@@ -559,10 +560,10 @@ void TabRendererGtk::SetBounds(const gfx::Rect& bounds) {
gtk_widget_set_size_request(tab_.get(), bounds.width(), bounds.height());
}
-void TabRendererGtk::Observe(NotificationType type,
+void TabRendererGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type == NotificationType::BROWSER_THEME_CHANGED);
+ DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
// Clear our cache when we receive a theme change notification because it
// contains cached bitmaps based off the previous theme.
diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h
index a8a36a3..c5e3728 100644
--- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h
+++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h
@@ -81,7 +81,7 @@ class TabRendererGtk : public ui::AnimationDelegate,
}
// Provide NotificationObserver implementation.
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
@@ -164,7 +164,7 @@ class TabRendererGtk : public ui::AnimationDelegate,
virtual void SetBounds(const gfx::Rect& bounds);
// Provide NotificationObserver implementation.
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
index 9a7c251..f01809d 100644
--- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
@@ -24,9 +24,9 @@
#include "chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h"
#include "chrome/browser/ui/gtk/tabs/tab_strip_menu_controller.h"
#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/common/notification_type.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
#include "grit/ui_resources.h"
@@ -707,7 +707,7 @@ TabStripGtk::TabStripGtk(TabStripModel* model, BrowserWindowGtk* window)
added_as_message_loop_observer_(false),
hover_tab_selector_(model) {
theme_service_->InitThemesFor(this);
- registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(theme_service_));
}
@@ -1285,10 +1285,10 @@ void TabStripGtk::DidProcessEvent(GdkEvent* event) {
///////////////////////////////////////////////////////////////////////////////
// TabStripGtk, NotificationObserver implementation:
-void TabStripGtk::Observe(NotificationType type,
+void TabStripGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type == NotificationType::BROWSER_THEME_CHANGED) {
+ if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) {
TabRendererGtk::SetSelectedTitleColor(theme_service_->GetColor(
ThemeService::COLOR_TAB_TEXT));
TabRendererGtk::SetUnselectedTitleColor(theme_service_->GetColor(
diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h
index cc47446..7615cf1 100644
--- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h
+++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h
@@ -151,7 +151,7 @@ class TabStripGtk : public TabStripModelObserver,
virtual void DidProcessEvent(GdkEvent* event);
// Overridden from NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
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 bcf074ac..c7bb857 100644
--- a/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc
+++ b/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc
@@ -8,8 +8,8 @@
#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/common/notification_type.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -34,7 +34,7 @@ void ThemeInstallBubbleViewGtk::Show(GtkWindow* parent) {
instance_ = new ThemeInstallBubbleViewGtk(GTK_WIDGET(parent));
}
-void ThemeInstallBubbleViewGtk::Observe(NotificationType type,
+void ThemeInstallBubbleViewGtk::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
if (--num_loads_extant_ == 0)
@@ -52,27 +52,27 @@ ThemeInstallBubbleViewGtk::ThemeInstallBubbleViewGtk(GtkWidget* parent)
// Close when theme has been installed.
registrar_.Add(
this,
- NotificationType::BROWSER_THEME_CHANGED,
+ chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
NotificationService::AllSources());
// Close when we are installing an extension, not a theme.
registrar_.Add(
this,
- NotificationType::NO_THEME_DETECTED,
+ chrome::NOTIFICATION_NO_THEME_DETECTED,
NotificationService::AllSources());
registrar_.Add(
this,
- NotificationType::EXTENSION_INSTALLED,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED,
NotificationService::AllSources());
registrar_.Add(
this,
- NotificationType::EXTENSION_INSTALL_ERROR,
+ chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
NotificationService::AllSources());
// Don't let the bubble overlap the confirm dialog.
registrar_.Add(
this,
- NotificationType::EXTENSION_WILL_SHOW_CONFIRM_DIALOG,
+ chrome::NOTIFICATION_EXTENSION_WILL_SHOW_CONFIRM_DIALOG,
NotificationService::AllSources());
}
diff --git a/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h b/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h
index 8018e14..118b9d9 100644
--- a/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h
+++ b/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h
@@ -18,7 +18,7 @@ class ThemeInstallBubbleViewGtk : public NotificationObserver {
static void Show(GtkWindow* parent);
// NotificationObserver implementation.
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);