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

Side by Side Diff: components/mus/public/cpp/lib/window_tree_host_factory.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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/public/cpp/window_tree_host_factory.h" 5 #include "components/mus/public/cpp/window_tree_host_factory.h"
6 6
7 #include "components/mus/public/cpp/window_tree_connection.h" 7 #include "components/mus/public/cpp/window_tree_connection.h"
8 #include "components/mus/public/cpp/window_tree_delegate.h" 8 #include "components/mus/public/cpp/window_tree_delegate.h"
9 #include "mojo/application/public/cpp/application_impl.h" 9 #include "mojo/application/public/cpp/application_impl.h"
10 10
11 namespace mus { 11 namespace mus {
12 12
13 void CreateWindowTreeHost(mojom::WindowTreeHostFactory* factory, 13 void CreateWindowTreeHost(mojom::WindowTreeHostFactory* factory,
14 mojom::WindowTreeHostClientPtr host_client, 14 mojom::WindowTreeHostClientPtr host_client,
15 WindowTreeDelegate* delegate, 15 WindowTreeDelegate* delegate,
16 mojom::WindowTreeHostPtr* host) { 16 mojom::WindowTreeHostPtr* host,
17 mojom::WindowManagerPtr window_manager) {
17 mojom::WindowTreeClientPtr tree_client; 18 mojom::WindowTreeClientPtr tree_client;
18 WindowTreeConnection::Create( 19 WindowTreeConnection::Create(
19 delegate, GetProxy(&tree_client), 20 delegate, GetProxy(&tree_client),
20 WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED); 21 WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED);
21 factory->CreateWindowTreeHost(GetProxy(host), host_client.Pass(), 22 factory->CreateWindowTreeHost(GetProxy(host), host_client.Pass(),
22 tree_client.Pass()); 23 tree_client.Pass(), window_manager.Pass());
23 } 24 }
24 25
25 void CreateSingleWindowTreeHost(mojo::ApplicationImpl* app, 26 void CreateSingleWindowTreeHost(mojo::ApplicationImpl* app,
26 WindowTreeDelegate* delegate, 27 WindowTreeDelegate* delegate,
27 mojom::WindowTreeHostPtr* host) { 28 mojom::WindowTreeHostPtr* host,
29 mojom::WindowManagerPtr window_manager) {
28 mojom::WindowTreeHostFactoryPtr factory; 30 mojom::WindowTreeHostFactoryPtr factory;
29 mojo::URLRequestPtr request(mojo::URLRequest::New()); 31 mojo::URLRequestPtr request(mojo::URLRequest::New());
30 request->url = "mojo:mus"; 32 request->url = "mojo:mus";
31 app->ConnectToService(request.Pass(), &factory); 33 app->ConnectToService(request.Pass(), &factory);
32 CreateWindowTreeHost(factory.get(), mojom::WindowTreeHostClientPtr(), 34 CreateWindowTreeHost(factory.get(), mojom::WindowTreeHostClientPtr(),
33 delegate, host); 35 delegate, host, window_manager.Pass());
34 } 36 }
35 37
36 } // namespace mus 38 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/public/cpp/lib/window_tree_client_impl.cc ('k') | components/mus/public/cpp/tests/window_server_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698