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

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

Issue 2860663006: Remove WebTouchEvent from TouchEventManager APIs (Closed)
Patch Set: Fix more tests Created 3 years, 6 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 // --------------------------------------------------------------
20
21 class WebPointerEvent : public WebInputEvent, public WebPointerProperties {
22 public:
23 WebPointerEvent()
24 : WebInputEvent(sizeof(WebPointerEvent)), WebPointerProperties(0) {}
25 BLINK_PLATFORM_EXPORT WebPointerEvent(const WebTouchEvent&,
26 const WebTouchPoint&);
27
28 float width;
29 float height;
30
31 // TODO(nzolghadr): We should unify the following fields and not have
mustaq 2017/06/08 20:02:53 This comment applies to the width & height fields
Navid Zolghadr 2017/06/08 21:18:41 Done.
32 // pointertype specific attributes here.
33
34 // ------------ Touch Point Specific ------------
35
36 float rotation_angle;
37
38 // ------------ Touch Event Specific ------------
39
40 // Whether the event is blocking, non-blocking, all event
41 // listeners were passive or was forced to be non-blocking.
42 DispatchType dispatch_type;
43
44 // For a single touch, this is true after the touch-point has moved beyond
45 // the platform slop region. For a multitouch, this is true after any
46 // touch-point has moved (by whatever amount).
47 bool moved_beyond_slop_region;
48
49 // Whether this touch event is a touchstart or a first touchmove event per
50 // scroll.
51 bool touch_start_or_first_touch_move;
52
53 #if INSIDE_BLINK
54 bool IsCancelable() const { return dispatch_type == kBlocking; }
55
56 BLINK_PLATFORM_EXPORT WebPointerEvent WebPointerEventInRootFrame() const;
57
58 #endif
59 };
60
61 #pragma pack(pop)
62
63 } // namespace blink
64
65 #endif // WebMouseEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698