OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/automation/automation_tab_tracker.h" | 5 #include "chrome/browser/automation/automation_tab_tracker.h" |
6 | 6 |
7 #include "chrome/browser/tab_contents/navigation_controller.h" | |
8 #include "chrome/common/notification_type.h" | 7 #include "chrome/common/notification_type.h" |
9 #include "chrome/common/notification_source.h" | 8 #include "chrome/common/notification_source.h" |
| 9 #include "content/browser/tab_contents/navigation_controller.h" |
10 | 10 |
11 AutomationTabTracker::AutomationTabTracker(IPC::Message::Sender* automation) | 11 AutomationTabTracker::AutomationTabTracker(IPC::Message::Sender* automation) |
12 : AutomationResourceTracker<NavigationController*>(automation) { | 12 : AutomationResourceTracker<NavigationController*>(automation) { |
13 } | 13 } |
14 | 14 |
15 AutomationTabTracker::~AutomationTabTracker() { | 15 AutomationTabTracker::~AutomationTabTracker() { |
16 } | 16 } |
17 | 17 |
18 void AutomationTabTracker::AddObserver(NavigationController* resource) { | 18 void AutomationTabTracker::AddObserver(NavigationController* resource) { |
19 // This tab could either be a regular tab or an external tab | 19 // This tab could either be a regular tab or an external tab |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 NavigationController* controller = GetResource(handle); | 67 NavigationController* controller = GetResource(handle); |
68 if (controller) { | 68 if (controller) { |
69 std::map<NavigationController*, base::Time>::const_iterator iter = | 69 std::map<NavigationController*, base::Time>::const_iterator iter = |
70 last_navigation_times_.find(controller); | 70 last_navigation_times_.find(controller); |
71 if (iter != last_navigation_times_.end()) | 71 if (iter != last_navigation_times_.end()) |
72 return iter->second; | 72 return iter->second; |
73 } | 73 } |
74 } | 74 } |
75 return base::Time(); | 75 return base::Time(); |
76 } | 76 } |
OLD | NEW |