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

Unified Diff: ui/chromeos/touch_exploration_controller.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 | « ui/aura/window_unittest.cc ('k') | ui/views/mus/desktop_window_tree_host_mus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/chromeos/touch_exploration_controller.cc
diff --git a/ui/chromeos/touch_exploration_controller.cc b/ui/chromeos/touch_exploration_controller.cc
index f2d0c833c1cde34ea17c4c47ee6d862601d90517..584c1a10da0bb5f78ee07d2212c868177ec5a4fe 100644
--- a/ui/chromeos/touch_exploration_controller.cc
+++ b/ui/chromeos/touch_exploration_controller.cc
@@ -62,7 +62,7 @@ TouchExplorationController::~TouchExplorationController() {
void TouchExplorationController::SetTouchAccessibilityAnchorPoint(
const gfx::Point& anchor_point) {
gfx::Point native_point = anchor_point;
- root_window_->GetHost()->ConvertPointToNativeScreen(&native_point);
+ root_window_->GetHost()->ConvertDIPToScreenInPixels(&native_point);
anchor_point_ = gfx::PointF(native_point.x(), native_point.y());
anchor_point_state_ = ANCHOR_POINT_EXPLICITLY_SET;
@@ -93,7 +93,7 @@ ui::EventRewriteStatus TouchExplorationController::RewriteEvent(
if (!exclude_bounds_.IsEmpty()) {
gfx::Point location = touch_event.location();
- root_window_->GetHost()->ConvertPointFromNativeScreen(&location);
+ root_window_->GetHost()->ConvertScreenInPixelsToDIP(&location);
bool in_exclude_area = exclude_bounds_.Contains(location);
if (in_exclude_area) {
if (state_ == NO_FINGERS_DOWN)
@@ -901,7 +901,7 @@ void TouchExplorationController::SideSlideControl(ui::GestureEvent* gesture) {
}
location = gesture->location();
- root_window_->GetHost()->ConvertPointFromNativeScreen(&location);
+ root_window_->GetHost()->ConvertScreenInPixelsToDIP(&location);
float volume_adjust_height =
root_window_->bounds().height() - 2 * kMaxDistanceFromEdge;
float ratio = (location.y() - kMaxDistanceFromEdge) / volume_adjust_height;
@@ -1003,7 +1003,7 @@ int TouchExplorationController::FindEdgesWithinBounds(gfx::Point point,
float bounds) {
// Since GetBoundsInScreen is in DIPs but point is not, then point needs to be
// converted.
- root_window_->GetHost()->ConvertPointFromNativeScreen(&point);
+ root_window_->GetHost()->ConvertScreenInPixelsToDIP(&point);
gfx::Rect window = root_window_->GetBoundsInScreen();
float left_edge_limit = window.x() + bounds;
« no previous file with comments | « ui/aura/window_unittest.cc ('k') | ui/views/mus/desktop_window_tree_host_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698