Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5810)

Unified Diff: chrome/browser/tab_contents/infobar_container.cc

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/tab_contents/infobar_container.cc
===================================================================
--- chrome/browser/tab_contents/infobar_container.cc (revision 91968)
+++ chrome/browser/tab_contents/infobar_container.cc (working copy)
@@ -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 @@
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 @@
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_),
« no previous file with comments | « chrome/browser/tab_contents/infobar_container.h ('k') | chrome/browser/tab_contents/popup_menu_helper_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698