| 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 SERVICES_UI_WS_DISPLAY_MANAGER_H_ | 5 #ifndef SERVICES_UI_WS_DISPLAY_MANAGER_H_ |
| 6 #define SERVICES_UI_WS_DISPLAY_MANAGER_H_ | 6 #define SERVICES_UI_WS_DISPLAY_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 std::set<const Display*> displays() const; | 47 std::set<const Display*> displays() const; |
| 48 | 48 |
| 49 // Notifies when something about the Display changes. | 49 // Notifies when something about the Display changes. |
| 50 void OnDisplayUpdate(Display* display); | 50 void OnDisplayUpdate(Display* display); |
| 51 | 51 |
| 52 // Returns the Display that contains |window|, or null if |window| is not | 52 // Returns the Display that contains |window|, or null if |window| is not |
| 53 // attached to a display. | 53 // attached to a display. |
| 54 Display* GetDisplayContaining(ServerWindow* window); | 54 Display* GetDisplayContaining(ServerWindow* window); |
| 55 const Display* GetDisplayContaining(const ServerWindow* window) const; | 55 const Display* GetDisplayContaining(const ServerWindow* window) const; |
| 56 | 56 |
| 57 // Returns the display with the specified display id, or null if there is no |
| 58 // display with that id. |
| 59 Display* GetDisplayById(int64_t display_id); |
| 60 |
| 57 const WindowManagerDisplayRoot* GetWindowManagerDisplayRoot( | 61 const WindowManagerDisplayRoot* GetWindowManagerDisplayRoot( |
| 58 const ServerWindow* window) const; | 62 const ServerWindow* window) const; |
| 59 // TODO(sky): constness here is wrong! fix! | 63 // TODO(sky): constness here is wrong! fix! |
| 60 WindowManagerDisplayRoot* GetWindowManagerDisplayRoot( | 64 WindowManagerDisplayRoot* GetWindowManagerDisplayRoot( |
| 61 const ServerWindow* window); | 65 const ServerWindow* window); |
| 62 | 66 |
| 63 bool has_displays() const { return !displays_.empty(); } | 67 bool has_displays() const { return !displays_.empty(); } |
| 64 bool has_active_or_pending_displays() const { | 68 bool has_active_or_pending_displays() const { |
| 65 return !displays_.empty() || !pending_displays_.empty(); | 69 return !displays_.empty() || !pending_displays_.empty(); |
| 66 } | 70 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 97 // ID to use for next root node. | 101 // ID to use for next root node. |
| 98 ClientSpecificId next_root_id_; | 102 ClientSpecificId next_root_id_; |
| 99 | 103 |
| 100 DISALLOW_COPY_AND_ASSIGN(DisplayManager); | 104 DISALLOW_COPY_AND_ASSIGN(DisplayManager); |
| 101 }; | 105 }; |
| 102 | 106 |
| 103 } // namespace ws | 107 } // namespace ws |
| 104 } // namespace ui | 108 } // namespace ui |
| 105 | 109 |
| 106 #endif // SERVICES_UI_WS_DISPLAY_MANAGER_H_ | 110 #endif // SERVICES_UI_WS_DISPLAY_MANAGER_H_ |
| OLD | NEW |