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

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

Issue 2797453002: Rename DisplayCompositor to MojoFrameSinkManager. (Closed)
Patch Set: Fix comments. Created 3 years, 8 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 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>
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/optional.h" 16 #include "base/optional.h"
17 #include "cc/ipc/display_compositor.mojom.h" 17 #include "cc/ipc/frame_sink_manager.mojom.h"
18 #include "mojo/public/cpp/bindings/binding.h" 18 #include "mojo/public/cpp/bindings/binding.h"
19 #include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom .h" 19 #include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom .h"
20 #include "services/ui/public/interfaces/window_tree.mojom.h" 20 #include "services/ui/public/interfaces/window_tree.mojom.h"
21 #include "services/ui/ws/gpu_host_delegate.h" 21 #include "services/ui/ws/gpu_host_delegate.h"
22 #include "services/ui/ws/ids.h" 22 #include "services/ui/ws/ids.h"
23 #include "services/ui/ws/operation.h" 23 #include "services/ui/ws/operation.h"
24 #include "services/ui/ws/server_window_delegate.h" 24 #include "services/ui/ws/server_window_delegate.h"
25 #include "services/ui/ws/server_window_observer.h" 25 #include "services/ui/ws/server_window_observer.h"
26 #include "services/ui/ws/user_display_manager_delegate.h" 26 #include "services/ui/ws/user_display_manager_delegate.h"
27 #include "services/ui/ws/user_id_tracker.h" 27 #include "services/ui/ws/user_id_tracker.h"
(...skipping 14 matching lines...) Expand all
42 class WindowTree; 42 class WindowTree;
43 class WindowTreeBinding; 43 class WindowTreeBinding;
44 44
45 // WindowServer manages the set of clients of the window server (all the 45 // WindowServer manages the set of clients of the window server (all the
46 // WindowTrees) as well as providing the root of the hierarchy. 46 // WindowTrees) as well as providing the root of the hierarchy.
47 class WindowServer : public ServerWindowDelegate, 47 class WindowServer : public ServerWindowDelegate,
48 public ServerWindowObserver, 48 public ServerWindowObserver,
49 public GpuHostDelegate, 49 public GpuHostDelegate,
50 public UserDisplayManagerDelegate, 50 public UserDisplayManagerDelegate,
51 public UserIdTrackerObserver, 51 public UserIdTrackerObserver,
52 public cc::mojom::DisplayCompositorClient { 52 public cc::mojom::FrameSinkManagerClient {
53 public: 53 public:
54 explicit WindowServer(WindowServerDelegate* delegate); 54 explicit WindowServer(WindowServerDelegate* delegate);
55 ~WindowServer() override; 55 ~WindowServer() override;
56 56
57 WindowServerDelegate* delegate() { return delegate_; } 57 WindowServerDelegate* delegate() { return delegate_; }
58 58
59 UserIdTracker* user_id_tracker() { return &user_id_tracker_; } 59 UserIdTracker* user_id_tracker() { return &user_id_tracker_; }
60 const UserIdTracker* user_id_tracker() const { return &user_id_tracker_; } 60 const UserIdTracker* user_id_tracker() const { return &user_id_tracker_; }
61 61
62 DisplayManager* display_manager() { return display_manager_.get(); } 62 DisplayManager* display_manager() { return display_manager_.get(); }
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 ServerWindow* GetCurrentDragLoopWindow(); 222 ServerWindow* GetCurrentDragLoopWindow();
223 WindowTree* GetCurrentDragLoopInitiator(); 223 WindowTree* GetCurrentDragLoopInitiator();
224 bool in_drag_loop() const { return !!current_drag_loop_; } 224 bool in_drag_loop() const { return !!current_drag_loop_; }
225 225
226 void OnDisplayReady(Display* display, bool is_first); 226 void OnDisplayReady(Display* display, bool is_first);
227 void OnDisplayDestroyed(Display* display); 227 void OnDisplayDestroyed(Display* display);
228 void OnNoMoreDisplays(); 228 void OnNoMoreDisplays();
229 WindowManagerState* GetWindowManagerStateForUser(const UserId& user_id); 229 WindowManagerState* GetWindowManagerStateForUser(const UserId& user_id);
230 230
231 // ServerWindowDelegate: 231 // ServerWindowDelegate:
232 cc::mojom::DisplayCompositor* GetDisplayCompositor() override; 232 cc::mojom::FrameSinkManager* GetFrameSinkManager() override;
233 233
234 // UserDisplayManagerDelegate: 234 // UserDisplayManagerDelegate:
235 bool GetFrameDecorationsForUser( 235 bool GetFrameDecorationsForUser(
236 const UserId& user_id, 236 const UserId& user_id,
237 mojom::FrameDecorationValuesPtr* values) override; 237 mojom::FrameDecorationValuesPtr* values) override;
238 238
239 private: 239 private:
240 struct CurrentMoveLoopState; 240 struct CurrentMoveLoopState;
241 struct CurrentDragLoopState; 241 struct CurrentDragLoopState;
242 friend class Operation; 242 friend class Operation;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 void OnWindowTextInputStateChanged(ServerWindow* window, 328 void OnWindowTextInputStateChanged(ServerWindow* window,
329 const ui::TextInputState& state) override; 329 const ui::TextInputState& state) override;
330 void OnTransientWindowAdded(ServerWindow* window, 330 void OnTransientWindowAdded(ServerWindow* window,
331 ServerWindow* transient_child) override; 331 ServerWindow* transient_child) override;
332 void OnTransientWindowRemoved(ServerWindow* window, 332 void OnTransientWindowRemoved(ServerWindow* window,
333 ServerWindow* transient_child) override; 333 ServerWindow* transient_child) override;
334 334
335 // GpuHostDelegate: 335 // GpuHostDelegate:
336 void OnGpuServiceInitialized() override; 336 void OnGpuServiceInitialized() override;
337 337
338 // cc::mojom::DisplayCompositorClient: 338 // cc::mojom::FrameSinkManagerClient:
339 void OnSurfaceCreated(const cc::SurfaceInfo& surface_info) override; 339 void OnSurfaceCreated(const cc::SurfaceInfo& surface_info) override;
340 340
341 // UserIdTrackerObserver: 341 // UserIdTrackerObserver:
342 void OnActiveUserIdChanged(const UserId& previously_active_id, 342 void OnActiveUserIdChanged(const UserId& previously_active_id,
343 const UserId& active_id) override; 343 const UserId& active_id) override;
344 void OnUserIdAdded(const UserId& id) override; 344 void OnUserIdAdded(const UserId& id) override;
345 void OnUserIdRemoved(const UserId& id) override; 345 void OnUserIdRemoved(const UserId& id) override;
346 346
347 UserIdTracker user_id_tracker_; 347 UserIdTracker user_id_tracker_;
348 348
(...skipping 26 matching lines...) Expand all
375 375
376 std::unique_ptr<GpuHost> gpu_host_; 376 std::unique_ptr<GpuHost> gpu_host_;
377 base::Callback<void(ServerWindow*)> window_paint_callback_; 377 base::Callback<void(ServerWindow*)> window_paint_callback_;
378 378
379 UserActivityMonitorMap activity_monitor_map_; 379 UserActivityMonitorMap activity_monitor_map_;
380 380
381 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_; 381 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_;
382 382
383 cc::SurfaceId root_surface_id_; 383 cc::SurfaceId root_surface_id_;
384 384
385 mojo::Binding<cc::mojom::DisplayCompositorClient> 385 mojo::Binding<cc::mojom::FrameSinkManagerClient>
msw 2017/04/03 19:22:13 nit: comments
kylechar 2017/04/03 19:54:16 Done.
386 display_compositor_client_binding_; 386 frame_sink_manager_client_binding_;
387 // State for rendering into a Surface. 387 cc::mojom::FrameSinkManagerPtr frame_sink_manager_;
388 cc::mojom::DisplayCompositorPtr display_compositor_;
389 388
390 DISALLOW_COPY_AND_ASSIGN(WindowServer); 389 DISALLOW_COPY_AND_ASSIGN(WindowServer);
391 }; 390 };
392 391
393 } // namespace ws 392 } // namespace ws
394 } // namespace ui 393 } // namespace ui
395 394
396 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_ 395 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698