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

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

Issue 2639273002: Give WebTouchEvent and WebKeyboardEvent their own headers (Closed)
Patch Set: Rebase Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/public/platform/WebKeyboardEvent.h ('k') | ui/events/blink/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/WebKeyboardEvent.h ('k') | ui/events/blink/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698