| 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 25 matching lines...) Expand all Loading... |
| 36 WindowTree* initiator; | 36 WindowTree* initiator; |
| 37 gfx::Rect revert_bounds; | 37 gfx::Rect revert_bounds; |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 struct WindowServer::CurrentDragLoopState { | 40 struct WindowServer::CurrentDragLoopState { |
| 41 uint32_t change_id; | 41 uint32_t change_id; |
| 42 ServerWindow* window; | 42 ServerWindow* window; |
| 43 WindowTree* initiator; | 43 WindowTree* initiator; |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 // TODO(fsamuel): DisplayCompositor should be a mojo interface dispensed by |
| 47 // GpuServiceProxy. |
| 46 WindowServer::WindowServer(WindowServerDelegate* delegate) | 48 WindowServer::WindowServer(WindowServerDelegate* delegate) |
| 47 : delegate_(delegate), | 49 : delegate_(delegate), |
| 48 display_compositor_(new DisplayCompositor(this)), | |
| 49 next_client_id_(1), | 50 next_client_id_(1), |
| 50 display_manager_(new DisplayManager(this, &user_id_tracker_)), | 51 display_manager_(new DisplayManager(this, &user_id_tracker_)), |
| 51 current_operation_(nullptr), | 52 current_operation_(nullptr), |
| 52 in_destructor_(false), | 53 in_destructor_(false), |
| 53 next_wm_change_id_(0), | 54 next_wm_change_id_(0), |
| 54 gpu_proxy_(new GpuServiceProxy(this)), | 55 gpu_proxy_(new GpuServiceProxy(this)), |
| 55 window_manager_window_tree_factory_set_(this, &user_id_tracker_) { | 56 window_manager_window_tree_factory_set_(this, &user_id_tracker_), |
| 57 display_compositor_client_binding_(this), |
| 58 display_compositor_(new DisplayCompositor( |
| 59 display_compositor_client_binding_.CreateInterfacePtrAndBind())) { |
| 56 user_id_tracker_.AddObserver(this); | 60 user_id_tracker_.AddObserver(this); |
| 57 OnUserIdAdded(user_id_tracker_.active_id()); | 61 OnUserIdAdded(user_id_tracker_.active_id()); |
| 58 } | 62 } |
| 59 | 63 |
| 60 WindowServer::~WindowServer() { | 64 WindowServer::~WindowServer() { |
| 61 in_destructor_ = true; | 65 in_destructor_ = true; |
| 62 | 66 |
| 63 for (auto& pair : tree_map_) | 67 for (auto& pair : tree_map_) |
| 64 pair.second->PrepareForWindowServerShutdown(); | 68 pair.second->PrepareForWindowServerShutdown(); |
| 65 | 69 |
| (...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 void WindowServer::OnUserIdAdded(const UserId& id) { | 839 void WindowServer::OnUserIdAdded(const UserId& id) { |
| 836 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); | 840 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); |
| 837 } | 841 } |
| 838 | 842 |
| 839 void WindowServer::OnUserIdRemoved(const UserId& id) { | 843 void WindowServer::OnUserIdRemoved(const UserId& id) { |
| 840 activity_monitor_map_.erase(id); | 844 activity_monitor_map_.erase(id); |
| 841 } | 845 } |
| 842 | 846 |
| 843 } // namespace ws | 847 } // namespace ws |
| 844 } // namespace ui | 848 } // namespace ui |
| OLD | NEW |