| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/tab_contents/navigation_controller.h" | |
| 8 #include "chrome/common/chrome_notification_types.h" | 7 #include "chrome/common/chrome_notification_types.h" |
| 8 #include "content/public/browser/navigation_controller.h" |
| 9 #include "content/public/browser/notification_source.h" | 9 #include "content/public/browser/notification_source.h" |
| 10 | 10 |
| 11 AutomationTabTracker::AutomationTabTracker(IPC::Message::Sender* automation) | 11 AutomationTabTracker::AutomationTabTracker(IPC::Message::Sender* automation) |
| 12 : AutomationResourceTracker<content::NavigationController*>(automation) { | 12 : AutomationResourceTracker<content::NavigationController*>(automation) { |
| 13 } | 13 } |
| 14 | 14 |
| 15 AutomationTabTracker::~AutomationTabTracker() { | 15 AutomationTabTracker::~AutomationTabTracker() { |
| 16 } | 16 } |
| 17 | 17 |
| 18 void AutomationTabTracker::AddObserver( | 18 void AutomationTabTracker::AddObserver( |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 content::NavigationController* controller = GetResource(handle); | 71 content::NavigationController* controller = GetResource(handle); |
| 72 if (controller) { | 72 if (controller) { |
| 73 std::map<content::NavigationController*, base::Time>::const_iterator iter | 73 std::map<content::NavigationController*, base::Time>::const_iterator iter |
| 74 = last_navigation_times_.find(controller); | 74 = last_navigation_times_.find(controller); |
| 75 if (iter != last_navigation_times_.end()) | 75 if (iter != last_navigation_times_.end()) |
| 76 return iter->second; | 76 return iter->second; |
| 77 } | 77 } |
| 78 } | 78 } |
| 79 return base::Time(); | 79 return base::Time(); |
| 80 } | 80 } |
| OLD | NEW |