| Index: ui/events/gesture_detection/gesture_event_data_packet.h
|
| diff --git a/ui/events/gesture_detection/gesture_event_data_packet.h b/ui/events/gesture_detection/gesture_event_data_packet.h
|
| index 9b115de9ca77b29c2210b4933cd9a78acbb69198..0ae16ab04ff230fd78447fed20d7ad0abcadc25e 100644
|
| --- a/ui/events/gesture_detection/gesture_event_data_packet.h
|
| +++ b/ui/events/gesture_detection/gesture_event_data_packet.h
|
| @@ -29,6 +29,12 @@ class GESTURE_DETECTION_EXPORT GestureEventDataPacket {
|
| TOUCH_TIMEOUT, // Timeout from an existing gesture sequence.
|
| };
|
|
|
| + enum class AckState : int {
|
| + PENDING,
|
| + CONSUMED,
|
| + UNCONSUMED,
|
| + };
|
| +
|
| GestureEventDataPacket();
|
| GestureEventDataPacket(const GestureEventDataPacket& other);
|
| ~GestureEventDataPacket();
|
| @@ -48,6 +54,14 @@ class GESTURE_DETECTION_EXPORT GestureEventDataPacket {
|
| const gfx::PointF& touch_location() const { return touch_location_; }
|
| const gfx::PointF& raw_touch_location() const { return raw_touch_location_; }
|
|
|
| + // If we receive an ack for a packet before it reaches the head of the
|
| + // queue, we store the ack with the packet.
|
| + void ack(bool event_consumed) {
|
| + ack_state_ =
|
| + event_consumed ? AckState::CONSUMED : AckState::UNCONSUMED;
|
| + }
|
| + AckState ack_state() { return ack_state_; }
|
| +
|
| private:
|
| GestureEventDataPacket(base::TimeTicks timestamp,
|
| GestureSource source,
|
| @@ -60,6 +74,7 @@ class GESTURE_DETECTION_EXPORT GestureEventDataPacket {
|
| gfx::PointF touch_location_;
|
| gfx::PointF raw_touch_location_;
|
| GestureSource gesture_source_;
|
| + AckState ack_state_;
|
| };
|
|
|
| } // namespace ui
|
|
|