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

Unified Diff: ui/events/gestures/gesture_recognizer.h

Issue 1287103004: Sync ui/events to chromium @ https://codereview.chromium.org/1210203002 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/gestures/gesture_provider_impl_unittest.cc ('k') | ui/events/gestures/gesture_recognizer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/gestures/gesture_recognizer.h
diff --git a/ui/events/gestures/gesture_recognizer.h b/ui/events/gestures/gesture_recognizer.h
index 5dc58346cefdabc8d9770c244a6383c982e46c7a..fd7e5448240a00903f544564a226116e70d79917 100644
--- a/ui/events/gestures/gesture_recognizer.h
+++ b/ui/events/gestures/gesture_recognizer.h
@@ -28,21 +28,16 @@ class EVENTS_EXPORT GestureRecognizer {
virtual ~GestureRecognizer() {}
// Invoked before event dispatch. If the event is invalid given the current
- // touch sequence, marks it as handled.
- virtual bool ProcessTouchEventPreDispatch(const TouchEvent& event,
+ // touch sequence, returns false.
+ virtual bool ProcessTouchEventPreDispatch(TouchEvent* event,
GestureConsumer* consumer) = 0;
+
// Returns a list of zero or more GestureEvents. The caller is responsible for
- // freeing the returned events. Called synchronously after event dispatch.
- virtual Gestures* ProcessTouchEventPostDispatch(
- const TouchEvent& event,
- ui::EventResult result,
- GestureConsumer* consumer) = 0;
- // Returns a list of zero or more GestureEvents. The caller is responsible for
- // freeing the returned events. Called when a touch event receives an
- // asynchronous ack.
- virtual Gestures* ProcessTouchEventOnAsyncAck(const TouchEvent& event,
- ui::EventResult result,
- GestureConsumer* consumer) = 0;
+ // freeing the returned events. Acks the gesture packet in the queue which
+ // matches with unique_event_id.
+ virtual Gestures* AckTouchEvent(uint32 unique_event_id,
+ ui::EventResult result,
+ GestureConsumer* consumer) = 0;
// This is called when the consumer is destroyed. So this should cleanup any
// internal state maintained for |consumer|. Returns true iff there was
@@ -65,13 +60,15 @@ class EVENTS_EXPORT GestureRecognizer {
virtual GestureConsumer* GetTargetForLocation(
const gfx::PointF& location, int source_device_id) = 0;
+ // Cancels all touches except those targeted to |not_cancelled|. If
+ // |not_cancelled| == nullptr, cancels all touches.
+ virtual void CancelActiveTouchesExcept(GestureConsumer* not_cancelled) = 0;
+
// Makes |new_consumer| the target for events previously targeting
- // |current_consumer|. All other targets are canceled.
- // The caller is responsible for updating the state of the consumers to
- // be aware of this transfer of control (there are no ENTERED/EXITED events).
- // If |new_consumer| is NULL, all events are canceled.
- // If |old_consumer| is NULL, all events not already targeting |new_consumer|
- // are canceled.
+ // |current_consumer|. Touches targeting all other targets are
+ // canceled. The caller is responsible for updating the state of the
+ // consumers to be aware of this transfer of control (there are no
+ // ENTERED/EXITED events).
virtual void TransferEventsTo(GestureConsumer* current_consumer,
GestureConsumer* new_consumer) = 0;
« no previous file with comments | « ui/events/gestures/gesture_provider_impl_unittest.cc ('k') | ui/events/gestures/gesture_recognizer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698