| 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 "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "components/mus/gles2/gpu_impl.h" | 8 #include "components/mus/gles2/gpu_impl.h" |
| 9 #include "components/mus/public/cpp/args.h" | 9 #include "components/mus/public/cpp/args.h" |
| 10 #include "components/mus/surfaces/surfaces_scheduler.h" | 10 #include "components/mus/surfaces/surfaces_scheduler.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 void MandolineUIServicesApp::Create(mojo::ApplicationConnection* connection, | 122 void MandolineUIServicesApp::Create(mojo::ApplicationConnection* connection, |
| 123 mojo::InterfaceRequest<Gpu> request) { | 123 mojo::InterfaceRequest<Gpu> request) { |
| 124 DCHECK(gpu_state_.get()); | 124 DCHECK(gpu_state_.get()); |
| 125 new GpuImpl(request.Pass(), gpu_state_); | 125 new GpuImpl(request.Pass(), gpu_state_); |
| 126 } | 126 } |
| 127 | 127 |
| 128 void MandolineUIServicesApp::CreateWindowTreeHost( | 128 void MandolineUIServicesApp::CreateWindowTreeHost( |
| 129 mojo::InterfaceRequest<mojom::WindowTreeHost> host, | 129 mojo::InterfaceRequest<mojom::WindowTreeHost> host, |
| 130 mojom::WindowTreeHostClientPtr host_client, | 130 mojom::WindowTreeHostClientPtr host_client, |
| 131 mojom::WindowTreeClientPtr tree_client) { | 131 mojom::WindowTreeClientPtr tree_client, |
| 132 mojom::WindowManagerPtr window_manager) { |
| 132 DCHECK(connection_manager_.get()); | 133 DCHECK(connection_manager_.get()); |
| 133 | 134 |
| 134 // TODO(fsamuel): We need to make sure that only the window manager can create | 135 // TODO(fsamuel): We need to make sure that only the window manager can create |
| 135 // new roots. | 136 // new roots. |
| 136 ws::WindowTreeHostImpl* host_impl = | 137 ws::WindowTreeHostImpl* host_impl = new ws::WindowTreeHostImpl( |
| 137 new ws::WindowTreeHostImpl(host_client.Pass(), connection_manager_.get(), | 138 host_client.Pass(), connection_manager_.get(), app_impl_, gpu_state_, |
| 138 app_impl_, gpu_state_, surfaces_state_); | 139 surfaces_state_, window_manager.Pass()); |
| 139 | 140 |
| 140 // WindowTreeHostConnection manages its own lifetime. | 141 // WindowTreeHostConnection manages its own lifetime. |
| 141 host_impl->Init(new ws::WindowTreeHostConnectionImpl( | 142 host_impl->Init(new ws::WindowTreeHostConnectionImpl( |
| 142 host.Pass(), make_scoped_ptr(host_impl), tree_client.Pass(), | 143 host.Pass(), make_scoped_ptr(host_impl), tree_client.Pass(), |
| 143 connection_manager_.get())); | 144 connection_manager_.get())); |
| 144 } | 145 } |
| 145 | 146 |
| 146 } // namespace mus | 147 } // namespace mus |
| OLD | NEW |