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/tabs/pinned_tab_service.cc | |
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/tabs/pinned_tab_service.cc')
-rw-r--r-- | chrome/browser/tabs/pinned_tab_service.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/tabs/pinned_tab_service.cc b/chrome/browser/tabs/pinned_tab_service.cc index ac61609..d09f579 100644 --- a/chrome/browser/tabs/pinned_tab_service.cc +++ b/chrome/browser/tabs/pinned_tab_service.cc @@ -8,8 +8,8 @@ #include "chrome/browser/tabs/pinned_tab_codec.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_list.h" +#include "chrome/common/chrome_notification_types.h" #include "content/common/notification_service.h" -#include "content/common/notification_type.h" static bool IsLastNormalBrowser(Browser* browser) { for (BrowserList::const_iterator i = BrowserList::begin(); @@ -26,22 +26,22 @@ PinnedTabService::PinnedTabService(Profile* profile) : profile_(profile), got_exiting_(false), has_normal_browser_(false) { - registrar_.Add(this, NotificationType::BROWSER_OPENED, + registrar_.Add(this, chrome::NOTIFICATION_BROWSER_OPENED, NotificationService::AllSources()); - registrar_.Add(this, NotificationType::BROWSER_CLOSING, + registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSING, NotificationService::AllSources()); - registrar_.Add(this, NotificationType::APP_EXITING, + registrar_.Add(this, content::NOTIFICATION_APP_EXITING, NotificationService::AllSources()); } -void PinnedTabService::Observe(NotificationType type, +void PinnedTabService::Observe(int type, const NotificationSource& source, const NotificationDetails& details) { if (got_exiting_) return; - switch (type.value) { - case NotificationType::BROWSER_OPENED: { + switch (type) { + case chrome::NOTIFICATION_BROWSER_OPENED: { Browser* browser = Source<Browser>(source).ptr(); if (!has_normal_browser_ && browser->is_type_tabbed() && browser->profile() == profile_) { @@ -50,7 +50,7 @@ void PinnedTabService::Observe(NotificationType type, break; } - case NotificationType::BROWSER_CLOSING: { + case chrome::NOTIFICATION_BROWSER_CLOSING: { Browser* browser = Source<Browser>(source).ptr(); if (has_normal_browser_ && browser->profile() == profile_) { if (*(Details<bool>(details)).ptr()) { @@ -63,7 +63,7 @@ void PinnedTabService::Observe(NotificationType type, break; } - case NotificationType::APP_EXITING: { + case content::NOTIFICATION_APP_EXITING: { if (has_normal_browser_) GotExit(); break; |