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

Unified Diff: ash/display/display_util.cc

Issue 2525113002: Rename WindowTreeHost functions to indicate pixels/dips. (Closed)
Patch Set: win 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
« no previous file with comments | « ash/display/cursor_window_controller_unittest.cc ('k') | ash/display/extended_mouse_warp_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_util.cc
diff --git a/ash/display/display_util.cc b/ash/display/display_util.cc
index 84ad193020c7947ef59da5810928b3e144fcceba..bcc9ca3d609340f1bbfa40363c4d901e4a8aed36 100644
--- a/ash/display/display_util.cc
+++ b/ash/display/display_util.cc
@@ -67,7 +67,7 @@ class DisplayErrorNotificationDelegate
void ConvertPointFromScreenToNative(aura::WindowTreeHost* host,
gfx::Point* point) {
::wm::ConvertPointFromScreen(host->window(), point);
- host->ConvertPointToNativeScreen(point);
+ host->ConvertDIPToScreenInPixels(point);
}
} // namespace
@@ -123,7 +123,7 @@ void MoveCursorTo(AshWindowTreeHost* ash_host,
aura::WindowTreeHost* host = ash_host->AsWindowTreeHost();
gfx::Point point_in_native = point_in_screen;
::wm::ConvertPointFromScreen(host->window(), &point_in_native);
- host->ConvertPointToNativeScreen(&point_in_native);
+ host->ConvertDIPToScreenInPixels(&point_in_native);
// now fit the point inside the native bounds.
gfx::Rect native_bounds = host->GetBoundsInPixels();
@@ -141,20 +141,20 @@ void MoveCursorTo(AshWindowTreeHost* ash_host,
gfx::Point point_in_host = point_in_native;
point_in_host.Offset(-native_origin.x(), -native_origin.y());
- host->MoveCursorToHostLocation(point_in_host);
+ host->MoveCursorToLocationInPixels(point_in_host);
if (update_last_location_now) {
gfx::Point new_point_in_screen;
if (Shell::GetInstance()->display_manager()->IsInUnifiedMode()) {
new_point_in_screen = point_in_host;
// First convert to the unified host.
- host->ConvertPointFromHost(&new_point_in_screen);
+ host->ConvertPixelsToDIP(&new_point_in_screen);
// Then convert to the unified screen.
- Shell::GetPrimaryRootWindow()->GetHost()->ConvertPointFromHost(
+ Shell::GetPrimaryRootWindow()->GetHost()->ConvertPixelsToDIP(
&new_point_in_screen);
} else {
new_point_in_screen = point_in_native;
- host->ConvertPointFromNativeScreen(&new_point_in_screen);
+ host->ConvertScreenInPixelsToDIP(&new_point_in_screen);
::wm::ConvertPointToScreen(host->window(), &new_point_in_screen);
}
aura::Env::GetInstance()->set_last_mouse_location(new_point_in_screen);
« no previous file with comments | « ash/display/cursor_window_controller_unittest.cc ('k') | ash/display/extended_mouse_warp_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698