OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 "services/ui/ws/window_tree_host_factory_registrar.h" |
| 6 |
| 7 #include "services/ui/ws/window_server.h" |
| 8 #include "services/ui/ws/window_tree_host_factory.h" |
| 9 |
| 10 namespace ui { |
| 11 namespace ws { |
| 12 |
| 13 WindowTreeHostFactoryRegistrar::WindowTreeHostFactoryRegistrar( |
| 14 WindowServer* window_server, |
| 15 const UserId& user_id) |
| 16 : window_server_(window_server), user_id_(user_id) {} |
| 17 |
| 18 WindowTreeHostFactoryRegistrar::~WindowTreeHostFactoryRegistrar() {} |
| 19 |
| 20 void WindowTreeHostFactoryRegistrar::Register( |
| 21 mojom::WindowTreeHostFactoryRequest host_factory_request, |
| 22 mojom::WindowTreeRequest tree_request, |
| 23 mojom::WindowTreeClientPtr tree_client) { |
| 24 std::unique_ptr<WindowTreeHostFactory> host_factory( |
| 25 new WindowTreeHostFactory(window_server_, user_id_)); |
| 26 host_factory->Init(std::move(host_factory_request), std::move(tree_request), |
| 27 std::move(tree_client)); |
| 28 |
| 29 window_server_->set_window_tree_host_factory(std::move(host_factory)); |
| 30 } |
| 31 |
| 32 } // namespace ws |
| 33 } // namespace ui |
OLD | NEW |