diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-10 15:52:27 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-10 15:52:27 +0000 |
commit | 43211582b1fa8c69136385250e7b0446cf364b5c (patch) | |
tree | 655ab01543012b6fd5699dee8fab92876959b7d9 /chrome/browser/sidebar | |
parent | d43970a7ceee5fc5433787b0f28b64234a4039f2 (diff) | |
download | chromium_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/sidebar')
-rw-r--r-- | chrome/browser/sidebar/sidebar_manager.cc | 11 | ||||
-rw-r--r-- | chrome/browser/sidebar/sidebar_manager.h | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/sidebar/sidebar_manager.cc b/chrome/browser/sidebar/sidebar_manager.cc index 82f5bdf..0398ba5 100644 --- a/chrome/browser/sidebar/sidebar_manager.cc +++ b/chrome/browser/sidebar/sidebar_manager.cc @@ -11,6 +11,7 @@ #include "chrome/browser/extensions/extension_sidebar_api.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sidebar/sidebar_container.h" +#include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_switches.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/common/notification_service.h" @@ -219,10 +220,10 @@ SidebarManager::~SidebarManager() { DCHECK(sidebar_host_to_tab_.empty()); } -void SidebarManager::Observe(NotificationType type, +void SidebarManager::Observe(int type, const NotificationSource& source, const NotificationDetails& details) { - if (type == NotificationType::TAB_CONTENTS_DESTROYED) { + if (type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED) { HideAllSidebars(Source<TabContents>(source).ptr()); } else { NOTREACHED() << "Got a notification we didn't register for!"; @@ -231,7 +232,7 @@ void SidebarManager::Observe(NotificationType type, void SidebarManager::UpdateSidebar(SidebarContainer* host) { NotificationService::current()->Notify( - NotificationType::SIDEBAR_CHANGED, + chrome::NOTIFICATION_SIDEBAR_CHANGED, Source<SidebarManager>(this), Details<SidebarContainer>(host)); } @@ -273,7 +274,7 @@ void SidebarManager::RegisterSidebarContainerFor( // If it's a first sidebar for this tab, register destroy notification. if (tab_to_sidebar_host_.find(tab) == tab_to_sidebar_host_.end()) { registrar_.Add(this, - NotificationType::TAB_CONTENTS_DESTROYED, + content::NOTIFICATION_TAB_CONTENTS_DESTROYED, Source<TabContents>(tab)); } @@ -292,7 +293,7 @@ void SidebarManager::UnregisterSidebarContainerFor( // If there's no more sidebars linked to this tab, unsubscribe. if (tab_to_sidebar_host_.find(tab) == tab_to_sidebar_host_.end()) { registrar_.Remove(this, - NotificationType::TAB_CONTENTS_DESTROYED, + content::NOTIFICATION_TAB_CONTENTS_DESTROYED, Source<TabContents>(tab)); } diff --git a/chrome/browser/sidebar/sidebar_manager.h b/chrome/browser/sidebar/sidebar_manager.h index 13040ce..8bcc846 100644 --- a/chrome/browser/sidebar/sidebar_manager.h +++ b/chrome/browser/sidebar/sidebar_manager.h @@ -99,7 +99,7 @@ class SidebarManager : public NotificationObserver, virtual ~SidebarManager(); // Overridden from NotificationObserver. - virtual void Observe(NotificationType type, + virtual void Observe(int type, const NotificationSource& source, const NotificationDetails& details); |