OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef ASH_MONITOR_MULTI_MONITOR_MANAGER_H_ | |
6 #define ASH_MONITOR_MULTI_MONITOR_MANAGER_H_ | |
7 #pragma once | |
8 | |
9 #include "base/compiler_specific.h" | |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "ui/aura/monitor_manager.h" | |
12 #include "ui/aura/window.h" | |
13 #include "ui/aura/window_observer.h" | |
14 | |
15 namespace ash { | |
16 namespace internal { | |
17 | |
18 class MultiMonitorManager : public aura::MonitorManager, | |
19 public aura::WindowObserver { | |
20 public: | |
21 MultiMonitorManager(); | |
22 virtual ~MultiMonitorManager(); | |
23 | |
24 // MonitorManager overrides: | |
25 virtual void OnNativeMonitorResized(const gfx::Size& size); | |
26 virtual aura::RootWindow* CreateRootWindowForMonitor( | |
27 aura::Monitor* monitor) OVERRIDE; | |
28 virtual const aura::Monitor* GetMonitorNearestWindow( | |
29 const aura::Window* window) const OVERRIDE; | |
30 virtual const aura::Monitor* GetMonitorNearestPoint( | |
31 const gfx::Point& point) const OVERRIDE; | |
32 virtual aura::Monitor* GetMonitorAt(size_t index) OVERRIDE; | |
33 virtual size_t GetNumMonitors() const OVERRIDE; | |
34 virtual aura::Monitor* GetMonitorNearestWindow( | |
35 const aura::Window* window) OVERRIDE; | |
36 | |
37 // WindowObserver overrides: | |
38 virtual void OnWindowBoundsChanged(aura::Window* window, | |
39 const gfx::Rect& bounds) OVERRIDE; | |
40 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; | |
41 | |
42 private: | |
43 void Init(); | |
44 | |
45 typedef std::vector<aura::Monitor*> Monitors; | |
Ben Goodger (Google)
2012/03/20 17:09:02
typedefs go at the start of the section
oshima
2012/03/20 19:26:36
Done.
| |
46 Monitors monitors_; | |
47 | |
48 DISALLOW_COPY_AND_ASSIGN(MultiMonitorManager); | |
49 }; | |
50 | |
51 extern const aura::WindowProperty<aura::Monitor*>* const kMonitorKey; | |
52 | |
53 } // namespace internal | |
54 } // namespace ash | |
55 | |
56 #endif // ASH_MONITOR_MULTI_MONITOR_MANAGER_H_ | |
OLD | NEW |