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_browser_tracker.h" | 5 #include "chrome/browser/automation/automation_browser_tracker.h" |
6 | 6 |
| 7 #include "chrome/common/chrome_notification_types.h" |
7 #include "content/common/notification_source.h" | 8 #include "content/common/notification_source.h" |
8 | 9 |
9 AutomationBrowserTracker::AutomationBrowserTracker( | 10 AutomationBrowserTracker::AutomationBrowserTracker( |
10 IPC::Message::Sender* automation) | 11 IPC::Message::Sender* automation) |
11 : AutomationResourceTracker<Browser*>(automation) { | 12 : AutomationResourceTracker<Browser*>(automation) { |
12 } | 13 } |
13 | 14 |
14 AutomationBrowserTracker::~AutomationBrowserTracker() {} | 15 AutomationBrowserTracker::~AutomationBrowserTracker() {} |
15 | 16 |
16 void AutomationBrowserTracker::AddObserver(Browser* resource) { | 17 void AutomationBrowserTracker::AddObserver(Browser* resource) { |
17 registrar_.Add(this, NotificationType::BROWSER_CLOSED, | 18 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSED, |
18 Source<Browser>(resource)); | 19 Source<Browser>(resource)); |
19 } | 20 } |
20 | 21 |
21 void AutomationBrowserTracker::RemoveObserver(Browser* resource) { | 22 void AutomationBrowserTracker::RemoveObserver(Browser* resource) { |
22 registrar_.Remove(this, NotificationType::BROWSER_CLOSED, | 23 registrar_.Remove(this, chrome::NOTIFICATION_BROWSER_CLOSED, |
23 Source<Browser>(resource)); | 24 Source<Browser>(resource)); |
24 } | 25 } |
OLD | NEW |