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 #include "services/ui/ws/window_server.h" | 5 #include "services/ui/ws/window_server.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 WindowTree* initiator; | 53 WindowTree* initiator; |
54 gfx::Rect revert_bounds; | 54 gfx::Rect revert_bounds; |
55 }; | 55 }; |
56 | 56 |
57 struct WindowServer::CurrentDragLoopState { | 57 struct WindowServer::CurrentDragLoopState { |
58 uint32_t change_id; | 58 uint32_t change_id; |
59 ServerWindow* window; | 59 ServerWindow* window; |
60 WindowTree* initiator; | 60 WindowTree* initiator; |
61 }; | 61 }; |
62 | 62 |
63 WindowServer::WindowServer(WindowServerDelegate* delegate) | 63 WindowServer::WindowServer( |
| 64 WindowServerDelegate* delegate, |
| 65 scoped_refptr<base::SingleThreadTaskRunner>& resource_runner) |
64 : delegate_(delegate), | 66 : delegate_(delegate), |
| 67 resource_runner_(resource_runner), |
65 next_client_id_(1), | 68 next_client_id_(1), |
66 display_manager_(new DisplayManager(this, &user_id_tracker_)), | 69 display_manager_(new DisplayManager(this, &user_id_tracker_)), |
67 current_operation_(nullptr), | 70 current_operation_(nullptr), |
68 in_destructor_(false), | 71 in_destructor_(false), |
69 next_wm_change_id_(0), | 72 next_wm_change_id_(0), |
70 window_manager_window_tree_factory_set_(this, &user_id_tracker_), | 73 window_manager_window_tree_factory_set_(this, &user_id_tracker_), |
71 display_creation_config_(DisplayCreationConfig::UNKNOWN) { | 74 display_creation_config_(DisplayCreationConfig::UNKNOWN) { |
72 user_id_tracker_.AddObserver(this); | 75 user_id_tracker_.AddObserver(this); |
73 OnUserIdAdded(user_id_tracker_.active_id()); | 76 OnUserIdAdded(user_id_tracker_.active_id()); |
74 } | 77 } |
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 void WindowServer::OnUserIdAdded(const UserId& id) { | 902 void WindowServer::OnUserIdAdded(const UserId& id) { |
900 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); | 903 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); |
901 } | 904 } |
902 | 905 |
903 void WindowServer::OnUserIdRemoved(const UserId& id) { | 906 void WindowServer::OnUserIdRemoved(const UserId& id) { |
904 activity_monitor_map_.erase(id); | 907 activity_monitor_map_.erase(id); |
905 } | 908 } |
906 | 909 |
907 } // namespace ws | 910 } // namespace ws |
908 } // namespace ui | 911 } // namespace ui |
OLD | NEW |