summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/infobars
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/views/infobars')
-rw-r--r--chrome/browser/views/infobars/infobar_container.cc15
-rw-r--r--chrome/browser/views/infobars/infobar_container.h2
2 files changed, 8 insertions, 9 deletions
diff --git a/chrome/browser/views/infobars/infobar_container.cc b/chrome/browser/views/infobars/infobar_container.cc
index d3d007f..35d7f7a 100644
--- a/chrome/browser/views/infobars/infobar_container.cc
+++ b/chrome/browser/views/infobars/infobar_container.cc
@@ -8,14 +8,13 @@
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/views/frame/browser_view.h"
#include "chrome/browser/views/infobars/infobars.h"
-#include "chrome/common/notification_types.h"
+#include "chrome/common/notification_service.h"
// InfoBarContainer, public: ---------------------------------------------------
InfoBarContainer::InfoBarContainer(BrowserView* browser_view)
: browser_view_(browser_view),
tab_contents_(NULL) {
-
}
InfoBarContainer::~InfoBarContainer() {
@@ -29,10 +28,10 @@ InfoBarContainer::~InfoBarContainer() {
void InfoBarContainer::ChangeTabContents(TabContents* contents) {
if (tab_contents_) {
NotificationService::current()->RemoveObserver(
- this, NOTIFY_TAB_CONTENTS_INFOBAR_ADDED,
+ this, NotificationType::TAB_CONTENTS_INFOBAR_ADDED,
Source<TabContents>(tab_contents_));
NotificationService::current()->RemoveObserver(
- this, NOTIFY_TAB_CONTENTS_INFOBAR_REMOVED,
+ this, NotificationType::TAB_CONTENTS_INFOBAR_REMOVED,
Source<TabContents>(tab_contents_));
}
// No need to delete the child views here, their removal from the view
@@ -42,10 +41,10 @@ void InfoBarContainer::ChangeTabContents(TabContents* contents) {
if (tab_contents_) {
UpdateInfoBars();
NotificationService::current()->AddObserver(
- this, NOTIFY_TAB_CONTENTS_INFOBAR_ADDED,
+ this, NotificationType::TAB_CONTENTS_INFOBAR_ADDED,
Source<TabContents>(tab_contents_));
NotificationService::current()->AddObserver(
- this, NOTIFY_TAB_CONTENTS_INFOBAR_REMOVED,
+ this, NotificationType::TAB_CONTENTS_INFOBAR_REMOVED,
Source<TabContents>(tab_contents_));
}
}
@@ -96,9 +95,9 @@ void InfoBarContainer::ViewHierarchyChanged(bool is_add,
void InfoBarContainer::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type == NOTIFY_TAB_CONTENTS_INFOBAR_ADDED) {
+ if (type == NotificationType::TAB_CONTENTS_INFOBAR_ADDED) {
AddInfoBar(Details<InfoBarDelegate>(details).ptr());
- } else if (type == NOTIFY_TAB_CONTENTS_INFOBAR_REMOVED) {
+ } else if (type == NotificationType::TAB_CONTENTS_INFOBAR_REMOVED) {
RemoveInfoBar(Details<InfoBarDelegate>(details).ptr());
} else {
NOTREACHED();
diff --git a/chrome/browser/views/infobars/infobar_container.h b/chrome/browser/views/infobars/infobar_container.h
index 43c5280..181d95e 100644
--- a/chrome/browser/views/infobars/infobar_container.h
+++ b/chrome/browser/views/infobars/infobar_container.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_VIEWS_INFOBARS_INFOBAR_CONTAINER_H_
#define CHROME_BROWSER_VIEWS_INFOBARS_INFOBAR_CONTAINER_H_
-#include "chrome/common/notification_service.h"
+#include "chrome/common/notification_observer.h"
#include "chrome/views/view.h"
class BrowserView;