Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: ui/aura/mus/window_tree_host_mus_init_params.cc

Issue 2839743002: Wires up WindowTreeClient::SetDisplayRoot() (Closed)
Patch Set: add .cc Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "ui/aura/mus/window_tree_host_mus_init_params.h" 5 #include "ui/aura/mus/window_tree_host_mus_init_params.h"
6 6
7 #include "ui/aura/mus/window_port_mus.h" 7 #include "ui/aura/mus/window_port_mus.h"
8 #include "ui/aura/mus/window_tree_client.h" 8 #include "ui/aura/mus/window_tree_client.h"
9 #include "ui/display/display.h" 9 #include "ui/display/display.h"
10 #include "ui/display/screen.h" 10 #include "ui/display/screen.h"
11 11
12 namespace aura { 12 namespace aura {
13 13
14 DisplayInitParams::DisplayInitParams() = default;
15
16 DisplayInitParams::~DisplayInitParams() = default;
17
14 WindowTreeHostMusInitParams::WindowTreeHostMusInitParams() = default; 18 WindowTreeHostMusInitParams::WindowTreeHostMusInitParams() = default;
15 19
16 WindowTreeHostMusInitParams::WindowTreeHostMusInitParams( 20 WindowTreeHostMusInitParams::WindowTreeHostMusInitParams(
17 WindowTreeHostMusInitParams&& other) = default; 21 WindowTreeHostMusInitParams&& other) = default;
18 22
19 WindowTreeHostMusInitParams::~WindowTreeHostMusInitParams() = default; 23 WindowTreeHostMusInitParams::~WindowTreeHostMusInitParams() = default;
20 24
21 WindowTreeHostMusInitParams CreateInitParamsForTopLevel( 25 WindowTreeHostMusInitParams CreateInitParamsForTopLevel(
22 WindowTreeClient* window_tree_client, 26 WindowTreeClient* window_tree_client,
23 std::map<std::string, std::vector<uint8_t>> properties) { 27 std::map<std::string, std::vector<uint8_t>> properties) {
24 WindowTreeHostMusInitParams params; 28 WindowTreeHostMusInitParams params;
25 params.window_tree_client = window_tree_client; 29 params.window_tree_client = window_tree_client;
26 params.display_id = display::Screen::GetScreen()->GetPrimaryDisplay().id(); 30 params.display_id = display::Screen::GetScreen()->GetPrimaryDisplay().id();
27 // Pass |properties| to CreateWindowPortForTopLevel() so that |properties| 31 // Pass |properties| to CreateWindowPortForTopLevel() so that |properties|
28 // are passed to the server *and* pass |properties| to the WindowTreeHostMus 32 // are passed to the server *and* pass |properties| to the WindowTreeHostMus
29 // constructor (above) which applies the properties to the Window. Some of the 33 // constructor (above) which applies the properties to the Window. Some of the
30 // properties may be server specific and not applied to the Window. 34 // properties may be server specific and not applied to the Window.
31 params.window_port = 35 params.window_port =
32 static_cast<WindowTreeHostMusDelegate*>(window_tree_client) 36 static_cast<WindowTreeHostMusDelegate*>(window_tree_client)
33 ->CreateWindowPortForTopLevel(&properties); 37 ->CreateWindowPortForTopLevel(&properties);
34 params.properties = std::move(properties); 38 params.properties = std::move(properties);
35 return params; 39 return params;
36 } 40 }
37 41
38 } // namespace aura 42 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698