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

Unified Diff: ui/aura/mus/window_tree_host_mus.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 side-by-side diff with in-line comments
Download patch
Index: ui/aura/mus/window_tree_host_mus.cc
diff --git a/ui/aura/mus/window_tree_host_mus.cc b/ui/aura/mus/window_tree_host_mus.cc
index 2c6f3b2dd4321994dd07a7f0c902d7e939ed1945..7e99a23e214ea993b7b6e9abb8d8c43a4d21f0fd 100644
--- a/ui/aura/mus/window_tree_host_mus.cc
+++ b/ui/aura/mus/window_tree_host_mus.cc
@@ -43,6 +43,10 @@ WindowTreeHostMus::WindowTreeHostMus(WindowTreeHostMusInitParams init_params)
: WindowTreeHostPlatform(std::move(init_params.window_port)),
display_id_(init_params.display_id),
delegate_(init_params.window_tree_client) {
+ gfx::Rect bounds_in_pixels;
+ display_init_params_ = std::move(init_params.display_init_params);
+ if (display_init_params_)
+ bounds_in_pixels = display_init_params_->viewport_metrics.bounds_in_pixels;
window()->SetProperty(kWindowTreeHostMusKey, this);
// TODO(sky): find a cleaner way to set this! Better solution is to likely
// have constructor take aura::Window.
@@ -77,8 +81,8 @@ WindowTreeHostMus::WindowTreeHostMus(WindowTreeHostMusInitParams init_params)
// Do not advertise accelerated widget; already set manually.
const bool use_default_accelerated_widget = false;
- SetPlatformWindow(
- base::MakeUnique<ui::StubWindow>(this, use_default_accelerated_widget));
+ SetPlatformWindow(base::MakeUnique<ui::StubWindow>(
+ this, use_default_accelerated_widget, bounds_in_pixels));
input_method_ = base::MakeUnique<InputMethodMus>(this, window());
input_method_->Init(init_params.window_tree_client->connector());
@@ -164,6 +168,11 @@ display::Display WindowTreeHostMus::GetDisplay() const {
return display;
}
+std::unique_ptr<DisplayInitParams>
+WindowTreeHostMus::ReleaseDisplayInitParams() {
+ return std::move(display_init_params_);
+}
+
void WindowTreeHostMus::HideImpl() {
WindowTreeHostPlatform::HideImpl();
window()->Hide();

Powered by Google App Engine
This is Rietveld 408576698