| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "components/mus/public/cpp/window_tree_host_factory.h" | |
| 6 | |
| 7 #include "components/mus/public/cpp/window_tree_client.h" | |
| 8 #include "components/mus/public/cpp/window_tree_client_delegate.h" | |
| 9 #include "services/shell/public/cpp/connector.h" | |
| 10 | |
| 11 namespace mus { | |
| 12 | |
| 13 void CreateWindowTreeHost(mojom::WindowTreeHostFactory* factory, | |
| 14 WindowTreeClientDelegate* delegate, | |
| 15 mojom::WindowTreeHostPtr* host, | |
| 16 WindowManagerDelegate* window_manager_delegate) { | |
| 17 mojom::WindowTreeClientPtr tree_client; | |
| 18 new WindowTreeClient(delegate, window_manager_delegate, | |
| 19 GetProxy(&tree_client)); | |
| 20 factory->CreateWindowTreeHost(GetProxy(host), std::move(tree_client)); | |
| 21 } | |
| 22 | |
| 23 void CreateWindowTreeHost(shell::Connector* connector, | |
| 24 WindowTreeClientDelegate* delegate, | |
| 25 mojom::WindowTreeHostPtr* host, | |
| 26 WindowManagerDelegate* window_manager_delegate) { | |
| 27 mojom::WindowTreeHostFactoryPtr factory; | |
| 28 connector->ConnectToInterface("mojo:mus", &factory); | |
| 29 CreateWindowTreeHost(factory.get(), delegate, host, window_manager_delegate); | |
| 30 } | |
| 31 | |
| 32 } // namespace mus | |
| OLD | NEW |