Index: content/browser/renderer_host/gesture_event_filter.h |
diff --git a/content/browser/renderer_host/gesture_event_filter.h b/content/browser/renderer_host/gesture_event_filter.h |
index 229904ea8d705d904cd3ca93947610ef25fa694f..ac101e4beb771491d6872ad7b7d3f48203f2b6c7 100644 |
--- a/content/browser/renderer_host/gesture_event_filter.h |
+++ b/content/browser/renderer_host/gesture_event_filter.h |
@@ -11,6 +11,7 @@ |
#include "base/memory/scoped_ptr.h" |
#include "base/timer.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
+#include "ui/gfx/transform.h" |
namespace content { |
class MockRenderWidgetHost; |
@@ -78,8 +79,9 @@ class GestureEventFilter { |
// hence that event should be handled now. |
bool ShouldHandleEventNow(); |
- // Merge or append a GestureScrollUpdate into the coalescing queue. |
- void MergeOrInsertScrollEvent( |
+ // Merge or append a GestureScrollUpdate or GesturePinchUpdate into |
+ // the coalescing queue. |
+ void MergeOrInsertScrollAndPinchEvent( |
const WebKit::WebGestureEvent& gesture_event); |
// Sub-filter for removing bounces from in-progress scrolls. |
@@ -91,6 +93,18 @@ class GestureEventFilter { |
bool ShouldForwardForTapDeferral( |
const WebKit::WebGestureEvent& gesture_event); |
+ // Whether the event_in_queue is GesturePinchUpdate or |
+ // GestureScrollUpdate and it has the same modifiers as the |
+ // new event. |
+ bool ShouldTryMerging(const WebKit::WebGestureEvent& new_event, |
+ const WebKit::WebGestureEvent& event_in_queue); |
+ |
+ // Returns the transform matrix corresponding to the gesture event. |
+ // Assumes the gesture event sent is either GestureScrollUpdate or |
+ // GesturePinchUpdate. Returns the identity matrix otherwise. |
+ gfx::Transform GetTransformForEvent( |
+ const WebKit::WebGestureEvent& gesture_event); |
+ |
// Only a RenderWidgetHostViewImpl can own an instance. |
RenderWidgetHostImpl* render_widget_host_; |
@@ -101,6 +115,14 @@ class GestureEventFilter { |
// True if a GestureScrollUpdate sequence is in progress. |
bool scrolling_in_progress_; |
+ // True if two related gesture events were sent before without waiting |
+ // for an ACK, so the next gesture ACK should be ignored. |
+ bool ignore_next_ack_; |
+ |
+ // Transform that holds the combined transform matrix for the current |
+ // scroll-pinch sequence at the end of the queue. |
+ gfx::Transform combined_scroll_pinch_; |
+ |
// Timer to release a previously deferred GestureTapDown event. |
base::OneShotTimer<GestureEventFilter> send_gtd_timer_; |