Index: content/browser/renderer_host/input/touch_event_queue.h |
diff --git a/content/browser/renderer_host/input/touch_event_queue.h b/content/browser/renderer_host/input/touch_event_queue.h |
index aa211af8a649e6dfd5f233b55d17e203c99618d4..a79a33a56108866b9d82a9763cc56c2e0faeb634 100644 |
--- a/content/browser/renderer_host/input/touch_event_queue.h |
+++ b/content/browser/renderer_host/input/touch_event_queue.h |
@@ -82,7 +82,7 @@ class CONTENT_EXPORT TouchEventQueue { |
} |
bool has_handlers() const { |
- return has_handlers_; |
+ return touch_handling_state_ != NO_TOUCH_HANDLER; |
} |
private: |
@@ -133,15 +133,15 @@ class CONTENT_EXPORT TouchEventQueue { |
// ack after forwarding a touch event to the client. |
bool dispatching_touch_; |
- // Whether there are any registered touch handlers. Defaults to false. |
- bool has_handlers_; |
- |
- // Don't send touch events to the renderer while scrolling. |
- bool scroll_in_progress_; |
- |
- // Whether an event in the current (multi)touch sequence was consumed by the |
- // renderer. The touch timeout will never be activated when this is true. |
- bool renderer_is_consuming_touch_gesture_; |
+ // Determines touch event forwarding decisions. |
+ enum TouchHandlingState { |
+ HAS_TOUCH_HANDLER, // All events forwarded. |
+ NO_TOUCH_HANDLER, // No events forwarded. |
+ NO_TOUCH_HANDLER_FOR_GESTURE, // No more events in the sequence forwarded. |
+ RENDERER_CONSUMING_GESTURE, // All events in the sequence forwarded. |
+ TOUCH_HANDLING_STATE_DEFAULT = NO_TOUCH_HANDLER, |
+ }; |
+ TouchHandlingState touch_handling_state_; |
// Optional handler for timed-out touch event acks, disabled by default. |
bool ack_timeout_enabled_; |