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

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

Issue 250923004: Synthesize ctrl-wheel events on touchpad pinch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/input_router_impl.h
diff --git a/content/browser/renderer_host/input/input_router_impl.h b/content/browser/renderer_host/input/input_router_impl.h
index 6630c9197ca3356439bae6e5c3ff4ae0e761f794..e2ef55ac79cb12fb3584e5f636f906a30662e5a2 100644
--- a/content/browser/renderer_host/input/input_router_impl.h
+++ b/content/browser/renderer_host/input/input_router_impl.h
@@ -118,6 +118,10 @@ private:
const ui::LatencyInfo& latency_info,
bool is_keyboard_shortcut);
+ void SendSyntheticWheelEventForPinch(
+ const blink::WebGestureEvent& pinch_event,
+ const ui::LatencyInfo& latency_info);
+
// IPC message handlers
void OnInputEventAck(blink::WebInputEvent::Type event_type,
InputEventAckState ack_result,
@@ -221,6 +225,17 @@ private:
bool mouse_wheel_pending_;
MouseWheelEventWithLatencyInfo current_wheel_event_;
+ // Whether there is a Touchpad GesturePinchUpdate currently pending, waiting
+ // for it's synthetic WheelEvent to be handled.
+ bool pending_touchpad_pinch_;
+ // When |mouse_wheel_pending_| is true, indicates whether the current wheel
+ // event is in fact a synthetic event for touchpad pinch.
+ bool current_wheel_event_is_for_pinch_;
+ // When |pending_touchpad_pinch_| is true, this is the synthetic wheel event
+ // that will be or (if |current_wheel_event_is_for_pinch_ is true) has
+ // already been sent representing the pinch.
+ MouseWheelEventWithLatencyInfo wheel_event_for_pending_pinch_;
+
// (Similar to |next_mouse_move_|.) The next mouse wheel events to send.
// Unlike mouse moves, mouse wheel events received while one is pending are
// coalesced (by accumulating deltas) if they match the previous event in

Powered by Google App Engine
This is Rietveld 408576698