| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_ | 5 #ifndef COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_ |
| 6 #define COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_ | 6 #define COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 void DestroyDisplay(Display* display); | 51 void DestroyDisplay(Display* display); |
| 52 void DestroyAllDisplays(); | 52 void DestroyAllDisplays(); |
| 53 const std::set<Display*>& displays() { return displays_; } | 53 const std::set<Display*>& displays() { return displays_; } |
| 54 std::set<const Display*> displays() const; | 54 std::set<const Display*> displays() const; |
| 55 | 55 |
| 56 // Returns the Display that contains |window|, or null if |window| is not | 56 // Returns the Display that contains |window|, or null if |window| is not |
| 57 // attached to a display. | 57 // attached to a display. |
| 58 Display* GetDisplayContaining(ServerWindow* window); | 58 Display* GetDisplayContaining(ServerWindow* window); |
| 59 const Display* GetDisplayContaining(const ServerWindow* window) const; | 59 const Display* GetDisplayContaining(const ServerWindow* window) const; |
| 60 | 60 |
| 61 Display* GetActiveDisplay(); | |
| 62 | |
| 63 WindowManagerAndDisplayConst GetWindowManagerAndDisplay( | 61 WindowManagerAndDisplayConst GetWindowManagerAndDisplay( |
| 64 const ServerWindow* window) const; | 62 const ServerWindow* window) const; |
| 65 WindowManagerAndDisplay GetWindowManagerAndDisplay( | 63 WindowManagerAndDisplay GetWindowManagerAndDisplay( |
| 66 const ServerWindow* window); | 64 const ServerWindow* window); |
| 67 | 65 |
| 68 bool has_displays() const { return !displays_.empty(); } | 66 bool has_displays() const { return !displays_.empty(); } |
| 69 bool has_active_or_pending_displays() const { | 67 bool has_active_or_pending_displays() const { |
| 70 return !displays_.empty() || !pending_displays_.empty(); | 68 return !displays_.empty() || !pending_displays_.empty(); |
| 71 } | 69 } |
| 72 | 70 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 95 | 93 |
| 96 uint32_t next_display_id_; | 94 uint32_t next_display_id_; |
| 97 | 95 |
| 98 DISALLOW_COPY_AND_ASSIGN(DisplayManager); | 96 DISALLOW_COPY_AND_ASSIGN(DisplayManager); |
| 99 }; | 97 }; |
| 100 | 98 |
| 101 } // namespace ws | 99 } // namespace ws |
| 102 } // namespace mus | 100 } // namespace mus |
| 103 | 101 |
| 104 #endif // COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_ | 102 #endif // COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_ |
| OLD | NEW |