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

Side by Side Diff: ui/events/gesture_detection/touch_disposition_gesture_filter.h

Issue 1989623002: Suppressed MEs for gestures from cancelled PEs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_EVENTS_GESTURE_DETECTION_TOUCH_DISPOSITION_GESTURE_FILTER_H_ 5 #ifndef UI_EVENTS_GESTURE_DETECTION_TOUCH_DISPOSITION_GESTURE_FILTER_H_
6 #define UI_EVENTS_GESTURE_DETECTION_TOUCH_DISPOSITION_GESTURE_FILTER_H_ 6 #define UI_EVENTS_GESTURE_DETECTION_TOUCH_DISPOSITION_GESTURE_FILTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <queue> 10 #include <queue>
(...skipping 28 matching lines...) Expand all
39 // *each* touch event, even those that did not produce a gesture. 39 // *each* touch event, even those that did not produce a gesture.
40 enum PacketResult { 40 enum PacketResult {
41 SUCCESS, // Packet successfully queued. 41 SUCCESS, // Packet successfully queued.
42 INVALID_PACKET_ORDER, // Packets were received in the wrong order, i.e., 42 INVALID_PACKET_ORDER, // Packets were received in the wrong order, i.e.,
43 // TOUCH_BEGIN should always precede other packets. 43 // TOUCH_BEGIN should always precede other packets.
44 INVALID_PACKET_TYPE, // Packet had an invalid type. 44 INVALID_PACKET_TYPE, // Packet had an invalid type.
45 }; 45 };
46 PacketResult OnGesturePacket(const GestureEventDataPacket& packet); 46 PacketResult OnGesturePacket(const GestureEventDataPacket& packet);
47 47
48 // OnTouchEventAck must be called upon receipt of every touch event ack. 48 // OnTouchEventAck must be called upon receipt of every touch event ack.
49 void OnTouchEventAck(uint32_t unique_event_id, bool event_consumed); 49 void OnTouchEventAck(uint32_t unique_touch_event_id, bool event_consumed);
50 50
51 // Whether there are any active gesture sequences still queued in the filter. 51 // Whether there are any active gesture sequences still queued in the filter.
52 bool IsEmpty() const; 52 bool IsEmpty() const;
53 53
54 private: 54 private:
55 // A single GestureSequence corresponds to all gestures created 55 // A single GestureSequence corresponds to all gestures created
56 // between the first finger down and the last finger up, including gestures 56 // between the first finger down and the last finger up, including gestures
57 // generated by timeouts from a statinoary finger. 57 // generated by timeouts from a statinoary finger.
58 typedef std::queue<GestureEventDataPacket> GestureSequence; 58 typedef std::queue<GestureEventDataPacket> GestureSequence;
59 59
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 bool needs_show_press_event_; 108 bool needs_show_press_event_;
109 bool needs_fling_ending_event_; 109 bool needs_fling_ending_event_;
110 bool needs_scroll_ending_event_; 110 bool needs_scroll_ending_event_;
111 111
112 DISALLOW_COPY_AND_ASSIGN(TouchDispositionGestureFilter); 112 DISALLOW_COPY_AND_ASSIGN(TouchDispositionGestureFilter);
113 }; 113 };
114 114
115 } // namespace ui 115 } // namespace ui
116 116
117 #endif // UI_EVENTS_GESTURE_DETECTION_TOUCH_DISPOSITION_GESTURE_FILTER_H_ 117 #endif // UI_EVENTS_GESTURE_DETECTION_TOUCH_DISPOSITION_GESTURE_FILTER_H_
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/gesture_provider.cc ('k') | ui/events/gesture_detection/touch_disposition_gesture_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698