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

Unified Diff: ash/host/ash_window_tree_host_unified.cc

Issue 2504793002: Scale bounds in DesktopWindowTreeHostMus and in calls to SetBounds. (Closed)
Patch Set: scale factor Created 4 years, 1 month 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: ash/host/ash_window_tree_host_unified.cc
diff --git a/ash/host/ash_window_tree_host_unified.cc b/ash/host/ash_window_tree_host_unified.cc
index 550a13d6098a5b9f8e18eeb0550408d8db1f5e2d..a103ac8dc0a1a70cf77dfe74bbbeac883f307364 100644
--- a/ash/host/ash_window_tree_host_unified.cc
+++ b/ash/host/ash_window_tree_host_unified.cc
@@ -14,6 +14,7 @@
#include "ui/aura/window_event_dispatcher.h"
#include "ui/aura/window_targeter.h"
#include "ui/compositor/compositor.h"
+#include "ui/gfx/geometry/dip_util.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/platform_window/stub/stub_window.h"
@@ -51,7 +52,8 @@ AshWindowTreeHostUnified::AshWindowTreeHostUnified(
const gfx::Rect& initial_bounds)
: AshWindowTreeHostPlatform() {
std::unique_ptr<ui::PlatformWindow> window(new ui::StubWindow(this));
- window->SetBounds(initial_bounds);
+ window->SetBounds(gfx::ConvertRectToPixel(compositor()->device_scale_factor(),
sadrul 2016/11/17 20:26:21 It may make sense to rename PlatformWindow::SetBou
riajiang 2016/11/17 21:43:28 Added to that bug.
+ initial_bounds));
SetPlatformWindow(std::move(window));
}
« no previous file with comments | « no previous file | blimp/client/app/linux/blimp_display_manager.cc » ('j') | blimp/client/app/linux/blimp_display_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698