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

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

Issue 2449173003: Mus: Introduce DisplayCompositorClient mojo interface (Closed)
Patch Set: Explicitly add ui/gfx/geometry/mojo dependency Created 4 years, 1 month 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_server.h ('k') | no next file » | 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 #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 26 matching lines...) Expand all
37 WindowTree* initiator; 37 WindowTree* initiator;
38 gfx::Rect revert_bounds; 38 gfx::Rect revert_bounds;
39 }; 39 };
40 40
41 struct WindowServer::CurrentDragLoopState { 41 struct WindowServer::CurrentDragLoopState {
42 uint32_t change_id; 42 uint32_t change_id;
43 ServerWindow* window; 43 ServerWindow* window;
44 WindowTree* initiator; 44 WindowTree* initiator;
45 }; 45 };
46 46
47 // TODO(fsamuel): DisplayCompositor should be a mojo interface dispensed by
48 // GpuServiceProxy.
47 WindowServer::WindowServer(WindowServerDelegate* delegate) 49 WindowServer::WindowServer(WindowServerDelegate* delegate)
48 : delegate_(delegate), 50 : delegate_(delegate),
49 display_compositor_(new DisplayCompositor(this)),
50 next_client_id_(1), 51 next_client_id_(1),
51 display_manager_(new DisplayManager(this, &user_id_tracker_)), 52 display_manager_(new DisplayManager(this, &user_id_tracker_)),
52 current_operation_(nullptr), 53 current_operation_(nullptr),
53 in_destructor_(false), 54 in_destructor_(false),
54 next_wm_change_id_(0), 55 next_wm_change_id_(0),
55 gpu_proxy_(new GpuServiceProxy(this)), 56 gpu_proxy_(new GpuServiceProxy(this)),
56 window_manager_window_tree_factory_set_(this, &user_id_tracker_) { 57 window_manager_window_tree_factory_set_(this, &user_id_tracker_),
58 display_compositor_client_binding_(this),
59 display_compositor_(new DisplayCompositor(
60 display_compositor_client_binding_.CreateInterfacePtrAndBind())) {
57 user_id_tracker_.AddObserver(this); 61 user_id_tracker_.AddObserver(this);
58 OnUserIdAdded(user_id_tracker_.active_id()); 62 OnUserIdAdded(user_id_tracker_.active_id());
59 } 63 }
60 64
61 WindowServer::~WindowServer() { 65 WindowServer::~WindowServer() {
62 in_destructor_ = true; 66 in_destructor_ = true;
63 67
64 for (auto& pair : tree_map_) 68 for (auto& pair : tree_map_)
65 pair.second->PrepareForWindowServerShutdown(); 69 pair.second->PrepareForWindowServerShutdown();
66 70
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 void WindowServer::OnUserIdAdded(const UserId& id) { 849 void WindowServer::OnUserIdAdded(const UserId& id) {
846 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); 850 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr);
847 } 851 }
848 852
849 void WindowServer::OnUserIdRemoved(const UserId& id) { 853 void WindowServer::OnUserIdRemoved(const UserId& id) {
850 activity_monitor_map_.erase(id); 854 activity_monitor_map_.erase(id);
851 } 855 }
852 856
853 } // namespace ws 857 } // namespace ws
854 } // namespace ui 858 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_server.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698