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_DISPLAY_CONTROLLER_H_ | 5 #ifndef ASH_DISPLAY_DISPLAY_CONTROLLER_H_ |
6 #define ASH_DISPLAY_DISPLAY_CONTROLLER_H_ | 6 #define ASH_DISPLAY_DISPLAY_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // have been applied. | 87 // have been applied. |
88 virtual void OnDisplayConfigurationChanged() {}; | 88 virtual void OnDisplayConfigurationChanged() {}; |
89 | 89 |
90 protected: | 90 protected: |
91 virtual ~Observer() {} | 91 virtual ~Observer() {} |
92 }; | 92 }; |
93 | 93 |
94 DisplayController(); | 94 DisplayController(); |
95 virtual ~DisplayController(); | 95 virtual ~DisplayController(); |
96 | 96 |
| 97 void Start(); |
97 void Shutdown(); | 98 void Shutdown(); |
98 | 99 |
99 // Returns primary display. This is safe to use after ash::Shell is | 100 // Returns primary display. This is safe to use after ash::Shell is |
100 // deleted. | 101 // deleted. |
101 static const gfx::Display& GetPrimaryDisplay(); | 102 static const gfx::Display& GetPrimaryDisplay(); |
102 | 103 |
103 // Returns the number of display. This is safe to use after | 104 // Returns the number of display. This is safe to use after |
104 // ash::Shell is deleted. | 105 // ash::Shell is deleted. |
105 static int GetNumDisplays(); | 106 static int GetNumDisplays(); |
106 | 107 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 160 |
160 const DisplayLayout& default_display_layout() const { | 161 const DisplayLayout& default_display_layout() const { |
161 return default_display_layout_; | 162 return default_display_layout_; |
162 } | 163 } |
163 void SetDefaultDisplayLayout(const DisplayLayout& layout); | 164 void SetDefaultDisplayLayout(const DisplayLayout& layout); |
164 | 165 |
165 // Registeres the display layout info for the specified display(s). | 166 // Registeres the display layout info for the specified display(s). |
166 void RegisterLayoutForDisplayIdPair(int64 id1, | 167 void RegisterLayoutForDisplayIdPair(int64 id1, |
167 int64 id2, | 168 int64 id2, |
168 const DisplayLayout& layout); | 169 const DisplayLayout& layout); |
| 170 // OBSOLETE |
169 void RegisterLayoutForDisplayId(int64 id, const DisplayLayout& layout); | 171 void RegisterLayoutForDisplayId(int64 id, const DisplayLayout& layout); |
170 | 172 |
171 // Sets the layout for the current display pair. The |layout| specifies | 173 // Sets the layout for the current display pair. The |layout| specifies |
172 // the locaion of the secondary display relative to the primary. | 174 // the locaion of the secondary display relative to the primary. |
173 void SetLayoutForCurrentDisplays(const DisplayLayout& layout); | 175 void SetLayoutForCurrentDisplays(const DisplayLayout& layout); |
174 | 176 |
175 // Returns the display layout used for current displays. | 177 // Returns the display layout used for current displays. |
176 DisplayLayout GetCurrentDisplayLayout() const; | 178 DisplayLayout GetCurrentDisplayLayout() const; |
177 | 179 |
178 // Returns the current display pair. | 180 // Returns the current display pair. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 // Store the primary root window temporarily while replacing | 253 // Store the primary root window temporarily while replacing |
252 // display. | 254 // display. |
253 aura::RootWindow* primary_root_window_for_replace_; | 255 aura::RootWindow* primary_root_window_for_replace_; |
254 | 256 |
255 DISALLOW_COPY_AND_ASSIGN(DisplayController); | 257 DISALLOW_COPY_AND_ASSIGN(DisplayController); |
256 }; | 258 }; |
257 | 259 |
258 } // namespace ash | 260 } // namespace ash |
259 | 261 |
260 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ | 262 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ |
OLD | NEW |