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

Unified Diff: ui/aura/mus/window_tree_host_mus.cc

Issue 2833093002: WIP: simplified display management in ash (Closed)
Patch Set: merge and more fixs 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
« no previous file with comments | « ui/aura/mus/window_tree_host_mus.h ('k') | ui/aura/mus/window_tree_host_mus_init_params.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0102cea43768e688c89711885bf819352796f571 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;
+ initial_metrics_ = init_params.viewport_metrics.Clone();
+ initial_display_ = std::move(init_params.display);
+ bounds_in_pixels = initial_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,14 @@ display::Display WindowTreeHostMus::GetDisplay() const {
return display;
}
+ui::mojom::WmViewportMetricsPtr WindowTreeHostMus::ReleaseInitialMetrics() {
+ return std::move(initial_metrics_);
+}
+
+std::unique_ptr<display::Display> WindowTreeHostMus::ReleaseInitialDisplay() {
+ return std::move(initial_display_);
+}
+
void WindowTreeHostMus::HideImpl() {
WindowTreeHostPlatform::HideImpl();
window()->Hide();
« no previous file with comments | « ui/aura/mus/window_tree_host_mus.h ('k') | ui/aura/mus/window_tree_host_mus_init_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698