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

Side by Side Diff: ui/base/gestures/gesture_sequence.h

Issue 10816008: ash: Record some additional information about the gestures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 8 years, 5 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 | « ui/aura/root_window.cc ('k') | ui/base/gestures/gesture_sequence.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 #ifndef UI_BASE_GESTURES_GESTURE_SEQUENCE_H_ 5 #ifndef UI_BASE_GESTURES_GESTURE_SEQUENCE_H_
6 #define UI_BASE_GESTURES_GESTURE_SEQUENCE_H_ 6 #define UI_BASE_GESTURES_GESTURE_SEQUENCE_H_
7 7
8 #include "base/timer.h" 8 #include "base/timer.h"
9 #include "ui/base/events.h" 9 #include "ui/base/events.h"
10 #include "ui/base/gestures/gesture_point.h" 10 #include "ui/base/gestures/gesture_point.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void ResetVelocities(); 68 void ResetVelocities();
69 69
70 GesturePoint& GesturePointForEvent(const TouchEvent& event); 70 GesturePoint& GesturePointForEvent(const TouchEvent& event);
71 71
72 // Do a linear scan through points_ to find the GesturePoint 72 // Do a linear scan through points_ to find the GesturePoint
73 // with id |point_id|. 73 // with id |point_id|.
74 GesturePoint* GetPointByPointId(int point_id); 74 GesturePoint* GetPointByPointId(int point_id);
75 75
76 bool IsSecondTouchDownCloseEnoughForTwoFingerTap(); 76 bool IsSecondTouchDownCloseEnoughForTwoFingerTap();
77 77
78 // Creates a gesture event with the specified parameters. The function
79 // includes some common information (e.g. number of touch-points in the
80 // gesture etc.) in the gesture event as well.
81 GestureEvent* CreateGestureEvent(const GestureEventDetails& details,
82 const gfx::Point& location,
83 int flags,
84 base::Time timestamp,
85 unsigned int touch_id_bitmask);
86
78 // Functions to be called to add GestureEvents, after successful recognition. 87 // Functions to be called to add GestureEvents, after successful recognition.
79 88
80 // Tap gestures. 89 // Tap gestures.
81 void AppendTapDownGestureEvent(const GesturePoint& point, Gestures* gestures); 90 void AppendTapDownGestureEvent(const GesturePoint& point, Gestures* gestures);
82 void AppendBeginGestureEvent(const GesturePoint& point, Gestures* gestures); 91 void AppendBeginGestureEvent(const GesturePoint& point, Gestures* gestures);
83 void AppendEndGestureEvent(const GesturePoint& point, Gestures* gestures); 92 void AppendEndGestureEvent(const GesturePoint& point, Gestures* gestures);
84 void AppendClickGestureEvent(const GesturePoint& point, Gestures* gestures); 93 void AppendClickGestureEvent(const GesturePoint& point, Gestures* gestures);
85 void AppendDoubleClickGestureEvent(const GesturePoint& point, 94 void AppendDoubleClickGestureEvent(const GesturePoint& point,
86 Gestures* gestures); 95 Gestures* gestures);
87 void AppendLongPressGestureEvent(); 96 void AppendLongPressGestureEvent();
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 gfx::Point last_touch_location_; 210 gfx::Point last_touch_location_;
202 211
203 GestureEventHelper* helper_; 212 GestureEventHelper* helper_;
204 213
205 DISALLOW_COPY_AND_ASSIGN(GestureSequence); 214 DISALLOW_COPY_AND_ASSIGN(GestureSequence);
206 }; 215 };
207 216
208 } // namespace ui 217 } // namespace ui
209 218
210 #endif // UI_BASE_GESTURES_GESTURE_SEQUENCE_H_ 219 #endif // UI_BASE_GESTURES_GESTURE_SEQUENCE_H_
OLDNEW
« no previous file with comments | « ui/aura/root_window.cc ('k') | ui/base/gestures/gesture_sequence.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698