Index: third_party/WebKit/public/platform/WebPointerEvent.h |
diff --git a/third_party/WebKit/public/platform/WebPointerEvent.h b/third_party/WebKit/public/platform/WebPointerEvent.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b8dc0fb014760392cc1f83d27f45a3b6ddf023e0 |
--- /dev/null |
+++ b/third_party/WebKit/public/platform/WebPointerEvent.h |
@@ -0,0 +1,68 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef WebPointerEvent_h |
+#define WebPointerEvent_h |
+ |
+#include "WebInputEvent.h" |
+ |
+namespace blink { |
+ |
+// See WebInputEvent.h for details why this pack is here. |
+#pragma pack(push, 4) |
+ |
+// WebPointerEvent |
use mustaq_at_chromium.org
2017/05/08 17:07:30
Please add a detailed note here to clarify that th
Navid Zolghadr
2017/06/08 16:38:26
Done.
|
+// -------------------------------------------------------------- |
+ |
+class WebPointerEvent : public WebInputEvent, public WebPointerProperties { |
+ public: |
+ WebPointerEvent(PointerAction action, |
+ WebFloatPoint screen_position, |
+ WebFloatPoint position, |
+ float width, |
+ float height) |
+ : WebInputEvent(sizeof(WebPointerEvent)), |
+ action(action), |
+ screen_position(screen_position), |
+ position(position), |
+ width(width), |
+ height(height) {} |
+ |
+ PointerAction action; |
+ |
+ WebFloatPoint screen_position; |
use mustaq_at_chromium.org
2017/05/08 17:07:30
Let's use the coordinate names as in WebMouseEvent
Navid Zolghadr
2017/06/08 16:38:26
Removed completely as your CL makes this unnecessa
|
+ WebFloatPoint position; |
+ |
+ float width; |
+ float height; |
+ |
+ // ------------ Touch Point Specific ------------ |
+ |
+ float rotation_angle; |
+ |
+ // ------------ Touch Event Specific ------------ |
+ |
+ // Whether the event is blocking, non-blocking, all event |
+ // listeners were passive or was forced to be non-blocking. |
+ DispatchType dispatch_type; |
+ |
+ // For a single touch, this is true after the touch-point has moved beyond |
+ // the platform slop region. For a multitouch, this is true after any |
+ // touch-point has moved (by whatever amount). |
+ bool moved_beyond_slop_region; |
+ |
+ // Whether this touch event is a touchstart or a first touchmove event per |
+ // scroll. |
+ bool touch_start_or_first_touch_move; |
+ |
+#if INSIDE_BLINK |
+ bool IsCancelable() const { return dispatch_type == kBlocking; } |
+#endif |
+}; |
+ |
+#pragma pack(pop) |
+ |
+} // namespace blink |
+ |
+#endif // WebMouseEvent_h |