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

Unified Diff: ash/touch/touch_uma.cc

Issue 139983009: ui::LocatedEvent location() returns gfx::PointF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo accidental change. Created 6 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
Index: ash/touch/touch_uma.cc
diff --git a/ash/touch/touch_uma.cc b/ash/touch/touch_uma.cc
index 4b8cdfbc5bba6429f46328df558de3a8b542df9d..c4872a7c4485dfca39a53cf7f5eed427f74c63a7 100644
--- a/ash/touch/touch_uma.cc
+++ b/ash/touch/touch_uma.cc
@@ -286,7 +286,8 @@ void TouchUMA::RecordTouchEvent(aura::Window* target,
details->last_start_time_[event.touch_id()] = event.time_stamp();
details->start_touch_position_[event.touch_id()] = event.root_location();
- details->last_touch_position_[event.touch_id()] = event.location();
+ details->last_touch_position_[event.touch_id()] =
+ gfx::ToFlooredPoint(event.location());
details->max_distance_from_start_squared_ = 0;
if (details->last_release_time_.ToInternalValue()) {
@@ -357,7 +358,8 @@ void TouchUMA::RecordTouchEvent(aura::Window* target,
UMA_HISTOGRAM_CUSTOM_COUNTS("Ash.TouchMoveSteps", distance, 1, 1000, 50);
details->last_move_time_[event.touch_id()] = event.time_stamp();
- details->last_touch_position_[event.touch_id()] = event.location();
+ details->last_touch_position_[event.touch_id()] =
+ gfx::ToFlooredPoint(event.location());
float cur_dist = (details->start_touch_position_[event.touch_id()] -
event.root_location()).LengthSquared();
@@ -437,8 +439,8 @@ TouchUMA::GestureActionType TouchUMA::FindGestureActionType(
if (!widget)
return GESTURE_UNKNOWN;
- views::View* view = widget->GetRootView()->
- GetEventHandlerForPoint(event.location());
+ views::View* view = widget->GetRootView()->GetEventHandlerForPoint(
+ gfx::ToFlooredPoint(event.location()));
if (!view)
return GESTURE_UNKNOWN;

Powered by Google App Engine
This is Rietveld 408576698