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

Side by Side Diff: ui/base/gestures/gesture_recognizer.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/events/event_target.cc ('k') | ui/base/gestures/gesture_recognizer_impl.h » ('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_RECOGNIZER_H_ 5 #ifndef UI_BASE_GESTURES_GESTURE_RECOGNIZER_H_
6 #define UI_BASE_GESTURES_GESTURE_RECOGNIZER_H_ 6 #define UI_BASE_GESTURES_GESTURE_RECOGNIZER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 11 matching lines...) Expand all
22 // List of GestureEvent*. 22 // List of GestureEvent*.
23 typedef ScopedVector<GestureEvent> Gestures; 23 typedef ScopedVector<GestureEvent> Gestures;
24 24
25 virtual ~GestureRecognizer() {} 25 virtual ~GestureRecognizer() {}
26 26
27 // Invoked for each touch event that could contribute to the current gesture. 27 // Invoked for each touch event that could contribute to the current gesture.
28 // Returns list of zero or more GestureEvents identified after processing 28 // Returns list of zero or more GestureEvents identified after processing
29 // TouchEvent. 29 // TouchEvent.
30 // Caller would be responsible for freeing up Gestures. 30 // Caller would be responsible for freeing up Gestures.
31 virtual Gestures* ProcessTouchEventForGesture(const TouchEvent& event, 31 virtual Gestures* ProcessTouchEventForGesture(const TouchEvent& event,
32 ui::TouchStatus status, 32 ui::EventResult result,
33 GestureConsumer* consumer) = 0; 33 GestureConsumer* consumer) = 0;
34 34
35 // Touch-events can be queued to be played back at a later time. The queues 35 // Touch-events can be queued to be played back at a later time. The queues
36 // are identified by the target window. 36 // are identified by the target window.
37 virtual void QueueTouchEventForGesture(GestureConsumer* consumer, 37 virtual void QueueTouchEventForGesture(GestureConsumer* consumer,
38 const TouchEvent& event) = 0; 38 const TouchEvent& event) = 0;
39 39
40 // Process the touch-event in the queue for the window. Returns a list of 40 // Process the touch-event in the queue for the window. Returns a list of
41 // zero or more GestureEvents identified after processing the queueud 41 // zero or more GestureEvents identified after processing the queueud
42 // TouchEvent. Caller is responsible for freeing up Gestures. 42 // TouchEvent. Caller is responsible for freeing up Gestures.
(...skipping 25 matching lines...) Expand all
68 // If a gesture is underway for |consumer| |point| is set to the last touch 68 // If a gesture is underway for |consumer| |point| is set to the last touch
69 // point and true is returned. If no touch events have been processed for 69 // point and true is returned. If no touch events have been processed for
70 // |consumer| false is returned and |point| is untouched. 70 // |consumer| false is returned and |point| is untouched.
71 virtual bool GetLastTouchPointForTarget(GestureConsumer* consumer, 71 virtual bool GetLastTouchPointForTarget(GestureConsumer* consumer,
72 gfx::Point* point) = 0; 72 gfx::Point* point) = 0;
73 }; 73 };
74 74
75 } // namespace ui 75 } // namespace ui
76 76
77 #endif // UI_BASE_GESTURES_GESTURE_RECOGNIZER_H_ 77 #endif // UI_BASE_GESTURES_GESTURE_RECOGNIZER_H_
OLDNEW
« no previous file with comments | « ui/base/events/event_target.cc ('k') | ui/base/gestures/gesture_recognizer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698