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

Unified Diff: ui/events/gesture_detection/gesture_event_data_packet.h

Issue 1287103004: Sync ui/events to chromium @ https://codereview.chromium.org/1210203002 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 4 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: 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..8b0c63f063c29eb7a7b087cd41a52ece3d100c07 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 {
+ PENDING,
+ CONSUMED,
+ UNCONSUMED,
+ };
+
GestureEventDataPacket();
GestureEventDataPacket(const GestureEventDataPacket& other);
~GestureEventDataPacket();
@@ -48,11 +54,18 @@ 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_; }
+ // We store the ack with the packet until the packet reaches the
+ // head of the queue, and then we handle the ack.
+ void Ack(bool event_consumed);
+ AckState ack_state() { return ack_state_; }
+ uint32 unique_touch_event_id() const { return unique_touch_event_id_; }
+
private:
GestureEventDataPacket(base::TimeTicks timestamp,
GestureSource source,
const gfx::PointF& touch_location,
- const gfx::PointF& raw_touch_location);
+ const gfx::PointF& raw_touch_location,
+ uint32 unique_touch_event_id);
enum { kTypicalMaxGesturesPerTouch = 5 };
base::TimeTicks timestamp_;
@@ -60,6 +73,8 @@ class GESTURE_DETECTION_EXPORT GestureEventDataPacket {
gfx::PointF touch_location_;
gfx::PointF raw_touch_location_;
GestureSource gesture_source_;
+ AckState ack_state_;
+ uint32 unique_touch_event_id_;
};
} // namespace ui
« no previous file with comments | « ui/events/gesture_detection/gesture_event_data.cc ('k') | ui/events/gesture_detection/gesture_event_data_packet.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698