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

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

Issue 2072343002: Changes how window manager obtains WindowTree from mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include Created 4 years, 6 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 | « components/mus/mus_app.h ('k') | components/mus/public/cpp/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/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 platform_screen_->Init(); 192 platform_screen_->Init();
193 window_server_.reset( 193 window_server_.reset(
194 new ws::WindowServer(this, platform_display_init_params_.surfaces_state)); 194 new ws::WindowServer(this, platform_display_init_params_.surfaces_state));
195 } 195 }
196 196
197 bool MusApp::AcceptConnection(Connection* connection) { 197 bool MusApp::AcceptConnection(Connection* connection) {
198 connection->AddInterface<mojom::Clipboard>(this); 198 connection->AddInterface<mojom::Clipboard>(this);
199 connection->AddInterface<mojom::DisplayManager>(this); 199 connection->AddInterface<mojom::DisplayManager>(this);
200 connection->AddInterface<mojom::UserAccessManager>(this); 200 connection->AddInterface<mojom::UserAccessManager>(this);
201 connection->AddInterface<WindowTreeHostFactory>(this); 201 connection->AddInterface<WindowTreeHostFactory>(this);
202 connection->AddInterface<mojom::WindowManagerFactoryService>(this); 202 connection->AddInterface<mojom::WindowManagerWindowTreeFactory>(this);
203 connection->AddInterface<mojom::WindowTreeFactory>(this); 203 connection->AddInterface<mojom::WindowTreeFactory>(this);
204 if (test_config_) 204 if (test_config_)
205 connection->AddInterface<WindowServerTest>(this); 205 connection->AddInterface<WindowServerTest>(this);
206 206
207 if (use_chrome_gpu_command_buffer_) { 207 if (use_chrome_gpu_command_buffer_) {
208 connection->AddInterface<mojom::GpuService>(this); 208 connection->AddInterface<mojom::GpuService>(this);
209 } else { 209 } else {
210 connection->AddInterface<Gpu>(this); 210 connection->AddInterface<Gpu>(this);
211 } 211 }
212 212
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 return; 265 return;
266 new GpuServiceImpl(std::move(request), connection); 266 new GpuServiceImpl(std::move(request), connection);
267 } 267 }
268 268
269 void MusApp::Create(shell::Connection* connection, 269 void MusApp::Create(shell::Connection* connection,
270 mojom::UserAccessManagerRequest request) { 270 mojom::UserAccessManagerRequest request) {
271 window_server_->user_id_tracker()->Bind(std::move(request)); 271 window_server_->user_id_tracker()->Bind(std::move(request));
272 } 272 }
273 273
274 void MusApp::Create(shell::Connection* connection, 274 void MusApp::Create(shell::Connection* connection,
275 mojom::WindowManagerFactoryServiceRequest request) { 275 mojom::WindowManagerWindowTreeFactoryRequest request) {
276 AddUserIfNecessary(connection); 276 AddUserIfNecessary(connection);
277 window_server_->window_manager_factory_registry()->Register( 277 window_server_->window_manager_window_tree_factory_set()->Add(
278 connection->GetRemoteIdentity().user_id(), std::move(request)); 278 connection->GetRemoteIdentity().user_id(), std::move(request));
279 } 279 }
280 280
281 void MusApp::Create(Connection* connection, 281 void MusApp::Create(Connection* connection,
282 mojom::WindowTreeFactoryRequest request) { 282 mojom::WindowTreeFactoryRequest request) {
283 AddUserIfNecessary(connection); 283 AddUserIfNecessary(connection);
284 if (!window_server_->display_manager()->has_displays()) { 284 if (!window_server_->display_manager()->has_displays()) {
285 std::unique_ptr<PendingRequest> pending_request(new PendingRequest); 285 std::unique_ptr<PendingRequest> pending_request(new PendingRequest);
286 pending_request->connection = connection; 286 pending_request->connection = connection;
287 pending_request->wtf_request.reset( 287 pending_request->wtf_request.reset(
(...skipping 30 matching lines...) Expand all
318 platform_display_init_params_.display_bounds = bounds; 318 platform_display_init_params_.display_bounds = bounds;
319 platform_display_init_params_.display_id = id; 319 platform_display_init_params_.display_id = id;
320 320
321 // Display manages its own lifetime. 321 // Display manages its own lifetime.
322 ws::Display* host_impl = 322 ws::Display* host_impl =
323 new ws::Display(window_server_.get(), platform_display_init_params_); 323 new ws::Display(window_server_.get(), platform_display_init_params_);
324 host_impl->Init(nullptr); 324 host_impl->Init(nullptr);
325 } 325 }
326 326
327 } // namespace mus 327 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/mus_app.h ('k') | components/mus/public/cpp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698