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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // Called when the AcceleratedWidget is available for |display|. | 76 // Called when the AcceleratedWidget is available for |display|. |
77 void OnDisplayAcceleratedWidgetAvailable(Display* display); | 77 void OnDisplayAcceleratedWidgetAvailable(Display* display); |
78 | 78 |
79 private: | 79 private: |
80 // UserIdTrackerObserver: | 80 // UserIdTrackerObserver: |
81 void OnActiveUserIdChanged(const UserId& previously_active_id, | 81 void OnActiveUserIdChanged(const UserId& previously_active_id, |
82 const UserId& active_id) override; | 82 const UserId& active_id) override; |
83 | 83 |
84 // display::PlatformScreenDelegate: | 84 // display::PlatformScreenDelegate: |
85 void OnDisplayAdded(int64_t id, | 85 void OnDisplayAdded(int64_t id, |
86 const gfx::Rect& bounds, | 86 const display::ViewportMetrics& metrics) override; |
87 const gfx::Size& pixel_size, | |
88 float scale_factor) override; | |
89 void OnDisplayRemoved(int64_t id) override; | 87 void OnDisplayRemoved(int64_t id) override; |
90 void OnDisplayModified(int64_t id, | 88 void OnDisplayModified(int64_t id, |
91 const gfx::Rect& bounds, | 89 const display::ViewportMetrics& metrics) override; |
92 const gfx::Size& pixel_size, | |
93 float scale_factor) override; | |
94 | 90 |
95 WindowServer* window_server_; | 91 WindowServer* window_server_; |
96 UserIdTracker* user_id_tracker_; | 92 UserIdTracker* user_id_tracker_; |
97 | 93 |
98 // Displays are initially added to |pending_displays_|. When the display is | 94 // Displays are initially added to |pending_displays_|. When the display is |
99 // initialized it is moved to |displays_|. WindowServer owns the Displays. | 95 // initialized it is moved to |displays_|. WindowServer owns the Displays. |
100 std::set<Display*> pending_displays_; | 96 std::set<Display*> pending_displays_; |
101 std::set<Display*> displays_; | 97 std::set<Display*> displays_; |
102 | 98 |
103 std::map<UserId, std::unique_ptr<UserDisplayManager>> user_display_managers_; | 99 std::map<UserId, std::unique_ptr<UserDisplayManager>> user_display_managers_; |
104 | 100 |
105 // ID to use for next root node. | 101 // ID to use for next root node. |
106 ClientSpecificId next_root_id_; | 102 ClientSpecificId next_root_id_; |
107 | 103 |
108 DISALLOW_COPY_AND_ASSIGN(DisplayManager); | 104 DISALLOW_COPY_AND_ASSIGN(DisplayManager); |
109 }; | 105 }; |
110 | 106 |
111 } // namespace ws | 107 } // namespace ws |
112 } // namespace ui | 108 } // namespace ui |
113 | 109 |
114 #endif // SERVICES_UI_WS_DISPLAY_MANAGER_H_ | 110 #endif // SERVICES_UI_WS_DISPLAY_MANAGER_H_ |
OLD | NEW |