Chromium Code Reviews| 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 |
| 28 // Used for a WindowTreeHost that corresponds to a Display that is manually | |
| 29 // created by the window manager. | |
| 30 struct AURA_EXPORT DisplayInitParams { | |
|
Elliot Glaysher
2017/04/24 21:23:17
Make this a moveable type instead of something put
sky
2017/04/24 21:27:15
I didn't do that for two reasons:
1. I wanted to m
| |
| 31 DisplayInitParams(); | |
| 32 ~DisplayInitParams(); | |
| 33 | |
| 34 // The display, if not provided then the Display identified by | |
| 35 // |WindowTreeHostMusInitParams::display_id| must be one of the Displays | |
| 36 // contained in Screen. | |
| 37 std::unique_ptr<display::Display> display; | |
| 38 | |
| 39 ui::mojom::WmViewportMetrics viewport_metrics; | |
| 40 | |
| 41 bool is_primary_display = false; | |
| 42 }; | |
| 43 | |
| 23 // Used to create a WindowTreeHostMus. The typical case is to use | 44 // Used to create a WindowTreeHostMus. The typical case is to use |
| 24 // CreateInitParamsForTopLevel(). | 45 // CreateInitParamsForTopLevel(). |
| 25 struct AURA_EXPORT WindowTreeHostMusInitParams { | 46 struct AURA_EXPORT WindowTreeHostMusInitParams { |
| 26 WindowTreeHostMusInitParams(); | 47 WindowTreeHostMusInitParams(); |
| 27 WindowTreeHostMusInitParams(WindowTreeHostMusInitParams&& other); | 48 WindowTreeHostMusInitParams(WindowTreeHostMusInitParams&& other); |
| 28 ~WindowTreeHostMusInitParams(); | 49 ~WindowTreeHostMusInitParams(); |
| 29 | 50 |
| 30 // The WindowTreeClient; must be specified. | 51 // The WindowTreeClient; must be specified. |
| 31 WindowTreeClient* window_tree_client = nullptr; | 52 WindowTreeClient* window_tree_client = nullptr; |
| 32 | 53 |
| 33 // Used to create the Window; must be specified. | 54 // Used to create the Window; must be specified. |
| 34 std::unique_ptr<WindowPortMus> window_port; | 55 std::unique_ptr<WindowPortMus> window_port; |
| 35 | 56 |
| 36 // Properties to send to the server as well as to set on the Window. | 57 // Properties to send to the server as well as to set on the Window. |
| 37 std::map<std::string, std::vector<uint8_t>> properties; | 58 std::map<std::string, std::vector<uint8_t>> properties; |
| 38 | 59 |
| 39 cc::FrameSinkId frame_sink_id; | 60 cc::FrameSinkId frame_sink_id; |
| 40 | 61 |
| 41 // Id of the display the window should be created on. | 62 // Id of the display the window should be created on. |
| 42 int64_t display_id = 0; | 63 int64_t display_id = 0; |
| 64 | |
| 65 // Used when the WindowTreeHostMus corresponds to a new display manually | |
| 66 // created by the window manager. | |
| 67 std::unique_ptr<DisplayInitParams> display_init_params; | |
| 43 }; | 68 }; |
| 44 | 69 |
| 45 // Creates a WindowTreeHostMusInitParams that is used when creating a top-level | 70 // Creates a WindowTreeHostMusInitParams that is used when creating a top-level |
| 46 // window. | 71 // window. |
| 47 AURA_EXPORT WindowTreeHostMusInitParams CreateInitParamsForTopLevel( | 72 AURA_EXPORT WindowTreeHostMusInitParams CreateInitParamsForTopLevel( |
| 48 WindowTreeClient* window_tree_client, | 73 WindowTreeClient* window_tree_client, |
| 49 std::map<std::string, std::vector<uint8_t>> properties = | 74 std::map<std::string, std::vector<uint8_t>> properties = |
| 50 std::map<std::string, std::vector<uint8_t>>()); | 75 std::map<std::string, std::vector<uint8_t>>()); |
| 51 | 76 |
| 52 } // namespace aura | 77 } // namespace aura |
| 53 | 78 |
| 54 #endif // UI_AURA_MUS_WINDOW_TREE_HOST_MUS_INIT_PARAMS_H_ | 79 #endif // UI_AURA_MUS_WINDOW_TREE_HOST_MUS_INIT_PARAMS_H_ |
| OLD | NEW |