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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 184 |
185 // Returns the display layout used for current displays. | 185 // Returns the display layout used for current displays. |
186 DisplayLayout GetCurrentDisplayLayout() const; | 186 DisplayLayout GetCurrentDisplayLayout() const; |
187 | 187 |
188 // Returns the current display pair. | 188 // Returns the current display pair. |
189 DisplayIdPair GetCurrentDisplayIdPair() const; | 189 DisplayIdPair GetCurrentDisplayIdPair() const; |
190 | 190 |
191 // Returns the display layout registered for the given display id |pair|. | 191 // Returns the display layout registered for the given display id |pair|. |
192 DisplayLayout GetRegisteredDisplayLayout(const DisplayIdPair& pair) const; | 192 DisplayLayout GetRegisteredDisplayLayout(const DisplayIdPair& pair) const; |
193 | 193 |
| 194 // Checks if the mouse pointer is on one of displays, and moves to |
| 195 // the center of the nearest display if it's outside of all displays. |
| 196 void EnsurePointerInDisplays(); |
| 197 |
| 198 gfx::Point GetNativeMouseCursorLocation() const; |
| 199 void UpdateMouseCursor(const gfx::Point& point_in_native); |
| 200 |
194 // aura::DisplayObserver overrides: | 201 // aura::DisplayObserver overrides: |
195 virtual void OnDisplayBoundsChanged( | 202 virtual void OnDisplayBoundsChanged( |
196 const gfx::Display& display) OVERRIDE; | 203 const gfx::Display& display) OVERRIDE; |
197 virtual void OnDisplayAdded(const gfx::Display& display) OVERRIDE; | 204 virtual void OnDisplayAdded(const gfx::Display& display) OVERRIDE; |
198 virtual void OnDisplayRemoved(const gfx::Display& display) OVERRIDE; | 205 virtual void OnDisplayRemoved(const gfx::Display& display) OVERRIDE; |
199 | 206 |
200 private: | 207 private: |
201 friend class internal::DisplayManager; | 208 friend class internal::DisplayManager; |
202 | 209 |
203 // Create a root window for given |display|. | 210 // Create a root window for given |display|. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 // Store the primary root window temporarily while replacing | 264 // Store the primary root window temporarily while replacing |
258 // display. | 265 // display. |
259 aura::RootWindow* primary_root_window_for_replace_; | 266 aura::RootWindow* primary_root_window_for_replace_; |
260 | 267 |
261 DISALLOW_COPY_AND_ASSIGN(DisplayController); | 268 DISALLOW_COPY_AND_ASSIGN(DisplayController); |
262 }; | 269 }; |
263 | 270 |
264 } // namespace ash | 271 } // namespace ash |
265 | 272 |
266 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ | 273 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ |
OLD | NEW |