| OLD | NEW |
| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 // 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 |
| 48 // WindowTrees) as well as providing the root of the hierarchy. | 48 // WindowTrees) as well as providing the root of the hierarchy. |
| 49 class WindowServer : public ServerWindowDelegate, | 49 class WindowServer : public ServerWindowDelegate, |
| 50 public ServerWindowObserver, | 50 public ServerWindowObserver, |
| 51 public GpuHostDelegate, | 51 public GpuHostDelegate, |
| 52 public UserDisplayManagerDelegate, | 52 public UserDisplayManagerDelegate, |
| 53 public UserIdTrackerObserver, | 53 public UserIdTrackerObserver, |
| 54 public cc::mojom::FrameSinkManagerClient { | 54 public cc::mojom::FrameSinkManagerClient { |
| 55 public: | 55 public: |
| 56 explicit WindowServer(WindowServerDelegate* delegate); | 56 WindowServer(WindowServerDelegate* delegate, |
| 57 scoped_refptr<base::SingleThreadTaskRunner>& resource_runner); |
| 57 ~WindowServer() override; | 58 ~WindowServer() override; |
| 58 | 59 |
| 59 WindowServerDelegate* delegate() { return delegate_; } | 60 WindowServerDelegate* delegate() { return delegate_; } |
| 60 | 61 |
| 62 scoped_refptr<base::SingleThreadTaskRunner>& resource_runner() { |
| 63 return resource_runner_; |
| 64 } |
| 65 |
| 61 UserIdTracker* user_id_tracker() { return &user_id_tracker_; } | 66 UserIdTracker* user_id_tracker() { return &user_id_tracker_; } |
| 62 const UserIdTracker* user_id_tracker() const { return &user_id_tracker_; } | 67 const UserIdTracker* user_id_tracker() const { return &user_id_tracker_; } |
| 63 | 68 |
| 64 DisplayManager* display_manager() { return display_manager_.get(); } | 69 DisplayManager* display_manager() { return display_manager_.get(); } |
| 65 const DisplayManager* display_manager() const { | 70 const DisplayManager* display_manager() const { |
| 66 return display_manager_.get(); | 71 return display_manager_.get(); |
| 67 } | 72 } |
| 68 | 73 |
| 69 GpuHost* gpu_host() { return gpu_host_.get(); } | 74 GpuHost* gpu_host() { return gpu_host_.get(); } |
| 70 | 75 |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 // UserIdTrackerObserver: | 368 // UserIdTrackerObserver: |
| 364 void OnActiveUserIdChanged(const UserId& previously_active_id, | 369 void OnActiveUserIdChanged(const UserId& previously_active_id, |
| 365 const UserId& active_id) override; | 370 const UserId& active_id) override; |
| 366 void OnUserIdAdded(const UserId& id) override; | 371 void OnUserIdAdded(const UserId& id) override; |
| 367 void OnUserIdRemoved(const UserId& id) override; | 372 void OnUserIdRemoved(const UserId& id) override; |
| 368 | 373 |
| 369 UserIdTracker user_id_tracker_; | 374 UserIdTracker user_id_tracker_; |
| 370 | 375 |
| 371 WindowServerDelegate* delegate_; | 376 WindowServerDelegate* delegate_; |
| 372 | 377 |
| 378 scoped_refptr<base::SingleThreadTaskRunner> resource_runner_; |
| 379 |
| 373 // ID to use for next WindowTree. | 380 // ID to use for next WindowTree. |
| 374 ClientSpecificId next_client_id_; | 381 ClientSpecificId next_client_id_; |
| 375 | 382 |
| 376 std::unique_ptr<DisplayManager> display_manager_; | 383 std::unique_ptr<DisplayManager> display_manager_; |
| 377 | 384 |
| 378 std::unique_ptr<CurrentDragLoopState> current_drag_loop_; | 385 std::unique_ptr<CurrentDragLoopState> current_drag_loop_; |
| 379 std::unique_ptr<CurrentMoveLoopState> current_move_loop_; | 386 std::unique_ptr<CurrentMoveLoopState> current_move_loop_; |
| 380 | 387 |
| 381 // Set of WindowTrees. | 388 // Set of WindowTrees. |
| 382 WindowTreeMap tree_map_; | 389 WindowTreeMap tree_map_; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 409 | 416 |
| 410 DisplayCreationConfig display_creation_config_; | 417 DisplayCreationConfig display_creation_config_; |
| 411 | 418 |
| 412 DISALLOW_COPY_AND_ASSIGN(WindowServer); | 419 DISALLOW_COPY_AND_ASSIGN(WindowServer); |
| 413 }; | 420 }; |
| 414 | 421 |
| 415 } // namespace ws | 422 } // namespace ws |
| 416 } // namespace ui | 423 } // namespace ui |
| 417 | 424 |
| 418 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_ | 425 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_ |
| OLD | NEW |