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

Unified Diff: services/ui/ws/window_manager_state.cc

Issue 2736943003: Start to decouple display::Display from ws::PlatformDisplay. (Closed)
Patch Set: Fix comments. Created 3 years, 9 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 | « services/ui/ws/test_utils.cc ('k') | services/ui/ws/window_manager_state_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_manager_state.cc
diff --git a/services/ui/ws/window_manager_state.cc b/services/ui/ws/window_manager_state.cc
index c25923222eb392af2d5fa36003a1c3c7f28e0bad..d9b9ed52c760fc9feb2932ce2b94462aeabe3a55 100644
--- a/services/ui/ws/window_manager_state.cc
+++ b/services/ui/ws/window_manager_state.cc
@@ -630,9 +630,11 @@ ServerWindow* WindowManagerState::GetRootWindowContaining(
if (window_manager_display_roots_.empty())
return nullptr;
+ // TODO(riajiang): This is broken for HDPI because it mixes PPs and DIPs. See
+ // http://crbug.com/701036 for details.
WindowManagerDisplayRoot* target_display_root = nullptr;
for (auto& display_root_ptr : window_manager_display_roots_) {
- if (display_root_ptr->display()->platform_display()->GetBounds().Contains(
+ if (display_root_ptr->display()->GetDisplay().bounds().Contains(
*location)) {
target_display_root = display_root_ptr.get();
break;
@@ -649,7 +651,7 @@ ServerWindow* WindowManagerState::GetRootWindowContaining(
// Translate the location to be relative to the display instead of relative
// to the screen space.
gfx::Point origin =
- target_display_root->display()->platform_display()->GetBounds().origin();
+ target_display_root->display()->GetDisplay().bounds().origin();
*location -= origin.OffsetFromOrigin();
return target_display_root->root();
}
« no previous file with comments | « services/ui/ws/test_utils.cc ('k') | services/ui/ws/window_manager_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698