summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/automation_tab_tracker.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-04 17:07:50 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-04 17:07:50 +0000
commitc5eed4976490f601ad01f36e102260744c673b2d (patch)
tree64fb05d9ecf101bf0dc4460ecd26b56637b4e8d7 /chrome/browser/automation/automation_tab_tracker.cc
parent8c64d197edc97f4cd646cff55a21af0b4733b942 (diff)
downloadchromium_src-c5eed4976490f601ad01f36e102260744c673b2d.zip
chromium_src-c5eed4976490f601ad01f36e102260744c673b2d.tar.gz
chromium_src-c5eed4976490f601ad01f36e102260744c673b2d.tar.bz2
Get rid of content::NavigationController in cc file and use "using" instead.
BUG=98716 TBR=joi Review URL: http://codereview.chromium.org/8983012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116328 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/automation_tab_tracker.cc')
-rw-r--r--chrome/browser/automation/automation_tab_tracker.cc34
1 files changed, 17 insertions, 17 deletions
diff --git a/chrome/browser/automation/automation_tab_tracker.cc b/chrome/browser/automation/automation_tab_tracker.cc
index 4d6c09a..7f7e2cc 100644
--- a/chrome/browser/automation/automation_tab_tracker.cc
+++ b/chrome/browser/automation/automation_tab_tracker.cc
@@ -8,35 +8,35 @@
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_source.h"
+using content::NavigationController;
+
AutomationTabTracker::AutomationTabTracker(IPC::Message::Sender* automation)
- : AutomationResourceTracker<content::NavigationController*>(automation) {
+ : AutomationResourceTracker<NavigationController*>(automation) {
}
AutomationTabTracker::~AutomationTabTracker() {
}
-void AutomationTabTracker::AddObserver(
- content::NavigationController* resource) {
+void AutomationTabTracker::AddObserver(NavigationController* resource) {
// This tab could either be a regular tab or an external tab
// Register for both notifications.
registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING,
- content::Source<content::NavigationController>(resource));
+ content::Source<NavigationController>(resource));
registrar_.Add(this, chrome::NOTIFICATION_EXTERNAL_TAB_CLOSED,
- content::Source<content::NavigationController>(resource));
+ content::Source<NavigationController>(resource));
// We also want to know about navigations so we can keep track of the last
// navigation time.
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
- content::Source<content::NavigationController>(resource));
+ content::Source<NavigationController>(resource));
}
-void AutomationTabTracker::RemoveObserver(
- content::NavigationController* resource) {
+void AutomationTabTracker::RemoveObserver(NavigationController* resource) {
registrar_.Remove(this, content::NOTIFICATION_TAB_CLOSING,
- content::Source<content::NavigationController>(resource));
+ content::Source<NavigationController>(resource));
registrar_.Remove(this, chrome::NOTIFICATION_EXTERNAL_TAB_CLOSED,
- content::Source<content::NavigationController>(resource));
+ content::Source<NavigationController>(resource));
registrar_.Remove(this, content::NOTIFICATION_LOAD_STOP,
- content::Source<content::NavigationController>(resource));
+ content::Source<NavigationController>(resource));
}
void AutomationTabTracker::Observe(
@@ -46,15 +46,15 @@ void AutomationTabTracker::Observe(
switch (type) {
case content::NOTIFICATION_LOAD_STOP:
last_navigation_times_[
- content::Source<content::NavigationController>(source).ptr()] =
+ content::Source<NavigationController>(source).ptr()] =
base::Time::Now();
return;
case chrome::NOTIFICATION_EXTERNAL_TAB_CLOSED:
case content::NOTIFICATION_TAB_CLOSING:
{
- std::map<content::NavigationController*, base::Time>::iterator iter =
+ std::map<NavigationController*, base::Time>::iterator iter =
last_navigation_times_.find(
- content::Source<content::NavigationController>(source).ptr());
+ content::Source<NavigationController>(source).ptr());
if (iter != last_navigation_times_.end())
last_navigation_times_.erase(iter);
}
@@ -62,15 +62,15 @@ void AutomationTabTracker::Observe(
default:
NOTREACHED();
}
- AutomationResourceTracker<content::NavigationController*>::Observe(
+ AutomationResourceTracker<NavigationController*>::Observe(
type, source, details);
}
base::Time AutomationTabTracker::GetLastNavigationTime(int handle) {
if (ContainsHandle(handle)) {
- content::NavigationController* controller = GetResource(handle);
+ NavigationController* controller = GetResource(handle);
if (controller) {
- std::map<content::NavigationController*, base::Time>::const_iterator iter
+ std::map<NavigationController*, base::Time>::const_iterator iter
= last_navigation_times_.find(controller);
if (iter != last_navigation_times_.end())
return iter->second;