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

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

Issue 1750143002: Changes ownership of WindowTreeHostConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments 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/stl_util.h" 9 #include "base/stl_util.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 void MandolineUIServicesApp::CreateWindowTreeHost( 225 void MandolineUIServicesApp::CreateWindowTreeHost(
226 mojo::InterfaceRequest<mojom::WindowTreeHost> host, 226 mojo::InterfaceRequest<mojom::WindowTreeHost> host,
227 mojom::WindowTreeClientPtr tree_client) { 227 mojom::WindowTreeClientPtr tree_client) {
228 DCHECK(connection_manager_); 228 DCHECK(connection_manager_);
229 229
230 // TODO(fsamuel): We need to make sure that only the window manager can create 230 // TODO(fsamuel): We need to make sure that only the window manager can create
231 // new roots. 231 // new roots.
232 ws::WindowTreeHostImpl* host_impl = new ws::WindowTreeHostImpl( 232 ws::WindowTreeHostImpl* host_impl = new ws::WindowTreeHostImpl(
233 connection_manager_.get(), connector_, gpu_state_, surfaces_state_); 233 connection_manager_.get(), connector_, gpu_state_, surfaces_state_);
234 234
235 // WindowTreeHostConnection manages its own lifetime. 235 scoped_ptr<ws::WindowTreeHostConnectionImpl> host_connection(
236 host_impl->Init(new ws::WindowTreeHostConnectionImpl( 236 new ws::WindowTreeHostConnectionImpl(std::move(host), host_impl,
237 std::move(host), make_scoped_ptr(host_impl), std::move(tree_client), 237 std::move(tree_client),
238 connection_manager_.get())); 238 connection_manager_.get()));
239 host_impl->Init(std::move(host_connection));
239 } 240 }
240 241
241 } // namespace mus 242 } // 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