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

Unified Diff: content/browser/renderer_host/input/gesture_event_queue.h

Issue 1003023002: Signal input flush when all flings have terminated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test compile Created 5 years, 9 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 | « no previous file | content/browser/renderer_host/input/gesture_event_queue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/gesture_event_queue.h
diff --git a/content/browser/renderer_host/input/gesture_event_queue.h b/content/browser/renderer_host/input/gesture_event_queue.h
index 208b2de457c9c56d3eb8f5cb1453e89a310a5558..693d25d6aa02311d89703ad8fe83acf7efa6f07b 100644
--- a/content/browser/renderer_host/input/gesture_event_queue.h
+++ b/content/browser/renderer_host/input/gesture_event_queue.h
@@ -93,9 +93,8 @@ class CONTENT_EXPORT GestureEventQueue {
blink::WebInputEvent::Type type,
const ui::LatencyInfo& latency);
- // Sets the state of the |fling_in_progress_| field to indicate that a fling
- // is definitely not in progress.
- void FlingHasBeenHalted();
+ // Notify the queue that a gesture fling animation in the renderer has ended.
+ void DidStopFlinging();
// Returns the |TouchpadTapSuppressionController| instance.
TouchpadTapSuppressionController* GetTouchpadTapSuppressionController();
@@ -107,6 +106,8 @@ class CONTENT_EXPORT GestureEventQueue {
debouncing_deferral_queue_.empty();
}
+ int active_fling_count() const { return active_fling_count_; }
+
void set_debounce_interval_time_ms_for_testing(int interval_ms) {
debounce_interval_ = base::TimeDelta::FromMilliseconds(interval_ms);
}
@@ -158,9 +159,10 @@ class CONTENT_EXPORT GestureEventQueue {
// The receiver of all forwarded gesture events.
GestureEventQueueClient* client_;
- // True if a GestureFlingStart is in progress on the renderer or
- // queued without a subsequent queued GestureFlingCancel event.
- bool fling_in_progress_;
+ // Whether there are any active flings in the renderer. As the fling
+ // end notification is asynchronous, we use a count rather than a boolean
+ // to avoid races in bookkeeping when starting a new fling.
+ int active_fling_count_;
// True if a GestureScrollUpdate sequence is in progress.
bool scrolling_in_progress_;
« no previous file with comments | « no previous file | content/browser/renderer_host/input/gesture_event_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698