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

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

Issue 2158423002: Wheel scroll latching enabled behind flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: content/browser/renderer_host/input/mouse_wheel_event_queue.h
diff --git a/content/browser/renderer_host/input/mouse_wheel_event_queue.h b/content/browser/renderer_host/input/mouse_wheel_event_queue.h
index a2722310b74b68c0c7e5c3f261851c65a969432d..5e0c0e12a2790acbba97f5843a81c3387f91302e 100644
--- a/content/browser/renderer_host/input/mouse_wheel_event_queue.h
+++ b/content/browser/renderer_host/input/mouse_wheel_event_queue.h
@@ -17,9 +17,8 @@ namespace content {
// The duration in which a ScrollEnd will be sent after the last
// ScrollUpdate was sent for wheel based gesture scrolls.
-// Set the default wheel transaction to 0ms until
-// crbug.com/526463 is fully implemented.
-const int64_t kDefaultWheelScrollTransactionMs = 0; // 100;
+// This value is used only if |enable_scroll_latching_| is true.
+const int64_t kDefaultWheelScrollLatchingTransactionMs = 100;
class QueuedWebMouseWheelEvent;
@@ -47,7 +46,7 @@ class CONTENT_EXPORT MouseWheelEventQueue {
// |scroll_transaction_ms| is the duration in which the
// ScrollEnd should be sent after a ScrollUpdate.
MouseWheelEventQueue(MouseWheelEventQueueClient* client,
- int64_t scroll_transaction_ms);
+ bool enable_scroll_latching);
~MouseWheelEventQueue();
@@ -97,6 +96,9 @@ class CONTENT_EXPORT MouseWheelEventQueue {
// GSB has been sent in the past.
bool needs_scroll_end_;
+ // True if the touchpad and wheel scroll latching is enabled.
+ bool enable_scroll_latching_;
+
int64_t scroll_transaction_ms_;
blink::WebGestureDevice scrolling_device_;

Powered by Google App Engine
This is Rietveld 408576698