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

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

Issue 1749343004: Implement Wheel Gesture Scrolling on OSX. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ensure only high precision scroll begins are used Created 4 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
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 b5ad7f2dcb3829af51e750325f346c33dea0575c..a224b9e2a79a446d99a711b227520ffe4092a352 100644
--- a/content/browser/renderer_host/input/mouse_wheel_event_queue.h
+++ b/content/browser/renderer_host/input/mouse_wheel_event_queue.h
@@ -17,7 +17,9 @@ namespace content {
// The duration in which a ScrollEnd will be sent after the last
// ScrollUpdate was sent for wheel based gesture scrolls.
-const int64_t kDefaultWheelScrollTransactionMs = 100;
+// Set the default wheel transaction to 0ms until
+// crbug.com/526463 is fully implemented.
+const int64_t kDefaultWheelScrollTransactionMs = 0; // 100;
class QueuedWebMouseWheelEvent;
@@ -76,16 +78,24 @@ class CONTENT_EXPORT MouseWheelEventQueue {
private:
void TryForwardNextEventToRenderer();
- void SendScrollEnd(blink::WebGestureEvent update_event);
- void SendGesture(const GestureEventWithLatencyInfo& gesture);
+ void SendScrollEnd(blink::WebGestureEvent update_event, bool synthetic);
+ void SendScrollBegin(const GestureEventWithLatencyInfo& gesture_update,
+ bool synthetic);
MouseWheelEventQueueClient* client_;
- bool needs_scroll_begin_;
base::OneShotTimer scroll_end_timer_;
typedef std::deque<QueuedWebMouseWheelEvent*> WheelEventQueue;
WheelEventQueue wheel_queue_;
scoped_ptr<QueuedWebMouseWheelEvent> event_sent_for_gesture_ack_;
+
+ // True if a non-synthetic GSB needs to be sent before a GSU is sent.
+ bool needs_scroll_begin_;
+
+ // True if a non-synthetic GSE needs to be sent because a non-synthetic
+ // GSB has been sent in the past.
+ bool needs_scroll_end_;
+
bool send_gestures_;
int64_t scroll_transaction_ms_;
blink::WebGestureDevice scrolling_device_;

Powered by Google App Engine
This is Rietveld 408576698