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

Unified Diff: ash/touch/touch_uma.cc

Issue 302463004: Implementing the dispatch of the swipe gesture for one-finger touch swipes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 | « no previous file | ash/wm/gestures/overview_gesture_handler.cc » ('j') | ash/wm/toplevel_window_event_handler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/touch/touch_uma.cc
diff --git a/ash/touch/touch_uma.cc b/ash/touch/touch_uma.cc
index db9f07e1b215e6e33505d995e7a390030d24ee3b..b00255ff9e068467c6feaced33f1c076d2baf869 100644
--- a/ash/touch/touch_uma.cc
+++ b/ash/touch/touch_uma.cc
@@ -44,7 +44,7 @@ enum UMAEventType {
UMA_ET_GESTURE_PINCH_END,
UMA_ET_GESTURE_PINCH_UPDATE,
UMA_ET_GESTURE_LONG_PRESS,
- UMA_ET_GESTURE_MULTIFINGER_SWIPE,
+ UMA_ET_GESTURE_MULTIFINGER_SWIPE_2,
UMA_ET_SCROLL,
UMA_ET_SCROLL_FLING_START,
UMA_ET_SCROLL_FLING_CANCEL,
@@ -59,6 +59,7 @@ enum UMAEventType {
UMA_ET_GESTURE_SHOW_PRESS,
UMA_ET_GESTURE_TAP_CANCEL,
UMA_ET_GESTURE_WIN8_EDGE_SWIPE,
+ UMA_ET_GESTURE_MULTIFINGER_SWIPE_1,
// NOTE: Add new event types only immediately above this line. Make sure to
// update the UIEventType enum in tools/metrics/histograms/histograms.xml
// accordingly.
@@ -159,14 +160,17 @@ UMAEventType UMAEventTypeFromEvent(const ui::Event& event) {
return UMA_ET_GESTURE_LONG_PRESS;
case ui::ET_GESTURE_LONG_TAP:
return UMA_ET_GESTURE_LONG_TAP;
- case ui::ET_GESTURE_MULTIFINGER_SWIPE: {
+ case ui::ET_GESTURE_SWIPE: {
const ui::GestureEvent& gesture =
static_cast<const ui::GestureEvent&>(event);
if (gesture.details().touch_points() >= 4)
return UMA_ET_GESTURE_MULTIFINGER_SWIPE_4P;
else if (gesture.details().touch_points() == 3)
return UMA_ET_GESTURE_MULTIFINGER_SWIPE_3;
- return UMA_ET_GESTURE_MULTIFINGER_SWIPE;
+ else if (gesture.details().touch_points() == 2)
+ return UMA_ET_GESTURE_MULTIFINGER_SWIPE_2;
+ else
+ return UMA_ET_GESTURE_MULTIFINGER_SWIPE_1;
tdresser 2014/05/26 20:49:58 Can we switch to testing in ascending order instea
mfomitchev 2014/05/26 22:07:14 Ok. I am going to do the same for UMA_ET_GESTURE_S
}
case ui::ET_GESTURE_WIN8_EDGE_SWIPE:
return UMA_ET_GESTURE_WIN8_EDGE_SWIPE;
« no previous file with comments | « no previous file | ash/wm/gestures/overview_gesture_handler.cc » ('j') | ash/wm/toplevel_window_event_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698