| 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 "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 Loading... |
| 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 |
| OLD | NEW |