| 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 UI_AURA_DISPLAY_MANAGER_H_ | 5 #ifndef UI_AURA_DISPLAY_MANAGER_H_ |
| 6 #define UI_AURA_DISPLAY_MANAGER_H_ | 6 #define UI_AURA_DISPLAY_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 const Window* window) const = 0; | 77 const Window* window) const = 0; |
| 78 | 78 |
| 79 // Returns the display object nearest given |point|. | 79 // Returns the display object nearest given |point|. |
| 80 virtual const gfx::Display& GetDisplayNearestPoint( | 80 virtual const gfx::Display& GetDisplayNearestPoint( |
| 81 const gfx::Point& point) const = 0; | 81 const gfx::Point& point) const = 0; |
| 82 | 82 |
| 83 // Returns the display that most closely intersects |match_rect|. | 83 // Returns the display that most closely intersects |match_rect|. |
| 84 virtual const gfx::Display& GetDisplayMatching( | 84 virtual const gfx::Display& GetDisplayMatching( |
| 85 const gfx::Rect& match_rect) const = 0; | 85 const gfx::Rect& match_rect) const = 0; |
| 86 | 86 |
| 87 // Returns the human-readable name for the display specified by |index|. |
| 88 virtual std::string GetDisplayNameAt(size_t index) = 0; |
| 89 |
| 87 protected: | 90 protected: |
| 88 // Calls observers' OnDisplayBoundsChanged methods. | 91 // Calls observers' OnDisplayBoundsChanged methods. |
| 89 void NotifyBoundsChanged(const gfx::Display& display); | 92 void NotifyBoundsChanged(const gfx::Display& display); |
| 90 void NotifyDisplayAdded(const gfx::Display& display); | 93 void NotifyDisplayAdded(const gfx::Display& display); |
| 91 void NotifyDisplayRemoved(const gfx::Display& display); | 94 void NotifyDisplayRemoved(const gfx::Display& display); |
| 92 | 95 |
| 93 private: | 96 private: |
| 94 // If set before the RootWindow is created, the host window will cover the | 97 // If set before the RootWindow is created, the host window will cover the |
| 95 // entire display. Note that this can still be overridden via the | 98 // entire display. Note that this can still be overridden via the |
| 96 // switches::kAuraHostWindowSize flag. | 99 // switches::kAuraHostWindowSize flag. |
| 97 static bool use_fullscreen_host_window_; | 100 static bool use_fullscreen_host_window_; |
| 98 | 101 |
| 99 ObserverList<DisplayObserver> observers_; | 102 ObserverList<DisplayObserver> observers_; |
| 100 DISALLOW_COPY_AND_ASSIGN(DisplayManager); | 103 DISALLOW_COPY_AND_ASSIGN(DisplayManager); |
| 101 }; | 104 }; |
| 102 | 105 |
| 103 } // namespace aura | 106 } // namespace aura |
| 104 | 107 |
| 105 #endif // UI_AURA_DISPLAY_MANAGER_H_ | 108 #endif // UI_AURA_DISPLAY_MANAGER_H_ |
| OLD | NEW |