| 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 29 matching lines...) Expand all Loading... |
| 40 // Returns the UserDisplayManager for |user_id|. DisplayManager owns the | 40 // Returns the UserDisplayManager for |user_id|. DisplayManager owns the |
| 41 // return value. | 41 // return value. |
| 42 UserDisplayManager* GetUserDisplayManager(const UserId& user_id); | 42 UserDisplayManager* GetUserDisplayManager(const UserId& user_id); |
| 43 | 43 |
| 44 // Returns the CursorLocationManager for |user_id|. | 44 // Returns the CursorLocationManager for |user_id|. |
| 45 CursorLocationManager* GetCursorLocationManager(const UserId& user_id); | 45 CursorLocationManager* GetCursorLocationManager(const UserId& user_id); |
| 46 | 46 |
| 47 // Adds/removes a Display. DisplayManager owns the Displays. | 47 // Adds/removes a Display. DisplayManager owns the Displays. |
| 48 // TODO(sky): make add take a scoped_ptr. | 48 // TODO(sky): make add take a scoped_ptr. |
| 49 void AddDisplay(Display* display); | 49 void AddDisplay(Display* display); |
| 50 // Called when the window manager explicitly adds a new display. |
| 51 void AddDisplayForWindowManager(const display::Display& display, |
| 52 const display::ViewportMetrics& metrics); |
| 50 void DestroyDisplay(Display* display); | 53 void DestroyDisplay(Display* display); |
| 51 void DestroyAllDisplays(); | 54 void DestroyAllDisplays(); |
| 52 const std::set<Display*>& displays() { return displays_; } | 55 const std::set<Display*>& displays() { return displays_; } |
| 53 std::set<const Display*> displays() const; | 56 std::set<const Display*> displays() const; |
| 54 | 57 |
| 55 // Notifies when something about the Display changes. | 58 // Notifies when something about the Display changes. |
| 56 void OnDisplayUpdate(const display::Display& display); | 59 void OnDisplayUpdate(const display::Display& display); |
| 57 | 60 |
| 58 // Returns the Display that contains |window|, or null if |window| is not | 61 // Returns the Display that contains |window|, or null if |window| is not |
| 59 // attached to a display. | 62 // attached to a display. |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // ID to use for next root node. | 120 // ID to use for next root node. |
| 118 ClientSpecificId next_root_id_; | 121 ClientSpecificId next_root_id_; |
| 119 | 122 |
| 120 DISALLOW_COPY_AND_ASSIGN(DisplayManager); | 123 DISALLOW_COPY_AND_ASSIGN(DisplayManager); |
| 121 }; | 124 }; |
| 122 | 125 |
| 123 } // namespace ws | 126 } // namespace ws |
| 124 } // namespace ui | 127 } // namespace ui |
| 125 | 128 |
| 126 #endif // SERVICES_UI_WS_DISPLAY_MANAGER_H_ | 129 #endif // SERVICES_UI_WS_DISPLAY_MANAGER_H_ |
| OLD | NEW |