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

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

Issue 2860663006: Remove WebTouchEvent from TouchEventManager APIs (Closed)
Patch Set: Add TODO for clarification of the fields Created 3 years, 5 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
(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 WebPointerEvent_h
6 #define WebPointerEvent_h
7
8 #include "WebInputEvent.h"
9 #include "WebPointerProperties.h"
10 #include "WebTouchEvent.h"
11
12 namespace blink {
13
14 // See WebInputEvent.h for details why this pack is here.
15 #pragma pack(push, 4)
16
17 // WebPointerEvent
18 // This is a WIP and currently used only in Blink and only for touch.
19 // TODO(nzolghadr): We should unify the fields in this class into
20 // WebPointerProperties and not have pointertype specific attributes here.
21 // --------------------------------------------------------------
22
23 class WebPointerEvent : public WebInputEvent, public WebPointerProperties {
24 public:
25 WebPointerEvent()
26 : WebInputEvent(sizeof(WebPointerEvent)), WebPointerProperties(0) {}
27 BLINK_PLATFORM_EXPORT WebPointerEvent(const WebTouchEvent&,
28 const WebTouchPoint&);
29
30 // TODO(crbug.com/736014): We need a clarified definition of the scale and
31 // the coordinate space on these attributes.
32 float width;
33 float height;
34
35 // ------------ Touch Point Specific ------------
36
37 float rotation_angle;
38
39 // ------------ Touch Event Specific ------------
40
41 // Whether the event is blocking, non-blocking, all event
42 // listeners were passive or was forced to be non-blocking.
43 DispatchType dispatch_type;
44
45 // For a single touch, this is true after the touch-point has moved beyond
46 // the platform slop region. For a multitouch, this is true after any
47 // touch-point has moved (by whatever amount).
48 bool moved_beyond_slop_region;
49
50 // Whether this touch event is a touchstart or a first touchmove event per
51 // scroll.
52 bool touch_start_or_first_touch_move;
53
54 #if INSIDE_BLINK
55 bool IsCancelable() const { return dispatch_type == kBlocking; }
56
57 BLINK_PLATFORM_EXPORT WebPointerEvent WebPointerEventInRootFrame() const;
58
59 #endif
60 };
61
62 #pragma pack(pop)
63
64 } // namespace blink
65
66 #endif // WebMouseEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698