OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef ASH_MONITOR_MONITOR_CONTROLLER_H_ | 5 #ifndef ASH_MONITOR_MONITOR_CONTROLLER_H_ |
6 #define ASH_MONITOR_MONITOR_CONTROLLER_H_ | 6 #define ASH_MONITOR_MONITOR_CONTROLLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "ui/aura/monitor_manager.h" | 13 #include "ui/aura/monitor_manager.h" |
| 14 #include "ui/gfx/monitor_observer.h" |
14 | 15 |
15 namespace aura { | 16 namespace aura { |
16 class RootWindow; | 17 class RootWindow; |
17 } | 18 } |
18 | 19 |
19 namespace ash { | 20 namespace ash { |
20 namespace internal { | 21 namespace internal { |
21 | 22 |
22 // MonitorController creates and maintains RootWindows for each | 23 // MonitorController creates and maintains RootWindows for each |
23 // attached monitor, keeping them in sync with monitor configuration changes. | 24 // attached monitor, keeping them in sync with monitor configuration changes. |
24 class MonitorController : public aura::MonitorObserver { | 25 class MonitorController : public gfx::MonitorObserver { |
25 public: | 26 public: |
26 MonitorController(); | 27 MonitorController(); |
27 virtual ~MonitorController(); | 28 virtual ~MonitorController(); |
28 | 29 |
29 // aura::MonitorObserver overrides: | 30 // gfx::MonitorObserver overrides: |
30 virtual void OnMonitorBoundsChanged(const aura::Monitor* monitor) OVERRIDE; | 31 virtual void OnMonitorBoundsChanged(const gfx::Monitor* monitor) OVERRIDE; |
31 virtual void OnMonitorAdded(aura::Monitor* monitor) OVERRIDE; | 32 virtual void OnMonitorAdded(gfx::Monitor* monitor) OVERRIDE; |
32 virtual void OnMonitorRemoved(const aura::Monitor* monitor) OVERRIDE; | 33 virtual void OnMonitorRemoved(const gfx::Monitor* monitor) OVERRIDE; |
33 | 34 |
34 private: | 35 private: |
35 void Init(); | 36 void Init(); |
36 | 37 |
37 std::map<const aura::Monitor*, aura::RootWindow*> root_windows_; | 38 std::map<const gfx::Monitor*, aura::RootWindow*> root_windows_; |
38 | 39 |
39 DISALLOW_COPY_AND_ASSIGN(MonitorController); | 40 DISALLOW_COPY_AND_ASSIGN(MonitorController); |
40 }; | 41 }; |
41 | 42 |
42 } // namespace internal | 43 } // namespace internal |
43 } // namespace ash | 44 } // namespace ash |
44 | 45 |
45 #endif // ASH_MONITOR_MONITOR_CONTROLLER_H_ | 46 #endif // ASH_MONITOR_MONITOR_CONTROLLER_H_ |
OLD | NEW |