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 #ifndef SERVICES_UI_WS_WINDOW_TREE_HOST_FACTORY_H_ | 5 #ifndef SERVICES_UI_WS_WINDOW_TREE_HOST_FACTORY_H_ |
6 #define SERVICES_UI_WS_WINDOW_TREE_HOST_FACTORY_H_ | 6 #define SERVICES_UI_WS_WINDOW_TREE_HOST_FACTORY_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "mojo/public/cpp/bindings/binding_set.h" | 10 #include "mojo/public/cpp/bindings/binding_set.h" |
| 11 #include "services/ui/common/types.h" |
11 #include "services/ui/public/interfaces/window_tree_host.mojom.h" | 12 #include "services/ui/public/interfaces/window_tree_host.mojom.h" |
12 #include "services/ui/ws/user_id.h" | 13 #include "services/ui/ws/user_id.h" |
13 | 14 |
14 namespace ui { | 15 namespace ui { |
15 namespace ws { | 16 namespace ws { |
16 | 17 |
17 class WindowServer; | 18 class WindowServer; |
18 | 19 |
19 class WindowTreeHostFactory : public mojom::WindowTreeHostFactory { | 20 class WindowTreeHostFactory : public mojom::WindowTreeHostFactory { |
20 public: | 21 public: |
21 WindowTreeHostFactory(WindowServer* window_server, const UserId& user_id); | 22 WindowTreeHostFactory(WindowServer* window_server, const UserId& user_id); |
22 ~WindowTreeHostFactory() override; | 23 ~WindowTreeHostFactory() override; |
23 | 24 |
24 void AddBinding(mojom::WindowTreeHostFactoryRequest request); | 25 void AddBinding(mojom::WindowTreeHostFactoryRequest request); |
25 | 26 |
26 private: | 27 private: |
27 // mojom::WindowTreeHostFactory implementation. | 28 // mojom::WindowTreeHostFactory implementation. |
28 void CreateWindowTreeHost(mojom::WindowTreeHostRequest host, | 29 void CreateWindowTreeHost(mojom::WindowTreeHostRequest host, |
29 mojom::WindowTreeClientPtr tree_client) override; | 30 mojom::WindowTreeClientPtr tree_client) override; |
| 31 void CreatePlatformWindow(mojom::WindowTreeHostRequest tree_host_request, |
| 32 Id client_id) override; |
30 | 33 |
31 WindowServer* window_server_; | 34 WindowServer* window_server_; |
32 const UserId user_id_; | 35 const UserId user_id_; |
33 mojo::BindingSet<mojom::WindowTreeHostFactory> bindings_; | 36 mojo::BindingSet<mojom::WindowTreeHostFactory> bindings_; |
34 | 37 |
35 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostFactory); | 38 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostFactory); |
36 }; | 39 }; |
37 | 40 |
38 } // namespace ws | 41 } // namespace ws |
39 } // namespace ui | 42 } // namespace ui |
40 | 43 |
41 #endif // SERVICES_UI_WS_WINDOW_TREE_HOST_FACTORY_H_ | 44 #endif // SERVICES_UI_WS_WINDOW_TREE_HOST_FACTORY_H_ |
OLD | NEW |