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

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

Issue 2904993003: chromeos: changes how DisplayManagerObservers are notified (Closed)
Patch Set: cleanup Created 3 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
« no previous file with comments | « services/ui/ws/window_manager_window_tree_factory.cc ('k') | services/ui/ws/window_server.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 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 SERVICES_UI_WS_WINDOW_SERVER_H_ 5 #ifndef SERVICES_UI_WS_WINDOW_SERVER_H_
6 #define SERVICES_UI_WS_WINDOW_SERVER_H_ 6 #define SERVICES_UI_WS_WINDOW_SERVER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 24 matching lines...) Expand all
35 class Display; 35 class Display;
36 class DisplayManager; 36 class DisplayManager;
37 class GpuHost; 37 class GpuHost;
38 class ServerWindow; 38 class ServerWindow;
39 class UserActivityMonitor; 39 class UserActivityMonitor;
40 class WindowManagerState; 40 class WindowManagerState;
41 class WindowServerDelegate; 41 class WindowServerDelegate;
42 class WindowTree; 42 class WindowTree;
43 class WindowTreeBinding; 43 class WindowTreeBinding;
44 44
45 enum class DisplayCreationConfig;
46
45 // WindowServer manages the set of clients of the window server (all the 47 // WindowServer manages the set of clients of the window server (all the
46 // WindowTrees) as well as providing the root of the hierarchy. 48 // WindowTrees) as well as providing the root of the hierarchy.
47 class WindowServer : public ServerWindowDelegate, 49 class WindowServer : public ServerWindowDelegate,
48 public ServerWindowObserver, 50 public ServerWindowObserver,
49 public GpuHostDelegate, 51 public GpuHostDelegate,
50 public UserDisplayManagerDelegate, 52 public UserDisplayManagerDelegate,
51 public UserIdTrackerObserver, 53 public UserIdTrackerObserver,
52 public cc::mojom::FrameSinkManagerClient { 54 public cc::mojom::FrameSinkManagerClient {
53 public: 55 public:
54 explicit WindowServer(WindowServerDelegate* delegate); 56 explicit WindowServer(WindowServerDelegate* delegate);
55 ~WindowServer() override; 57 ~WindowServer() override;
56 58
57 WindowServerDelegate* delegate() { return delegate_; } 59 WindowServerDelegate* delegate() { return delegate_; }
58 60
59 UserIdTracker* user_id_tracker() { return &user_id_tracker_; } 61 UserIdTracker* user_id_tracker() { return &user_id_tracker_; }
60 const UserIdTracker* user_id_tracker() const { return &user_id_tracker_; } 62 const UserIdTracker* user_id_tracker() const { return &user_id_tracker_; }
61 63
62 DisplayManager* display_manager() { return display_manager_.get(); } 64 DisplayManager* display_manager() { return display_manager_.get(); }
63 const DisplayManager* display_manager() const { 65 const DisplayManager* display_manager() const {
64 return display_manager_.get(); 66 return display_manager_.get();
65 } 67 }
66 68
67 GpuHost* gpu_host() { return gpu_host_.get(); } 69 GpuHost* gpu_host() { return gpu_host_.get(); }
68 70
71 void SetDisplayCreationConfig(DisplayCreationConfig config);
72 DisplayCreationConfig display_creation_config() const {
73 return display_creation_config_;
74 }
75
69 // Creates a new ServerWindow. The return value is owned by the caller, but 76 // Creates a new ServerWindow. The return value is owned by the caller, but
70 // must be destroyed before WindowServer. 77 // must be destroyed before WindowServer.
71 ServerWindow* CreateServerWindow( 78 ServerWindow* CreateServerWindow(
72 const WindowId& id, 79 const WindowId& id,
73 const std::map<std::string, std::vector<uint8_t>>& properties); 80 const std::map<std::string, std::vector<uint8_t>>& properties);
74 81
75 // Returns the id for the next WindowTree. 82 // Returns the id for the next WindowTree.
76 ClientSpecificId GetAndAdvanceNextClientId(); 83 ClientSpecificId GetAndAdvanceNextClientId();
77 84
78 // See description of WindowTree::Embed() for details. This assumes 85 // See description of WindowTree::Embed() for details. This assumes
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 388
382 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_; 389 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_;
383 390
384 cc::SurfaceId root_surface_id_; 391 cc::SurfaceId root_surface_id_;
385 392
386 // Provides interfaces to create and manage FrameSinks. 393 // Provides interfaces to create and manage FrameSinks.
387 mojo::Binding<cc::mojom::FrameSinkManagerClient> 394 mojo::Binding<cc::mojom::FrameSinkManagerClient>
388 frame_sink_manager_client_binding_; 395 frame_sink_manager_client_binding_;
389 cc::mojom::FrameSinkManagerPtr frame_sink_manager_; 396 cc::mojom::FrameSinkManagerPtr frame_sink_manager_;
390 397
398 DisplayCreationConfig display_creation_config_;
399
391 DISALLOW_COPY_AND_ASSIGN(WindowServer); 400 DISALLOW_COPY_AND_ASSIGN(WindowServer);
392 }; 401 };
393 402
394 } // namespace ws 403 } // namespace ws
395 } // namespace ui 404 } // namespace ui
396 405
397 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_ 406 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_
OLDNEW
« no previous file with comments | « services/ui/ws/window_manager_window_tree_factory.cc ('k') | services/ui/ws/window_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698