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

Side by Side Diff: components/mus/public/cpp/lib/window_tree_host_factory.cc

Issue 1455833005: Convert ConnectToApplication to take a params class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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
(...skipping 14 matching lines...) Expand all
25 tree_client.Pass(), window_manager.Pass()); 25 tree_client.Pass(), window_manager.Pass());
26 } 26 }
27 27
28 void CreateSingleWindowTreeHost( 28 void CreateSingleWindowTreeHost(
29 mojo::ApplicationImpl* app, 29 mojo::ApplicationImpl* app,
30 WindowTreeDelegate* delegate, 30 WindowTreeDelegate* delegate,
31 mojom::WindowTreeHostPtr* host, 31 mojom::WindowTreeHostPtr* host,
32 mojom::WindowManagerPtr window_manager, 32 mojom::WindowManagerPtr window_manager,
33 WindowManagerDelegate* window_manager_delegate) { 33 WindowManagerDelegate* window_manager_delegate) {
34 mojom::WindowTreeHostFactoryPtr factory; 34 mojom::WindowTreeHostFactoryPtr factory;
35 mojo::URLRequestPtr request(mojo::URLRequest::New()); 35 app->ConnectToService("mojo:mus", &factory);
36 request->url = "mojo:mus";
37 app->ConnectToService(request.Pass(), &factory);
38 CreateWindowTreeHost(factory.get(), mojom::WindowTreeHostClientPtr(), 36 CreateWindowTreeHost(factory.get(), mojom::WindowTreeHostClientPtr(),
39 delegate, host, window_manager.Pass(), 37 delegate, host, window_manager.Pass(),
40 window_manager_delegate); 38 window_manager_delegate);
41 } 39 }
42 40
43 } // namespace mus 41 } // namespace mus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698