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

Side by Side Diff: components/mus/ws/display.h

Issue 1770533002: Change userid from a uint32_t to a string guid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@33connector
Patch Set: . Created 4 years, 9 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 | « components/mus/mus_app.cc ('k') | components/mus/ws/display.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_H_ 5 #ifndef COMPONENTS_MUS_WS_DISPLAY_H_
6 #define COMPONENTS_MUS_WS_DISPLAY_H_ 6 #define COMPONENTS_MUS_WS_DISPLAY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // Returns the root of the Display. The root's children are the roots 102 // Returns the root of the Display. The root's children are the roots
103 // of the corresponding WindowManagers. 103 // of the corresponding WindowManagers.
104 ServerWindow* root_window() { return root_.get(); } 104 ServerWindow* root_window() { return root_.get(); }
105 const ServerWindow* root_window() const { return root_.get(); } 105 const ServerWindow* root_window() const { return root_.get(); }
106 106
107 ServerWindow* GetRootWithId(const WindowId& id); 107 ServerWindow* GetRootWithId(const WindowId& id);
108 108
109 WindowManagerState* GetWindowManagerStateWithRoot(const ServerWindow* window); 109 WindowManagerState* GetWindowManagerStateWithRoot(const ServerWindow* window);
110 // TODO(sky): this is wrong, plumb through user_id. 110 // TODO(sky): this is wrong, plumb through user_id.
111 WindowManagerState* GetFirstWindowManagerState(); 111 WindowManagerState* GetFirstWindowManagerState();
112 WindowManagerState* GetWindowManagerStateForUser(UserId user_id); 112 WindowManagerState* GetWindowManagerStateForUser(const UserId& user_id);
113 size_t num_window_manger_states() const { 113 size_t num_window_manger_states() const {
114 return window_manager_state_map_.size(); 114 return window_manager_state_map_.size();
115 } 115 }
116 116
117 void SetCapture(ServerWindow* window, bool in_nonclient_area); 117 void SetCapture(ServerWindow* window, bool in_nonclient_area);
118 118
119 void SetFocusedWindow(ServerWindow* window); 119 void SetFocusedWindow(ServerWindow* window);
120 ServerWindow* GetFocusedWindow(); 120 ServerWindow* GetFocusedWindow();
121 void DestroyFocusController(); 121 void DestroyFocusController();
122 FocusController* focus_controller() { return focus_controller_.get(); } 122 FocusController* focus_controller() { return focus_controller_.get(); }
(...skipping 30 matching lines...) Expand all
153 void SetSize(mojo::SizePtr size) override; 153 void SetSize(mojo::SizePtr size) override;
154 void SetTitle(const mojo::String& title) override; 154 void SetTitle(const mojo::String& title) override;
155 155
156 void OnEventAck(mojom::WindowTree* tree); 156 void OnEventAck(mojom::WindowTree* tree);
157 157
158 private: 158 private:
159 class ProcessedEventTarget; 159 class ProcessedEventTarget;
160 friend class test::DisplayTestApi; 160 friend class test::DisplayTestApi;
161 161
162 using WindowManagerStateMap = 162 using WindowManagerStateMap =
163 std::map<uint32_t, scoped_ptr<WindowManagerState>>; 163 std::map<UserId, scoped_ptr<WindowManagerState>>;
164 164
165 // There are two types of events that may be queued, both occur only when 165 // There are two types of events that may be queued, both occur only when
166 // waiting for an ack from a client. 166 // waiting for an ack from a client.
167 // . We get an event from the PlatformDisplay. This results in |event| being 167 // . We get an event from the PlatformDisplay. This results in |event| being
168 // set, but |processed_target| is null. 168 // set, but |processed_target| is null.
169 // . We get an event from the EventDispatcher. In this case both |event| and 169 // . We get an event from the EventDispatcher. In this case both |event| and
170 // |processed_target| are valid. 170 // |processed_target| are valid.
171 // The second case happens if EventDispatcher generates more than one event 171 // The second case happens if EventDispatcher generates more than one event
172 // at a time. 172 // at a time.
173 struct QueuedEvent { 173 struct QueuedEvent {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 void ReleaseNativeCapture() override; 235 void ReleaseNativeCapture() override;
236 void OnServerWindowCaptureLost(ServerWindow* window) override; 236 void OnServerWindowCaptureLost(ServerWindow* window) override;
237 void DispatchInputEventToWindow(ServerWindow* target, 237 void DispatchInputEventToWindow(ServerWindow* target,
238 bool in_nonclient_area, 238 bool in_nonclient_area,
239 const ui::Event& event) override; 239 const ui::Event& event) override;
240 240
241 // ServerWindowObserver: 241 // ServerWindowObserver:
242 void OnWindowDestroyed(ServerWindow* window) override; 242 void OnWindowDestroyed(ServerWindow* window) override;
243 243
244 // UserIdTrackerObserver: 244 // UserIdTrackerObserver:
245 void OnActiveUserIdChanged(UserId id) override; 245 void OnActiveUserIdChanged(const UserId& id) override;
246 void OnUserIdAdded(UserId id) override; 246 void OnUserIdAdded(const UserId& id) override;
247 void OnUserIdRemoved(UserId id) override; 247 void OnUserIdRemoved(const UserId& id) override;
248 248
249 // WindowManagerFactoryRegistryObserver: 249 // WindowManagerFactoryRegistryObserver:
250 void OnWindowManagerFactorySet(WindowManagerFactoryService* service) override; 250 void OnWindowManagerFactorySet(WindowManagerFactoryService* service) override;
251 251
252 const uint32_t id_; 252 const uint32_t id_;
253 scoped_ptr<DisplayBinding> binding_; 253 scoped_ptr<DisplayBinding> binding_;
254 // Set once Init() has been called. 254 // Set once Init() has been called.
255 bool init_called_ = false; 255 bool init_called_ = false;
256 ConnectionManager* const connection_manager_; 256 ConnectionManager* const connection_manager_;
257 EventDispatcher event_dispatcher_; 257 EventDispatcher event_dispatcher_;
(...skipping 18 matching lines...) Expand all
276 276
277 mojom::FrameDecorationValuesPtr frame_decoration_values_; 277 mojom::FrameDecorationValuesPtr frame_decoration_values_;
278 278
279 DISALLOW_COPY_AND_ASSIGN(Display); 279 DISALLOW_COPY_AND_ASSIGN(Display);
280 }; 280 };
281 281
282 } // namespace ws 282 } // namespace ws
283 } // namespace mus 283 } // namespace mus
284 284
285 #endif // COMPONENTS_MUS_WS_DISPLAY_H_ 285 #endif // COMPONENTS_MUS_WS_DISPLAY_H_
OLDNEW
« no previous file with comments | « components/mus/mus_app.cc ('k') | components/mus/ws/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698