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

Side by Side Diff: third_party/WebKit/public/platform/WebGestureEvent.h

Issue 2869823003: [VSync Queue] Plug touch ack to gesture events and flush vsync queue if necessary (Closed)
Patch Set: Created 3 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 WebGestureEvent_h 5 #ifndef WebGestureEvent_h
6 #define WebGestureEvent_h 6 #define WebGestureEvent_h
7 7
8 #include "WebFloatSize.h" 8 #include "WebFloatSize.h"
9 #include "WebGestureDevice.h" 9 #include "WebGestureDevice.h"
10 #include "WebInputEvent.h" 10 #include "WebInputEvent.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // contains 0. See crbug.com/618738. 46 // contains 0. See crbug.com/618738.
47 uint32_t unique_touch_event_id; 47 uint32_t unique_touch_event_id;
48 48
49 // This field exists to allow BrowserPlugin to mark GestureScroll events as 49 // This field exists to allow BrowserPlugin to mark GestureScroll events as
50 // 'resent' to handle the case where an event is not consumed when first 50 // 'resent' to handle the case where an event is not consumed when first
51 // encountered; it should be handled differently by the plugin when it is 51 // encountered; it should be handled differently by the plugin when it is
52 // sent for thesecond time. No code within Blink touches this, other than to 52 // sent for thesecond time. No code within Blink touches this, other than to
53 // plumb it through event conversions. 53 // plumb it through event conversions.
54 int resending_plugin_id; 54 int resending_plugin_id;
55 55
56 DispatchType source_touch_event_dispatch_type;
57
56 union { 58 union {
57 // Tap information must be set for GestureTap, GestureTapUnconfirmed, 59 // Tap information must be set for GestureTap, GestureTapUnconfirmed,
58 // and GestureDoubleTap events. 60 // and GestureDoubleTap events.
59 struct { 61 struct {
60 int tap_count; 62 int tap_count;
61 float width; 63 float width;
62 float height; 64 float height;
63 } tap; 65 } tap;
64 66
65 struct { 67 struct {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 float scale; 158 float scale;
157 } pinch_update; 159 } pinch_update;
158 } data; 160 } data;
159 161
160 WebGestureEvent(Type type, int modifiers, double time_stamp_seconds) 162 WebGestureEvent(Type type, int modifiers, double time_stamp_seconds)
161 : WebInputEvent(sizeof(WebGestureEvent), 163 : WebInputEvent(sizeof(WebGestureEvent),
162 type, 164 type,
163 modifiers, 165 modifiers,
164 time_stamp_seconds), 166 time_stamp_seconds),
165 source_device(kWebGestureDeviceUninitialized), 167 source_device(kWebGestureDeviceUninitialized),
166 resending_plugin_id(-1) {} 168 resending_plugin_id(-1),
169 source_touch_event_dispatch_type(kBlocking) {}
167 170
168 WebGestureEvent() 171 WebGestureEvent()
169 : WebInputEvent(sizeof(WebGestureEvent)), 172 : WebInputEvent(sizeof(WebGestureEvent)),
170 source_device(kWebGestureDeviceUninitialized), 173 source_device(kWebGestureDeviceUninitialized),
171 resending_plugin_id(-1) {} 174 resending_plugin_id(-1),
175 source_touch_event_dispatch_type(kBlocking) {}
172 176
173 #if INSIDE_BLINK 177 #if INSIDE_BLINK
174 BLINK_PLATFORM_EXPORT float DeltaXInRootFrame() const; 178 BLINK_PLATFORM_EXPORT float DeltaXInRootFrame() const;
175 BLINK_PLATFORM_EXPORT float DeltaYInRootFrame() const; 179 BLINK_PLATFORM_EXPORT float DeltaYInRootFrame() const;
176 BLINK_PLATFORM_EXPORT ScrollUnits DeltaUnits() const; 180 BLINK_PLATFORM_EXPORT ScrollUnits DeltaUnits() const;
177 BLINK_PLATFORM_EXPORT WebFloatPoint PositionInRootFrame() const; 181 BLINK_PLATFORM_EXPORT WebFloatPoint PositionInRootFrame() const;
178 BLINK_PLATFORM_EXPORT float PinchScale() const; 182 BLINK_PLATFORM_EXPORT float PinchScale() const;
179 BLINK_PLATFORM_EXPORT InertialPhaseState InertialPhase() const; 183 BLINK_PLATFORM_EXPORT InertialPhaseState InertialPhase() const;
180 BLINK_PLATFORM_EXPORT bool Synthetic() const; 184 BLINK_PLATFORM_EXPORT bool Synthetic() const;
181 185
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 231 }
228 232
229 #endif 233 #endif
230 }; 234 };
231 235
232 #pragma pack(pop) 236 #pragma pack(pop)
233 237
234 } // namespace blink 238 } // namespace blink
235 239
236 #endif // WebGestureEvent_h 240 #endif // WebGestureEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698