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

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

Issue 10964051: events: Clean up dispatching code for touch-events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 2 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/base/gestures/gesture_recognizer_impl.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/event_constants.h" 9 #include "ui/base/events/event_constants.h"
10 #include "ui/base/gestures/gesture_point.h" 10 #include "ui/base/gestures/gesture_point.h"
(...skipping 28 matching lines...) Expand all
39 explicit GestureSequence(GestureEventHelper* consumer); 39 explicit GestureSequence(GestureEventHelper* consumer);
40 virtual ~GestureSequence(); 40 virtual ~GestureSequence();
41 41
42 typedef GestureRecognizer::Gestures Gestures; 42 typedef GestureRecognizer::Gestures Gestures;
43 43
44 // Invoked for each touch event that could contribute to the current gesture. 44 // Invoked for each touch event that could contribute to the current gesture.
45 // Returns list of zero or more GestureEvents identified after processing 45 // Returns list of zero or more GestureEvents identified after processing
46 // TouchEvent. 46 // TouchEvent.
47 // Caller would be responsible for freeing up Gestures. 47 // Caller would be responsible for freeing up Gestures.
48 virtual Gestures* ProcessTouchEventForGesture(const TouchEvent& event, 48 virtual Gestures* ProcessTouchEventForGesture(const TouchEvent& event,
49 ui::TouchStatus status); 49 EventResult status);
50 const GesturePoint* points() const { return points_; } 50 const GesturePoint* points() const { return points_; }
51 int point_count() const { return point_count_; } 51 int point_count() const { return point_count_; }
52 52
53 const gfx::Point& last_touch_location() const { return last_touch_location_; } 53 const gfx::Point& last_touch_location() const { return last_touch_location_; }
54 54
55 protected: 55 protected:
56 virtual base::OneShotTimer<GestureSequence>* CreateTimer(); 56 virtual base::OneShotTimer<GestureSequence>* CreateTimer();
57 base::OneShotTimer<GestureSequence>* long_press_timer() { 57 base::OneShotTimer<GestureSequence>* long_press_timer() {
58 return long_press_timer_.get(); 58 return long_press_timer_.get();
59 } 59 }
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 gfx::Point last_touch_location_; 209 gfx::Point last_touch_location_;
210 210
211 GestureEventHelper* helper_; 211 GestureEventHelper* helper_;
212 212
213 DISALLOW_COPY_AND_ASSIGN(GestureSequence); 213 DISALLOW_COPY_AND_ASSIGN(GestureSequence);
214 }; 214 };
215 215
216 } // namespace ui 216 } // namespace ui
217 217
218 #endif // UI_BASE_GESTURES_GESTURE_SEQUENCE_H_ 218 #endif // UI_BASE_GESTURES_GESTURE_SEQUENCE_H_
OLDNEW
« no previous file with comments | « ui/base/gestures/gesture_recognizer_impl.cc ('k') | ui/base/gestures/gesture_sequence.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698