| Index: ui/events/gesture_detection/filtered_gesture_provider.h
|
| diff --git a/ui/events/gesture_detection/filtered_gesture_provider.h b/ui/events/gesture_detection/filtered_gesture_provider.h
|
| index 231e62bf7fa21a444109ce209b596e86bac4ebc5..ad71e523eb015b8ea9887228d3e45b676f95b2fd 100644
|
| --- a/ui/events/gesture_detection/filtered_gesture_provider.h
|
| +++ b/ui/events/gesture_detection/filtered_gesture_provider.h
|
| @@ -6,6 +6,7 @@
|
| #define UI_EVENTS_GESTURE_DETECTION_FILTERED_GESTURE_PROVIDER_H_
|
|
|
| #include "base/basictypes.h"
|
| +#include "base/compiler_specific.h"
|
| #include "ui/events/gesture_detection/gesture_event_data_packet.h"
|
| #include "ui/events/gesture_detection/gesture_provider.h"
|
| #include "ui/events/gesture_detection/touch_disposition_gesture_filter.h"
|
| @@ -23,16 +24,28 @@ class GESTURE_DETECTION_EXPORT FilteredGestureProvider
|
| FilteredGestureProvider(const GestureProvider::Config& config,
|
| GestureProviderClient* client);
|
|
|
| - // Returns true if |event| was both valid and successfully handled by the
|
| - // gesture provider. Otherwise, returns false, in which case the caller
|
| - // should drop |event|, not forwarding it to the renderer.
|
| - bool OnTouchEvent(const MotionEvent& event);
|
| + struct TouchHandlingResult {
|
| + TouchHandlingResult();
|
|
|
| - // To be called upon ack of an event that was forwarded after a successful
|
| - // call to |OnTouchEvent()|.
|
| - void OnTouchEventAck(bool event_consumed);
|
| + // True if |event| was both valid and successfully handled by the
|
| + // gesture provider. Otherwise, false, in which case the caller should drop
|
| + // |event| and cease further propagation.
|
| + bool succeeded;
|
| +
|
| + // Whether |event| produced scrolling motion, either the start of a scroll,
|
| + // subsequent scroll movement or a fling event.
|
| + // TODO(jdduke): Figure out a way to guarantee that this bit propagates with
|
| + // the processed touch event as it moves downstream.
|
| + bool did_generate_scroll;
|
| + };
|
| + TouchHandlingResult OnTouchEvent(const MotionEvent& event) WARN_UNUSED_RESULT;
|
| +
|
| + // To be called upon asynchronous and synchronous ack of an event that was
|
| + // forwarded after a successful call to |OnTouchEvent()|.
|
| + void OnTouchEventAck(uint32 unique_event_id, bool event_consumed);
|
|
|
| // Methods delegated to |gesture_provider_|.
|
| + void ResetDetection();
|
| void SetMultiTouchZoomSupportEnabled(bool enabled);
|
| void SetDoubleTapSupportForPlatformEnabled(bool enabled);
|
| void SetDoubleTapSupportForPageEnabled(bool enabled);
|
| @@ -51,6 +64,7 @@ class GESTURE_DETECTION_EXPORT FilteredGestureProvider
|
| ui::TouchDispositionGestureFilter gesture_filter_;
|
|
|
| bool handling_event_;
|
| + bool last_touch_event_did_generate_scroll_;
|
| ui::GestureEventDataPacket pending_gesture_packet_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(FilteredGestureProvider);
|
|
|