OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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 WebTouchEvent_h | 5 #ifndef WebTouchEvent_h |
6 #define WebTouchEvent_h | 6 #define WebTouchEvent_h |
7 | 7 |
8 #include "WebInputEvent.h" | 8 #include "WebInputEvent.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 30 matching lines...) Expand all Loading... |
41 // A unique identifier for the touch event. Valid ids start at one and | 41 // A unique identifier for the touch event. Valid ids start at one and |
42 // increase monotonically. Zero means an unknown id. | 42 // increase monotonically. Zero means an unknown id. |
43 uint32_t uniqueTouchEventId; | 43 uint32_t uniqueTouchEventId; |
44 | 44 |
45 WebTouchEvent() | 45 WebTouchEvent() |
46 : WebInputEvent(sizeof(WebTouchEvent)), dispatchType(Blocking) {} | 46 : WebInputEvent(sizeof(WebTouchEvent)), dispatchType(Blocking) {} |
47 | 47 |
48 WebTouchEvent(Type type, int modifiers, double timeStampSeconds) | 48 WebTouchEvent(Type type, int modifiers, double timeStampSeconds) |
49 : WebInputEvent(sizeof(WebTouchEvent), type, modifiers, timeStampSeconds), | 49 : WebInputEvent(sizeof(WebTouchEvent), type, modifiers, timeStampSeconds), |
50 dispatchType(Blocking) {} | 50 dispatchType(Blocking) {} |
| 51 |
| 52 #if INSIDE_BLINK |
| 53 |
| 54 // Sets any scaled values to be their computed values and sets |frameScale| |
| 55 // back to 1 and |translateX|, |translateY| back to 0. |
| 56 BLINK_PLATFORM_EXPORT WebTouchEvent flattenTransform() const; |
| 57 |
| 58 // Return a scaled WebTouchPoint in root frame coordinates. |
| 59 BLINK_PLATFORM_EXPORT WebTouchPoint |
| 60 touchPointInRootFrame(unsigned touchPoint) const; |
| 61 |
| 62 bool isCancelable() const { return dispatchType == Blocking; } |
| 63 #endif |
51 }; | 64 }; |
52 | 65 |
53 #pragma pack(pop) | 66 #pragma pack(pop) |
54 | 67 |
55 } // namespace blink | 68 } // namespace blink |
56 | 69 |
57 #endif // WebTouchEvent_h | 70 #endif // WebTouchEvent_h |
OLD | NEW |