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

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

Issue 10191006: gesture recognizer: Reset velocities of the fingers after a pinch-end/swipe-end. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/base/gestures/gesture_point.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_POINT_H_ 5 #ifndef UI_BASE_GESTURES_GESTURE_POINT_H_
6 #define UI_BASE_GESTURES_GESTURE_POINT_H_ 6 #define UI_BASE_GESTURES_GESTURE_POINT_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "ui/base/gestures/velocity_calculator.h" 10 #include "ui/base/gestures/velocity_calculator.h"
11 #include "ui/gfx/point.h" 11 #include "ui/gfx/point.h"
12 12
13 namespace ui { 13 namespace ui {
14 class TouchEvent; 14 class TouchEvent;
15 15
16 // A GesturePoint represents a single touch-point/finger during a gesture 16 // A GesturePoint represents a single touch-point/finger during a gesture
17 // recognition process. 17 // recognition process.
18 class GesturePoint { 18 class GesturePoint {
19 public: 19 public:
20 GesturePoint(); 20 GesturePoint();
21 ~GesturePoint(); 21 ~GesturePoint();
22 22
23 // Resets various states. 23 // Resets various states.
24 void Reset(); 24 void Reset();
25 25
26 void ResetVelocity();
27
26 // Updates some states when a Tap gesture has been recognized for this point. 28 // Updates some states when a Tap gesture has been recognized for this point.
27 void UpdateForTap(); 29 void UpdateForTap();
28 30
29 // Updates some states when a Scroll gesture has been recognized for this 31 // Updates some states when a Scroll gesture has been recognized for this
30 // point. 32 // point.
31 void UpdateForScroll(); 33 void UpdateForScroll();
32 34
33 // Updates states depending on the event and the gesture-state. 35 // Updates states depending on the event and the gesture-state.
34 void UpdateValues(const TouchEvent& event); 36 void UpdateValues(const TouchEvent& event);
35 37
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 VelocityCalculator velocity_calculator_; 101 VelocityCalculator velocity_calculator_;
100 102
101 int point_id_; 103 int point_id_;
102 int touch_id_; 104 int touch_id_;
103 DISALLOW_COPY_AND_ASSIGN(GesturePoint); 105 DISALLOW_COPY_AND_ASSIGN(GesturePoint);
104 }; 106 };
105 107
106 } // namespace ui 108 } // namespace ui
107 109
108 #endif // UI_BASE_GESTURES_GESTURE_POINT_H_ 110 #endif // UI_BASE_GESTURES_GESTURE_POINT_H_
OLDNEW
« no previous file with comments | « no previous file | ui/base/gestures/gesture_point.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698