Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: services/ui/ws/display_manager.h

Issue 2189893004: Unify display ids between Display and PlatformDisplay. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Back to pure virtual. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/ws/display.cc ('k') | services/ui/ws/display_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 bool has_displays() const { return !displays_.empty(); } 62 bool has_displays() const { return !displays_.empty(); }
63 bool has_active_or_pending_displays() const { 63 bool has_active_or_pending_displays() const {
64 return !displays_.empty() || !pending_displays_.empty(); 64 return !displays_.empty() || !pending_displays_.empty();
65 } 65 }
66 66
67 // Returns the id for the next root window (both for the root of a Display 67 // Returns the id for the next root window (both for the root of a Display
68 // as well as the root of WindowManagers). 68 // as well as the root of WindowManagers).
69 WindowId GetAndAdvanceNextRootId(); 69 WindowId GetAndAdvanceNextRootId();
70 70
71 uint32_t GetAndAdvanceNextDisplayId();
72
73 // Called when the AcceleratedWidget is available for |display|. 71 // Called when the AcceleratedWidget is available for |display|.
74 void OnDisplayAcceleratedWidgetAvailable(Display* display); 72 void OnDisplayAcceleratedWidgetAvailable(Display* display);
75 73
76 private: 74 private:
77 // UserIdTrackerObserver: 75 // UserIdTrackerObserver:
78 void OnActiveUserIdChanged(const UserId& previously_active_id, 76 void OnActiveUserIdChanged(const UserId& previously_active_id,
79 const UserId& active_id) override; 77 const UserId& active_id) override;
80 78
81 DisplayManagerDelegate* delegate_; 79 DisplayManagerDelegate* delegate_;
82 UserIdTracker* user_id_tracker_; 80 UserIdTracker* user_id_tracker_;
83 81
84 // Displays are initially added to |pending_displays_|. When the display is 82 // Displays are initially added to |pending_displays_|. When the display is
85 // initialized it is moved to |displays_|. WindowServer owns the Displays. 83 // initialized it is moved to |displays_|. WindowServer owns the Displays.
86 std::set<Display*> pending_displays_; 84 std::set<Display*> pending_displays_;
87 std::set<Display*> displays_; 85 std::set<Display*> displays_;
88 86
89 std::map<UserId, std::unique_ptr<UserDisplayManager>> user_display_managers_; 87 std::map<UserId, std::unique_ptr<UserDisplayManager>> user_display_managers_;
90 88
91 // ID to use for next root node. 89 // ID to use for next root node.
92 ClientSpecificId next_root_id_; 90 ClientSpecificId next_root_id_;
93 91
94 uint32_t next_display_id_;
95
96 DISALLOW_COPY_AND_ASSIGN(DisplayManager); 92 DISALLOW_COPY_AND_ASSIGN(DisplayManager);
97 }; 93 };
98 94
99 } // namespace ws 95 } // namespace ws
100 } // namespace ui 96 } // namespace ui
101 97
102 #endif // SERVICES_UI_WS_DISPLAY_MANAGER_H_ 98 #endif // SERVICES_UI_WS_DISPLAY_MANAGER_H_
OLDNEW
« no previous file with comments | « services/ui/ws/display.cc ('k') | services/ui/ws/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698