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/tab_contents/infobar_container.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/tab_contents/infobar_container.cc')
-rw-r--r-- | chrome/browser/tab_contents/infobar_container.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/tab_contents/infobar_container.cc b/chrome/browser/tab_contents/infobar_container.cc index c16f95d..63b7a61 100644 --- a/chrome/browser/tab_contents/infobar_container.cc +++ b/chrome/browser/tab_contents/infobar_container.cc @@ -12,6 +12,7 @@ #include "chrome/browser/tab_contents/infobar.h" #include "chrome/browser/tab_contents/infobar_delegate.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" +#include "chrome/common/chrome_notification_types.h" #include "content/common/notification_details.h" #include "content/common/notification_source.h" #include "ui/base/animation/slide_animation.h" @@ -43,11 +44,11 @@ void InfoBarContainer::ChangeTabContents(TabContentsWrapper* contents) { tab_contents_ = contents; if (tab_contents_) { Source<TabContentsWrapper> tc_source(tab_contents_); - registrar_.Add(this, NotificationType::TAB_CONTENTS_INFOBAR_ADDED, + registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, tc_source); - registrar_.Add(this, NotificationType::TAB_CONTENTS_INFOBAR_REMOVED, + registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, tc_source); - registrar_.Add(this, NotificationType::TAB_CONTENTS_INFOBAR_REPLACED, + registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REPLACED, tc_source); for (size_t i = 0; i < tab_contents_->infobar_count(); ++i) { @@ -120,24 +121,24 @@ void InfoBarContainer::RemoveAllInfoBarsForDestruction() { ChangeTabContents(NULL); } -void InfoBarContainer::Observe(NotificationType type, +void InfoBarContainer::Observe(int type, const NotificationSource& source, const NotificationDetails& details) { - switch (type.value) { - case NotificationType::TAB_CONTENTS_INFOBAR_ADDED: + switch (type) { + case chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED: AddInfoBar( Details<InfoBarAddedDetails>(details)->CreateInfoBar(tab_contents_), infobars_.size(), true, WANT_CALLBACK); break; - case NotificationType::TAB_CONTENTS_INFOBAR_REMOVED: { + case chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED: { InfoBarRemovedDetails* removed_details = Details<InfoBarRemovedDetails>(details).ptr(); RemoveInfoBar(removed_details->first, removed_details->second); break; } - case NotificationType::TAB_CONTENTS_INFOBAR_REPLACED: { + case chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REPLACED: { InfoBarReplacedDetails* replaced_details = Details<InfoBarReplacedDetails>(details).ptr(); AddInfoBar(replaced_details->second->CreateInfoBar(tab_contents_), |