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

Side by Side Diff: ash/touch/touch_uma.cc

Issue 268483004: events: Remove stationary touch-event type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/aura/gestures/gesture_recognizer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/touch/touch_uma.h" 5 #include "ash/touch/touch_uma.h"
6 6
7 #include "ash/metrics/user_metrics_recorder.h" 7 #include "ash/metrics/user_metrics_recorder.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 10 matching lines...) Expand all
21 #include <X11/Xlib.h> 21 #include <X11/Xlib.h>
22 #endif 22 #endif
23 23
24 namespace { 24 namespace {
25 25
26 enum UMAEventType { 26 enum UMAEventType {
27 UMA_ET_UNKNOWN, 27 UMA_ET_UNKNOWN,
28 UMA_ET_TOUCH_RELEASED, 28 UMA_ET_TOUCH_RELEASED,
29 UMA_ET_TOUCH_PRESSED, 29 UMA_ET_TOUCH_PRESSED,
30 UMA_ET_TOUCH_MOVED, 30 UMA_ET_TOUCH_MOVED,
31 UMA_ET_TOUCH_STATIONARY, 31 UMA_ET_TOUCH_STATIONARY, // Deprecated. Do not remove.
32 UMA_ET_TOUCH_CANCELLED, 32 UMA_ET_TOUCH_CANCELLED,
33 UMA_ET_GESTURE_SCROLL_BEGIN, 33 UMA_ET_GESTURE_SCROLL_BEGIN,
34 UMA_ET_GESTURE_SCROLL_END, 34 UMA_ET_GESTURE_SCROLL_END,
35 UMA_ET_GESTURE_SCROLL_UPDATE, 35 UMA_ET_GESTURE_SCROLL_UPDATE,
36 UMA_ET_GESTURE_TAP, 36 UMA_ET_GESTURE_TAP,
37 UMA_ET_GESTURE_TAP_DOWN, 37 UMA_ET_GESTURE_TAP_DOWN,
38 UMA_ET_GESTURE_BEGIN, 38 UMA_ET_GESTURE_BEGIN,
39 UMA_ET_GESTURE_END, 39 UMA_ET_GESTURE_END,
40 UMA_ET_GESTURE_DOUBLE_TAP, 40 UMA_ET_GESTURE_DOUBLE_TAP,
41 UMA_ET_GESTURE_TRIPLE_TAP, 41 UMA_ET_GESTURE_TRIPLE_TAP,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 98
99 UMAEventType UMAEventTypeFromEvent(const ui::Event& event) { 99 UMAEventType UMAEventTypeFromEvent(const ui::Event& event) {
100 switch (event.type()) { 100 switch (event.type()) {
101 case ui::ET_TOUCH_RELEASED: 101 case ui::ET_TOUCH_RELEASED:
102 return UMA_ET_TOUCH_RELEASED; 102 return UMA_ET_TOUCH_RELEASED;
103 case ui::ET_TOUCH_PRESSED: 103 case ui::ET_TOUCH_PRESSED:
104 return UMA_ET_TOUCH_PRESSED; 104 return UMA_ET_TOUCH_PRESSED;
105 case ui::ET_TOUCH_MOVED: 105 case ui::ET_TOUCH_MOVED:
106 return UMA_ET_TOUCH_MOVED; 106 return UMA_ET_TOUCH_MOVED;
107 case ui::ET_TOUCH_STATIONARY:
108 return UMA_ET_TOUCH_STATIONARY;
109 case ui::ET_TOUCH_CANCELLED: 107 case ui::ET_TOUCH_CANCELLED:
110 return UMA_ET_TOUCH_CANCELLED; 108 return UMA_ET_TOUCH_CANCELLED;
111 case ui::ET_GESTURE_SCROLL_BEGIN: 109 case ui::ET_GESTURE_SCROLL_BEGIN:
112 return UMA_ET_GESTURE_SCROLL_BEGIN; 110 return UMA_ET_GESTURE_SCROLL_BEGIN;
113 case ui::ET_GESTURE_SCROLL_END: 111 case ui::ET_GESTURE_SCROLL_END:
114 return UMA_ET_GESTURE_SCROLL_END; 112 return UMA_ET_GESTURE_SCROLL_END;
115 case ui::ET_GESTURE_SCROLL_UPDATE: { 113 case ui::ET_GESTURE_SCROLL_UPDATE: {
116 const ui::GestureEvent& gesture = 114 const ui::GestureEvent& gesture =
117 static_cast<const ui::GestureEvent&>(event); 115 static_cast<const ui::GestureEvent&>(event);
118 if (gesture.details().touch_points() >= 4) 116 if (gesture.details().touch_points() >= 4)
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 return GESTURE_OMNIBOX_SCROLL; 462 return GESTURE_OMNIBOX_SCROLL;
465 if (event.type() == ui::ET_GESTURE_PINCH_BEGIN) 463 if (event.type() == ui::ET_GESTURE_PINCH_BEGIN)
466 return GESTURE_OMNIBOX_PINCH; 464 return GESTURE_OMNIBOX_PINCH;
467 return GESTURE_UNKNOWN; 465 return GESTURE_UNKNOWN;
468 } 466 }
469 467
470 return GESTURE_UNKNOWN; 468 return GESTURE_UNKNOWN;
471 } 469 }
472 470
473 } // namespace ash 471 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ui/aura/gestures/gesture_recognizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698