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_DISPLAY_MULTI_DISPLAY_MANAGER_H_ | 5 #ifndef ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_ |
6 #define ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_ | 6 #define ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 const gfx::Display& display) OVERRIDE; | 52 const gfx::Display& display) OVERRIDE; |
53 virtual gfx::Display* GetDisplayAt(size_t index) OVERRIDE; | 53 virtual gfx::Display* GetDisplayAt(size_t index) OVERRIDE; |
54 | 54 |
55 virtual size_t GetNumDisplays() const OVERRIDE; | 55 virtual size_t GetNumDisplays() const OVERRIDE; |
56 virtual const gfx::Display& GetDisplayNearestPoint( | 56 virtual const gfx::Display& GetDisplayNearestPoint( |
57 const gfx::Point& point) const OVERRIDE; | 57 const gfx::Point& point) const OVERRIDE; |
58 virtual const gfx::Display& GetDisplayNearestWindow( | 58 virtual const gfx::Display& GetDisplayNearestWindow( |
59 const aura::Window* window) const OVERRIDE; | 59 const aura::Window* window) const OVERRIDE; |
60 virtual const gfx::Display& GetDisplayMatching( | 60 virtual const gfx::Display& GetDisplayMatching( |
61 const gfx::Rect& match_rect)const OVERRIDE; | 61 const gfx::Rect& match_rect)const OVERRIDE; |
| 62 virtual std::string GetDisplayNameAt(size_t index) OVERRIDE; |
62 | 63 |
63 // RootWindowObserver overrides: | 64 // RootWindowObserver overrides: |
64 virtual void OnRootWindowResized(const aura::RootWindow* root, | 65 virtual void OnRootWindowResized(const aura::RootWindow* root, |
65 const gfx::Size& new_size) OVERRIDE; | 66 const gfx::Size& new_size) OVERRIDE; |
66 | 67 |
67 private: | 68 private: |
68 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, ConvertPoint); | 69 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, ConvertPoint); |
69 typedef std::vector<gfx::Display> Displays; | 70 typedef std::vector<gfx::Display> Displays; |
70 | 71 |
71 void Init(); | 72 void Init(); |
72 void AddRemoveDisplayImpl(); | 73 void AddRemoveDisplayImpl(); |
73 void CycleDisplayImpl(); | 74 void CycleDisplayImpl(); |
74 void ScaleDisplayImpl(); | 75 void ScaleDisplayImpl(); |
75 gfx::Display& FindDisplayForRootWindow(const aura::RootWindow* root); | 76 gfx::Display& FindDisplayForRootWindow(const aura::RootWindow* root); |
76 | 77 |
77 // Refer to |aura::DisplayManager::CreateDisplayFromSpec| API for | 78 // Refer to |aura::DisplayManager::CreateDisplayFromSpec| API for |
78 // the format of |spec|. | 79 // the format of |spec|. |
79 void AddDisplayFromSpec(const std::string& spec); | 80 void AddDisplayFromSpec(const std::string& spec); |
80 | 81 |
81 Displays displays_; | 82 Displays displays_; |
82 | 83 |
83 DISALLOW_COPY_AND_ASSIGN(MultiDisplayManager); | 84 DISALLOW_COPY_AND_ASSIGN(MultiDisplayManager); |
84 }; | 85 }; |
85 | 86 |
86 extern const aura::WindowProperty<int>* const kDisplayIdKey; | 87 extern const aura::WindowProperty<int64>* const kDisplayIdKey; |
87 | 88 |
88 } // namespace internal | 89 } // namespace internal |
89 } // namespace ash | 90 } // namespace ash |
90 | 91 |
91 #endif // ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_ | 92 #endif // ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_ |
OLD | NEW |