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

Unified 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 side-by-side diff with in-line comments
Download patch
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..6b7f3b5756f7949dd4feeaaff1f37d6325183254
--- /dev/null
+++ b/third_party/WebKit/public/platform/WebPointerEvent.h
@@ -0,0 +1,65 @@
+// 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"
+#include "WebPointerProperties.h"
+#include "WebTouchEvent.h"
+
+namespace blink {
+
+// See WebInputEvent.h for details why this pack is here.
+#pragma pack(push, 4)
+
+// WebPointerEvent
+// This is a WIP and currently used only in Blink and only for touch.
+// --------------------------------------------------------------
+
+class WebPointerEvent : public WebInputEvent, public WebPointerProperties {
+ public:
+ WebPointerEvent()
+ : WebInputEvent(sizeof(WebPointerEvent)), WebPointerProperties(0) {}
+ BLINK_PLATFORM_EXPORT WebPointerEvent(const WebTouchEvent&,
+ const WebTouchPoint&);
+
+ float width;
+ float height;
+
+ // 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.
+ // pointertype specific attributes here.
+
+ // ------------ 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; }
+
+ BLINK_PLATFORM_EXPORT WebPointerEvent WebPointerEventInRootFrame() const;
+
+#endif
+};
+
+#pragma pack(pop)
+
+} // namespace blink
+
+#endif // WebMouseEvent_h

Powered by Google App Engine
This is Rietveld 408576698