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

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

Issue 1423133003: Routes calls to WM through WS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no braces Created 5 years, 1 month 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 "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
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
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