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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/WebTouchEvent.h
diff --git a/third_party/WebKit/public/platform/WebTouchEvent.h b/third_party/WebKit/public/platform/WebTouchEvent.h
new file mode 100644
index 0000000000000000000000000000000000000000..4a011b31b27802a399ce8ca94bfb876897a3c234
--- /dev/null
+++ b/third_party/WebKit/public/platform/WebTouchEvent.h
@@ -0,0 +1,57 @@
+// 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 WebTouchEvent_h
+#define WebTouchEvent_h
+
+#include "WebInputEvent.h"
+
+namespace blink {
+
+// See WebInputEvent.h for details why this pack is here.
+#pragma pack(push, 4)
+
+// WebTouchEvent --------------------------------------------------------------
+
+// TODO(e_hakkinen): Replace with WebPointerEvent. crbug.com/508283
+class WebTouchEvent : public WebInputEvent {
+ public:
+ // Maximum number of simultaneous touches supported on
+ // Ash/Aura.
+ enum { kTouchesLengthCap = 16 };
+
+ unsigned touchesLength;
+ // List of all touches, regardless of state.
+ WebTouchPoint touches[kTouchesLengthCap];
+
+ // Whether the event is blocking, non-blocking, all event
+ // listeners were passive or was forced to be non-blocking.
+ DispatchType dispatchType;
+
+ // 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 movedBeyondSlopRegion;
+
+ // Whether this touch event is a touchstart or a first touchmove event per
+ // scroll.
+ bool touchStartOrFirstTouchMove;
+
+ // A unique identifier for the touch event. Valid ids start at one and
+ // increase monotonically. Zero means an unknown id.
+ uint32_t uniqueTouchEventId;
+
+ WebTouchEvent()
+ : WebInputEvent(sizeof(WebTouchEvent)), dispatchType(Blocking) {}
+
+ WebTouchEvent(Type type, int modifiers, double timeStampSeconds)
+ : WebInputEvent(sizeof(WebTouchEvent), type, modifiers, timeStampSeconds),
+ dispatchType(Blocking) {}
+};
+
+#pragma pack(pop)
+
+} // namespace blink
+
+#endif // WebTouchEvent_h
« 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