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_MULTI_MONITOR_MANAGER_H_ | 5 #ifndef ASH_MONITOR_MULTI_MONITOR_MANAGER_H_ |
6 #define ASH_MONITOR_MULTI_MONITOR_MANAGER_H_ | 6 #define ASH_MONITOR_MULTI_MONITOR_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 MultiMonitorManager(); | 28 MultiMonitorManager(); |
29 virtual ~MultiMonitorManager(); | 29 virtual ~MultiMonitorManager(); |
30 | 30 |
31 // Used to emulate monitor change when run in a desktop environment instead | 31 // Used to emulate monitor change when run in a desktop environment instead |
32 // of on a device. | 32 // of on a device. |
33 static void AddRemoveMonitor(); | 33 static void AddRemoveMonitor(); |
34 static void CycleMonitor(); | 34 static void CycleMonitor(); |
35 | 35 |
36 // MonitorManager overrides: | 36 // MonitorManager overrides: |
37 virtual void OnNativeMonitorsChanged( | 37 virtual void OnNativeMonitorsChanged( |
38 const std::vector<const aura::Monitor*>& monitors) OVERRIDE; | 38 const std::vector<const aura::MonitorAura*>& monitors) OVERRIDE; |
39 virtual aura::RootWindow* CreateRootWindowForMonitor( | 39 virtual aura::RootWindow* CreateRootWindowForMonitor( |
40 aura::Monitor* monitor) OVERRIDE; | 40 aura::MonitorAura* monitor) OVERRIDE; |
41 virtual const aura::Monitor* GetMonitorNearestWindow( | 41 virtual aura::MonitorAura* GetMonitorAt(size_t index) OVERRIDE; |
| 42 |
| 43 virtual size_t GetNumMonitors() const OVERRIDE; |
| 44 virtual const aura::MonitorAura* GetMonitorNearestWindow( |
42 const aura::Window* window) const OVERRIDE; | 45 const aura::Window* window) const OVERRIDE; |
43 virtual const aura::Monitor* GetMonitorNearestPoint( | 46 virtual const aura::MonitorAura* GetMonitorNearestPoint( |
44 const gfx::Point& point) const OVERRIDE; | 47 const gfx::Point& point) const OVERRIDE; |
45 virtual aura::Monitor* GetMonitorAt(size_t index) OVERRIDE; | 48 virtual aura::MonitorAura* GetMonitorNearestWindow( |
46 virtual size_t GetNumMonitors() const OVERRIDE; | |
47 virtual aura::Monitor* GetMonitorNearestWindow( | |
48 const aura::Window* window) OVERRIDE; | 49 const aura::Window* window) OVERRIDE; |
49 | 50 |
50 // RootWindowObserver overrides: | 51 // RootWindowObserver overrides: |
51 virtual void OnRootWindowResized(const aura::RootWindow* root, | 52 virtual void OnRootWindowResized(const aura::RootWindow* root, |
52 const gfx::Size& new_size) OVERRIDE; | 53 const gfx::Size& new_size) OVERRIDE; |
53 | 54 |
54 private: | 55 private: |
55 typedef std::vector<aura::Monitor*> Monitors; | 56 typedef std::vector<aura::MonitorAura*> Monitors; |
56 | 57 |
57 void Init(); | 58 void Init(); |
58 void AddRemoveMonitorImpl(); | 59 void AddRemoveMonitorImpl(); |
59 void CycleMonitorImpl(); | 60 void CycleMonitorImpl(); |
60 | 61 |
61 Monitors monitors_; | 62 Monitors monitors_; |
62 | 63 |
63 DISALLOW_COPY_AND_ASSIGN(MultiMonitorManager); | 64 DISALLOW_COPY_AND_ASSIGN(MultiMonitorManager); |
64 }; | 65 }; |
65 | 66 |
66 extern const aura::WindowProperty<aura::Monitor*>* const kMonitorKey; | 67 extern const aura::WindowProperty<aura::MonitorAura*>* const kMonitorKey; |
67 | 68 |
68 } // namespace internal | 69 } // namespace internal |
69 } // namespace ash | 70 } // namespace ash |
70 | 71 |
71 #endif // ASH_MONITOR_MULTI_MONITOR_MANAGER_H_ | 72 #endif // ASH_MONITOR_MULTI_MONITOR_MANAGER_H_ |
OLD | NEW |