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_window_tracker.h" | 5 #include "chrome/browser/automation/automation_window_tracker.h" |
6 | 6 |
| 7 #include "chrome/common/chrome_notification_types.h" |
7 #include "chrome/common/native_window_notification_source.h" | 8 #include "chrome/common/native_window_notification_source.h" |
8 | 9 |
9 AutomationWindowTracker::AutomationWindowTracker( | 10 AutomationWindowTracker::AutomationWindowTracker( |
10 IPC::Message::Sender* automation) | 11 IPC::Message::Sender* automation) |
11 : AutomationResourceTracker<gfx::NativeWindow>(automation) { | 12 : AutomationResourceTracker<gfx::NativeWindow>(automation) { |
12 } | 13 } |
13 | 14 |
14 AutomationWindowTracker::~AutomationWindowTracker() { | 15 AutomationWindowTracker::~AutomationWindowTracker() { |
15 } | 16 } |
16 | 17 |
17 void AutomationWindowTracker::AddObserver(gfx::NativeWindow resource) { | 18 void AutomationWindowTracker::AddObserver(gfx::NativeWindow resource) { |
18 registrar_.Add(this, NotificationType::WINDOW_CLOSED, | 19 registrar_.Add(this, chrome::NOTIFICATION_WINDOW_CLOSED, |
19 Source<gfx::NativeWindow>(resource)); | 20 Source<gfx::NativeWindow>(resource)); |
20 } | 21 } |
21 | 22 |
22 void AutomationWindowTracker::RemoveObserver(gfx::NativeWindow resource) { | 23 void AutomationWindowTracker::RemoveObserver(gfx::NativeWindow resource) { |
23 registrar_.Remove(this, NotificationType::WINDOW_CLOSED, | 24 registrar_.Remove(this, chrome::NOTIFICATION_WINDOW_CLOSED, |
24 Source<gfx::NativeWindow>(resource)); | 25 Source<gfx::NativeWindow>(resource)); |
25 } | 26 } |
OLD | NEW |