OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/ui/ws/window_tree_host_factory.h" | 5 #include "services/ui/ws/window_tree_host_factory.h" |
6 | 6 |
7 #include "services/ui/surfaces/surfaces_state.h" | 7 #include "services/ui/surfaces/display_compositor.h" |
8 #include "services/ui/ws/display.h" | 8 #include "services/ui/ws/display.h" |
9 #include "services/ui/ws/display_binding.h" | 9 #include "services/ui/ws/display_binding.h" |
10 #include "services/ui/ws/window_server.h" | 10 #include "services/ui/ws/window_server.h" |
11 | 11 |
12 namespace ui { | 12 namespace ui { |
13 namespace ws { | 13 namespace ws { |
14 | 14 |
15 WindowTreeHostFactory::WindowTreeHostFactory(WindowServer* window_server, | 15 WindowTreeHostFactory::WindowTreeHostFactory(WindowServer* window_server, |
16 const UserId& user_id) | 16 const UserId& user_id) |
17 : window_server_(window_server), user_id_(user_id) { | 17 : window_server_(window_server), user_id_(user_id) { |
18 platform_display_init_params_.surfaces_state = | 18 platform_display_init_params_.display_compositor = |
19 window_server_->GetSurfacesState(); | 19 window_server_->GetDisplayCompositor(); |
20 } | 20 } |
21 | 21 |
22 WindowTreeHostFactory::~WindowTreeHostFactory() {} | 22 WindowTreeHostFactory::~WindowTreeHostFactory() {} |
23 | 23 |
24 void WindowTreeHostFactory::AddBinding( | 24 void WindowTreeHostFactory::AddBinding( |
25 mojom::WindowTreeHostFactoryRequest request) { | 25 mojom::WindowTreeHostFactoryRequest request) { |
26 bindings_.AddBinding(this, std::move(request)); | 26 bindings_.AddBinding(this, std::move(request)); |
27 } | 27 } |
28 | 28 |
29 void WindowTreeHostFactory::CreateWindowTreeHost( | 29 void WindowTreeHostFactory::CreateWindowTreeHost( |
30 mojom::WindowTreeHostRequest host, | 30 mojom::WindowTreeHostRequest host, |
31 mojom::WindowTreeClientPtr tree_client) { | 31 mojom::WindowTreeClientPtr tree_client) { |
32 Display* display = new Display(window_server_, platform_display_init_params_); | 32 Display* display = new Display(window_server_, platform_display_init_params_); |
33 std::unique_ptr<DisplayBindingImpl> display_binding( | 33 std::unique_ptr<DisplayBindingImpl> display_binding( |
34 new DisplayBindingImpl(std::move(host), display, user_id_, | 34 new DisplayBindingImpl(std::move(host), display, user_id_, |
35 std::move(tree_client), window_server_)); | 35 std::move(tree_client), window_server_)); |
36 display->Init(std::move(display_binding)); | 36 display->Init(std::move(display_binding)); |
37 } | 37 } |
38 | 38 |
39 } // namespace ws | 39 } // namespace ws |
40 } // namespace ui | 40 } // namespace ui |
OLD | NEW |