summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/automation_tab_tracker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/automation/automation_tab_tracker.cc')
-rw-r--r--chrome/browser/automation/automation_tab_tracker.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/chrome/browser/automation/automation_tab_tracker.cc b/chrome/browser/automation/automation_tab_tracker.cc
index 81ed183..d8ed59a 100644
--- a/chrome/browser/automation/automation_tab_tracker.cc
+++ b/chrome/browser/automation/automation_tab_tracker.cc
@@ -5,8 +5,8 @@
#include "chrome/browser/automation/automation_tab_tracker.h"
#include "content/browser/tab_contents/navigation_controller.h"
+#include "chrome/common/chrome_notification_types.h"
#include "content/common/notification_source.h"
-#include "content/common/notification_type.h"
AutomationTabTracker::AutomationTabTracker(IPC::Message::Sender* automation)
: AutomationResourceTracker<NavigationController*>(automation) {
@@ -18,35 +18,35 @@ AutomationTabTracker::~AutomationTabTracker() {
void AutomationTabTracker::AddObserver(NavigationController* resource) {
// This tab could either be a regular tab or an external tab
// Register for both notifications.
- registrar_.Add(this, NotificationType::TAB_CLOSING,
+ registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING,
Source<NavigationController>(resource));
- registrar_.Add(this, NotificationType::EXTERNAL_TAB_CLOSED,
+ registrar_.Add(this, chrome::NOTIFICATION_EXTERNAL_TAB_CLOSED,
Source<NavigationController>(resource));
// We also want to know about navigations so we can keep track of the last
// navigation time.
- registrar_.Add(this, NotificationType::LOAD_STOP,
+ registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
Source<NavigationController>(resource));
}
void AutomationTabTracker::RemoveObserver(NavigationController* resource) {
- registrar_.Remove(this, NotificationType::TAB_CLOSING,
+ registrar_.Remove(this, content::NOTIFICATION_TAB_CLOSING,
Source<NavigationController>(resource));
- registrar_.Remove(this, NotificationType::EXTERNAL_TAB_CLOSED,
+ registrar_.Remove(this, chrome::NOTIFICATION_EXTERNAL_TAB_CLOSED,
Source<NavigationController>(resource));
- registrar_.Remove(this, NotificationType::LOAD_STOP,
+ registrar_.Remove(this, content::NOTIFICATION_LOAD_STOP,
Source<NavigationController>(resource));
}
-void AutomationTabTracker::Observe(NotificationType type,
+void AutomationTabTracker::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- switch (type.value) {
- case NotificationType::LOAD_STOP:
+ switch (type) {
+ case content::NOTIFICATION_LOAD_STOP:
last_navigation_times_[Source<NavigationController>(source).ptr()] =
base::Time::Now();
return;
- case NotificationType::EXTERNAL_TAB_CLOSED:
- case NotificationType::TAB_CLOSING:
+ case chrome::NOTIFICATION_EXTERNAL_TAB_CLOSED:
+ case content::NOTIFICATION_TAB_CLOSING:
{
std::map<NavigationController*, base::Time>::iterator iter =
last_navigation_times_.find(