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

Unified Diff: ui/events/gesture_detection/gesture_provider.h

Issue 178193022: [Android] Always insert a TouchCancel if window or tab focus is lost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 10 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
Index: ui/events/gesture_detection/gesture_provider.h
diff --git a/ui/events/gesture_detection/gesture_provider.h b/ui/events/gesture_detection/gesture_provider.h
index ad2c106b9753b3f30c006daea61b98ad144f913e..6da919301f3f6eb69eb22f7d4a73ebd741169df2 100644
--- a/ui/events/gesture_detection/gesture_provider.h
+++ b/ui/events/gesture_detection/gesture_provider.h
@@ -48,8 +48,9 @@ class GESTURE_DETECTION_EXPORT GestureProvider {
// Cancel the current touch event sequence by sending ACTION_CANCEL, and
// ignore all the subsequent events until the next ACTION_DOWN.
// One example usecase is to stop processing the touch events when showing
- // a context popup menu.
- void CancelActiveTouchSequence();
+ // a context popup menu. Returns true if there was an active touch sequence at
+ // the time of cancellation.
+ bool CancelActiveTouchSequence();
// Update whether multi-touch gestures are supported.
void SetMultiTouchSupportEnabled(bool enabled);
@@ -79,6 +80,11 @@ class GESTURE_DETECTION_EXPORT GestureProvider {
// whether double-tap is supported), see |Config.disable_click_delay|.
bool IsClickDelayDisabled() const;
+ // May be NULL if there is no currently active touch sequence.
+ const ui::MotionEvent* current_down_event() const {
+ return current_down_event_.get();
+ }
+
private:
void InitGestureDetectors(const Config& config);

Powered by Google App Engine
This is Rietveld 408576698