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

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

Issue 2089023002: Promotes remaining global window manager state into WindowManagerState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: override Created 4 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_WINDOW_SERVER_H_ 5 #ifndef COMPONENTS_MUS_WS_WINDOW_SERVER_H_
6 #define COMPONENTS_MUS_WS_WINDOW_SERVER_H_ 6 #define COMPONENTS_MUS_WS_WINDOW_SERVER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 WindowServerDelegate* delegate() { return delegate_; } 52 WindowServerDelegate* delegate() { return delegate_; }
53 53
54 UserIdTracker* user_id_tracker() { return &user_id_tracker_; } 54 UserIdTracker* user_id_tracker() { return &user_id_tracker_; }
55 const UserIdTracker* user_id_tracker() const { return &user_id_tracker_; } 55 const UserIdTracker* user_id_tracker() const { return &user_id_tracker_; }
56 56
57 DisplayManager* display_manager() { return display_manager_.get(); } 57 DisplayManager* display_manager() { return display_manager_.get(); }
58 const DisplayManager* display_manager() const { 58 const DisplayManager* display_manager() const {
59 return display_manager_.get(); 59 return display_manager_.get();
60 } 60 }
61 61
62 bool created_one_display() const { return created_one_display_; }
63
64 // Creates a new ServerWindow. The return value is owned by the caller, but 62 // Creates a new ServerWindow. The return value is owned by the caller, but
65 // must be destroyed before WindowServer. 63 // must be destroyed before WindowServer.
66 ServerWindow* CreateServerWindow( 64 ServerWindow* CreateServerWindow(
67 const WindowId& id, 65 const WindowId& id,
68 const std::map<std::string, std::vector<uint8_t>>& properties); 66 const std::map<std::string, std::vector<uint8_t>>& properties);
69 67
70 // Returns the id for the next WindowTree. 68 // Returns the id for the next WindowTree.
71 ClientSpecificId GetAndAdvanceNextClientId(); 69 ClientSpecificId GetAndAdvanceNextClientId();
72 70
73 // See description of WindowTree::Embed() for details. This assumes 71 // See description of WindowTree::Embed() for details. This assumes
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 ServerWindow* transient_child) override; 275 ServerWindow* transient_child) override;
278 void OnTransientWindowRemoved(ServerWindow* window, 276 void OnTransientWindowRemoved(ServerWindow* window,
279 ServerWindow* transient_child) override; 277 ServerWindow* transient_child) override;
280 278
281 // DisplayManagerDelegate: 279 // DisplayManagerDelegate:
282 void OnFirstDisplayReady() override; 280 void OnFirstDisplayReady() override;
283 void OnNoMoreDisplays() override; 281 void OnNoMoreDisplays() override;
284 bool GetFrameDecorationsForUser( 282 bool GetFrameDecorationsForUser(
285 const UserId& user_id, 283 const UserId& user_id,
286 mojom::FrameDecorationValuesPtr* values) override; 284 mojom::FrameDecorationValuesPtr* values) override;
285 WindowManagerState* GetWindowManagerStateForUser(
286 const UserId& user_id) override;
287 287
288 UserIdTracker user_id_tracker_; 288 UserIdTracker user_id_tracker_;
289 289
290 WindowServerDelegate* delegate_; 290 WindowServerDelegate* delegate_;
291 291
292 // State for rendering into a Surface. 292 // State for rendering into a Surface.
293 scoped_refptr<mus::SurfacesState> surfaces_state_; 293 scoped_refptr<mus::SurfacesState> surfaces_state_;
294 294
295 // ID to use for next WindowTree. 295 // ID to use for next WindowTree.
296 ClientSpecificId next_client_id_; 296 ClientSpecificId next_client_id_;
(...skipping 13 matching lines...) Expand all
310 // request. 310 // request.
311 InFlightWindowManagerChangeMap in_flight_wm_change_map_; 311 InFlightWindowManagerChangeMap in_flight_wm_change_map_;
312 312
313 // Next id supplied to the window manager. 313 // Next id supplied to the window manager.
314 uint32_t next_wm_change_id_; 314 uint32_t next_wm_change_id_;
315 315
316 base::Callback<void(ServerWindow*)> window_paint_callback_; 316 base::Callback<void(ServerWindow*)> window_paint_callback_;
317 317
318 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_; 318 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_;
319 319
320 // TODO(sky): remove this, temporary until window manager state made global
321 // and not per display.
322 bool created_one_display_ = false;
323
324 DISALLOW_COPY_AND_ASSIGN(WindowServer); 320 DISALLOW_COPY_AND_ASSIGN(WindowServer);
325 }; 321 };
326 322
327 } // namespace ws 323 } // namespace ws
328 } // namespace mus 324 } // namespace mus
329 325
330 #endif // COMPONENTS_MUS_WS_WINDOW_SERVER_H_ 326 #endif // COMPONENTS_MUS_WS_WINDOW_SERVER_H_
OLDNEW
« no previous file with comments | « components/mus/ws/window_manager_window_tree_factory_set.cc ('k') | components/mus/ws/window_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698