OLD | NEW |
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // as a part of fling boost events sequence. | 148 // as a part of fling boost events sequence. |
149 bool preventBoosting; | 149 bool preventBoosting; |
150 } flingCancel; | 150 } flingCancel; |
151 | 151 |
152 struct { | 152 struct { |
153 bool zoomDisabled; | 153 bool zoomDisabled; |
154 float scale; | 154 float scale; |
155 } pinchUpdate; | 155 } pinchUpdate; |
156 } data; | 156 } data; |
157 | 157 |
158 WebGestureEvent() | 158 WebGestureEvent(Type type, int modifiers, double timeStampSeconds) |
159 : WebInputEvent(sizeof(WebGestureEvent)), | 159 : WebInputEvent(sizeof(WebGestureEvent), |
160 x(0), | 160 type, |
161 y(0), | 161 modifiers, |
162 globalX(0), | 162 timeStampSeconds), |
163 globalY(0), | |
164 sourceDevice(WebGestureDeviceUninitialized), | 163 sourceDevice(WebGestureDeviceUninitialized), |
165 resendingPluginId(-1) {} | 164 resendingPluginId(-1) {} |
166 | 165 |
| 166 WebGestureEvent() |
| 167 : WebInputEvent(sizeof(WebGestureEvent)), |
| 168 sourceDevice(WebGestureDeviceUninitialized), |
| 169 resendingPluginId(-1) {} |
| 170 |
167 #if INSIDE_BLINK | 171 #if INSIDE_BLINK |
168 BLINK_PLATFORM_EXPORT float deltaXInRootFrame() const; | 172 BLINK_PLATFORM_EXPORT float deltaXInRootFrame() const; |
169 BLINK_PLATFORM_EXPORT float deltaYInRootFrame() const; | 173 BLINK_PLATFORM_EXPORT float deltaYInRootFrame() const; |
170 BLINK_PLATFORM_EXPORT ScrollUnits deltaUnits() const; | 174 BLINK_PLATFORM_EXPORT ScrollUnits deltaUnits() const; |
171 BLINK_PLATFORM_EXPORT WebFloatPoint positionInRootFrame() const; | 175 BLINK_PLATFORM_EXPORT WebFloatPoint positionInRootFrame() const; |
172 BLINK_PLATFORM_EXPORT float pinchScale() const; | 176 BLINK_PLATFORM_EXPORT float pinchScale() const; |
173 BLINK_PLATFORM_EXPORT InertialPhaseState inertialPhase() const; | 177 BLINK_PLATFORM_EXPORT InertialPhaseState inertialPhase() const; |
174 BLINK_PLATFORM_EXPORT bool synthetic() const; | 178 BLINK_PLATFORM_EXPORT bool synthetic() const; |
175 | 179 |
176 BLINK_PLATFORM_EXPORT float velocityX() const; | 180 BLINK_PLATFORM_EXPORT float velocityX() const; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 } | 224 } |
221 | 225 |
222 #endif | 226 #endif |
223 }; | 227 }; |
224 | 228 |
225 #pragma pack(pop) | 229 #pragma pack(pop) |
226 | 230 |
227 } // namespace blink | 231 } // namespace blink |
228 | 232 |
229 #endif // WebGestureEvent_h | 233 #endif // WebGestureEvent_h |
OLD | NEW |