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

Side by Side Diff: components/mus/mus_app.cc

Issue 1757403002: More user id tracking for mus: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweaks Created 4 years, 9 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
« no previous file with comments | « no previous file | components/mus/ws/BUILD.gn » ('j') | 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 "components/mus/mus_app.h" 5 #include "components/mus/mus_app.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 connection->AddInterface<mojom::WindowManagerFactoryService>(this); 142 connection->AddInterface<mojom::WindowManagerFactoryService>(this);
143 connection->AddInterface<mojom::WindowTreeFactory>(this); 143 connection->AddInterface<mojom::WindowTreeFactory>(this);
144 connection->AddInterface<WindowTreeHostFactory>(this); 144 connection->AddInterface<WindowTreeHostFactory>(this);
145 return true; 145 return true;
146 } 146 }
147 147
148 void MandolineUIServicesApp::OnFirstRootConnectionCreated() { 148 void MandolineUIServicesApp::OnFirstRootConnectionCreated() {
149 PendingRequests requests; 149 PendingRequests requests;
150 requests.swap(pending_requests_); 150 requests.swap(pending_requests_);
151 for (auto& request : requests) { 151 for (auto& request : requests) {
152 // TODO(sky): this needs to cache user id too!
152 if (request->dm_request) 153 if (request->dm_request)
153 Create(nullptr, std::move(*request->dm_request)); 154 Create(nullptr, std::move(*request->dm_request));
154 else 155 else
155 Create(nullptr, std::move(*request->wtf_request)); 156 Create(nullptr, std::move(*request->wtf_request));
156 } 157 }
157 } 158 }
158 159
159 void MandolineUIServicesApp::OnNoMoreRootConnections() { 160 void MandolineUIServicesApp::OnNoMoreRootConnections() {
160 base::MessageLoop::current()->QuitWhenIdle(); 161 base::MessageLoop::current()->QuitWhenIdle();
161 } 162 }
(...skipping 23 matching lines...) Expand all
185 new mojo::InterfaceRequest<mojom::DisplayManager>(std::move(request))); 186 new mojo::InterfaceRequest<mojom::DisplayManager>(std::move(request)));
186 pending_requests_.push_back(std::move(pending_request)); 187 pending_requests_.push_back(std::move(pending_request));
187 return; 188 return;
188 } 189 }
189 connection_manager_->AddDisplayManagerBinding(std::move(request)); 190 connection_manager_->AddDisplayManagerBinding(std::move(request));
190 } 191 }
191 192
192 void MandolineUIServicesApp::Create( 193 void MandolineUIServicesApp::Create(
193 mojo::Connection* connection, 194 mojo::Connection* connection,
194 mojom::WindowManagerFactoryServiceRequest request) { 195 mojom::WindowManagerFactoryServiceRequest request) {
195 connection_manager_->CreateWindowManagerFactoryService( 196 connection_manager_->window_manager_factory_registry()->Register(
196 connection->GetRemoteUserID(), std::move(request)); 197 connection->GetRemoteUserID(), std::move(request));
197 } 198 }
198 199
199 void MandolineUIServicesApp::Create(Connection* connection, 200 void MandolineUIServicesApp::Create(Connection* connection,
200 mojom::WindowTreeFactoryRequest request) { 201 mojom::WindowTreeFactoryRequest request) {
201 if (!connection_manager_->has_tree_host_connections()) { 202 if (!connection_manager_->has_tree_host_connections()) {
202 scoped_ptr<PendingRequest> pending_request(new PendingRequest); 203 scoped_ptr<PendingRequest> pending_request(new PendingRequest);
203 pending_request->wtf_request.reset( 204 pending_request->wtf_request.reset(
204 new mojo::InterfaceRequest<mojom::WindowTreeFactory>( 205 new mojo::InterfaceRequest<mojom::WindowTreeFactory>(
205 std::move(request))); 206 std::move(request)));
(...skipping 30 matching lines...) Expand all
236 connection_manager_.get(), connector_, gpu_state_, surfaces_state_); 237 connection_manager_.get(), connector_, gpu_state_, surfaces_state_);
237 238
238 scoped_ptr<ws::WindowTreeHostConnectionImpl> host_connection( 239 scoped_ptr<ws::WindowTreeHostConnectionImpl> host_connection(
239 new ws::WindowTreeHostConnectionImpl(std::move(host), host_impl, 240 new ws::WindowTreeHostConnectionImpl(std::move(host), host_impl,
240 std::move(tree_client), 241 std::move(tree_client),
241 connection_manager_.get())); 242 connection_manager_.get()));
242 host_impl->Init(std::move(host_connection)); 243 host_impl->Init(std::move(host_connection));
243 } 244 }
244 245
245 } // namespace mus 246 } // namespace mus
OLDNEW
« no previous file with comments | « no previous file | components/mus/ws/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698