| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WebTouchEvent_h |
| 6 #define WebTouchEvent_h |
| 7 |
| 8 #include "WebInputEvent.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 // See WebInputEvent.h for details why this pack is here. |
| 13 #pragma pack(push, 4) |
| 14 |
| 15 // WebTouchEvent -------------------------------------------------------------- |
| 16 |
| 17 // TODO(e_hakkinen): Replace with WebPointerEvent. crbug.com/508283 |
| 18 class WebTouchEvent : public WebInputEvent { |
| 19 public: |
| 20 // Maximum number of simultaneous touches supported on |
| 21 // Ash/Aura. |
| 22 enum { kTouchesLengthCap = 16 }; |
| 23 |
| 24 unsigned touchesLength; |
| 25 // List of all touches, regardless of state. |
| 26 WebTouchPoint touches[kTouchesLengthCap]; |
| 27 |
| 28 // Whether the event is blocking, non-blocking, all event |
| 29 // listeners were passive or was forced to be non-blocking. |
| 30 DispatchType dispatchType; |
| 31 |
| 32 // For a single touch, this is true after the touch-point has moved beyond |
| 33 // the platform slop region. For a multitouch, this is true after any |
| 34 // touch-point has moved (by whatever amount). |
| 35 bool movedBeyondSlopRegion; |
| 36 |
| 37 // Whether this touch event is a touchstart or a first touchmove event per |
| 38 // scroll. |
| 39 bool touchStartOrFirstTouchMove; |
| 40 |
| 41 // A unique identifier for the touch event. Valid ids start at one and |
| 42 // increase monotonically. Zero means an unknown id. |
| 43 uint32_t uniqueTouchEventId; |
| 44 |
| 45 WebTouchEvent() |
| 46 : WebInputEvent(sizeof(WebTouchEvent)), dispatchType(Blocking) {} |
| 47 |
| 48 WebTouchEvent(Type type, int modifiers, double timeStampSeconds) |
| 49 : WebInputEvent(sizeof(WebTouchEvent), type, modifiers, timeStampSeconds), |
| 50 dispatchType(Blocking) {} |
| 51 }; |
| 52 |
| 53 #pragma pack(pop) |
| 54 |
| 55 } // namespace blink |
| 56 |
| 57 #endif // WebTouchEvent_h |
| OLD | NEW |