OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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 UI_AURA_MUS_WINDOW_TREE_HOST_MUS_INIT_PARAMS_H_ | 5 #ifndef UI_AURA_MUS_WINDOW_TREE_HOST_MUS_INIT_PARAMS_H_ |
6 #define UI_AURA_MUS_WINDOW_TREE_HOST_MUS_INIT_PARAMS_H_ | 6 #define UI_AURA_MUS_WINDOW_TREE_HOST_MUS_INIT_PARAMS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "cc/surfaces/frame_sink_id.h" | 15 #include "cc/surfaces/frame_sink_id.h" |
| 16 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" |
16 #include "ui/aura/aura_export.h" | 17 #include "ui/aura/aura_export.h" |
17 | 18 |
| 19 namespace display { |
| 20 class Display; |
| 21 } |
| 22 |
18 namespace aura { | 23 namespace aura { |
19 | 24 |
20 class WindowPortMus; | 25 class WindowPortMus; |
21 class WindowTreeClient; | 26 class WindowTreeClient; |
22 | 27 |
23 // Used to create a WindowTreeHostMus. The typical case is to use | 28 // Used to create a WindowTreeHostMus. The typical case is to use |
24 // CreateInitParamsForTopLevel(). | 29 // CreateInitParamsForTopLevel(). |
25 struct AURA_EXPORT WindowTreeHostMusInitParams { | 30 struct AURA_EXPORT WindowTreeHostMusInitParams { |
26 WindowTreeHostMusInitParams(); | 31 WindowTreeHostMusInitParams(); |
27 WindowTreeHostMusInitParams(WindowTreeHostMusInitParams&& other); | 32 WindowTreeHostMusInitParams(WindowTreeHostMusInitParams&& other); |
28 ~WindowTreeHostMusInitParams(); | 33 ~WindowTreeHostMusInitParams(); |
29 | 34 |
30 // The WindowTreeClient; must be specified. | 35 // The WindowTreeClient; must be specified. |
31 WindowTreeClient* window_tree_client = nullptr; | 36 WindowTreeClient* window_tree_client = nullptr; |
32 | 37 |
33 // Used to create the Window; must be specified. | 38 // Used to create the Window; must be specified. |
34 std::unique_ptr<WindowPortMus> window_port; | 39 std::unique_ptr<WindowPortMus> window_port; |
35 | 40 |
36 // Properties to send to the server as well as to set on the Window. | 41 // Properties to send to the server as well as to set on the Window. |
37 std::map<std::string, std::vector<uint8_t>> properties; | 42 std::map<std::string, std::vector<uint8_t>> properties; |
38 | 43 |
39 cc::FrameSinkId frame_sink_id; | 44 cc::FrameSinkId frame_sink_id; |
40 | 45 |
41 // Id of the display the window should be created on. | 46 // Id of the display the window should be created on. |
42 int64_t display_id = 0; | 47 int64_t display_id = 0; |
| 48 |
| 49 // Only used when creating a WindowTreeHostMus for a display. |
| 50 std::unique_ptr<display::Display> display; |
| 51 |
| 52 // Only used when creating a WindowTreeHostMus in the window manager. |
| 53 ui::mojom::WmViewportMetrics viewport_metrics; |
43 }; | 54 }; |
44 | 55 |
45 // Creates a WindowTreeHostMusInitParams that is used when creating a top-level | 56 // Creates a WindowTreeHostMusInitParams that is used when creating a top-level |
46 // window. | 57 // window. |
47 AURA_EXPORT WindowTreeHostMusInitParams CreateInitParamsForTopLevel( | 58 AURA_EXPORT WindowTreeHostMusInitParams CreateInitParamsForTopLevel( |
48 WindowTreeClient* window_tree_client, | 59 WindowTreeClient* window_tree_client, |
49 std::map<std::string, std::vector<uint8_t>> properties = | 60 std::map<std::string, std::vector<uint8_t>> properties = |
50 std::map<std::string, std::vector<uint8_t>>()); | 61 std::map<std::string, std::vector<uint8_t>>()); |
51 | 62 |
52 } // namespace aura | 63 } // namespace aura |
53 | 64 |
54 #endif // UI_AURA_MUS_WINDOW_TREE_HOST_MUS_INIT_PARAMS_H_ | 65 #endif // UI_AURA_MUS_WINDOW_TREE_HOST_MUS_INIT_PARAMS_H_ |
OLD | NEW |