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