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

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

Issue 1987343002: Drag and drop cleans up touch sequences from the source window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 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_aura_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 245685257ba215cdc4609b7cb73404f97a17df00..bc20699ce59bc479d118bd9d00d87ffc2bb9baf4 100644
--- a/ui/events/gestures/gesture_recognizer.h
+++ b/ui/events/gestures/gesture_recognizer.h
@@ -62,13 +62,15 @@ class EVENTS_EXPORT GestureRecognizer {
// |not_cancelled| == nullptr, cancels all touches.
virtual void CancelActiveTouchesExcept(GestureConsumer* not_cancelled) = 0;
- // Makes |new_consumer| the target for events previously targeting
- // |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).
+ enum class ShouldCancelTouches { Cancel, DontCancel };
+
+ // Transfer the gesture stream from the drag source (current_consumer) to the
+ // consumer used for dragging (new_consumer). If |should_cancel_touches| is
+ // Cancel, dispatches cancel events to |current_consumer| to ensure that its
+ // touch stream remains valid.
virtual void TransferEventsTo(GestureConsumer* current_consumer,
- GestureConsumer* new_consumer) = 0;
+ GestureConsumer* new_consumer,
+ ShouldCancelTouches should_cancel_touches) = 0;
// If a gesture is underway for |consumer| |point| is set to the last touch
// point and true is returned. If no touch events have been processed for
« no previous file with comments | « ui/events/gestures/gesture_provider_aura_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