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

Unified Diff: third_party/WebKit/public/platform/WebPointerProperties.h

Issue 2849083002: Add pointer id to the WebMouseEvent's constructors (Closed)
Patch Set: webmouseid Created 3 years, 7 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/WebPointerProperties.h
diff --git a/third_party/WebKit/public/platform/WebPointerProperties.h b/third_party/WebKit/public/platform/WebPointerProperties.h
index 2a453cd22fd7ae5b7a0fc193ec751f6fb9f5aa28..91eb1e7bba487f3b078333a88aa39d2efe77c0c7 100644
--- a/third_party/WebKit/public/platform/WebPointerProperties.h
+++ b/third_party/WebKit/public/platform/WebPointerProperties.h
@@ -10,6 +10,8 @@
namespace blink {
+using PointerId = int32_t;
+
// This class encapsulates the properties that are common between mouse and
// pointer events and touch points as we transition towards the unified pointer
// event model.
@@ -46,8 +48,8 @@ class WebPointerProperties {
kLastEntry = kTouch // Must be the last entry in the list
};
- WebPointerProperties()
- : id(0),
+ explicit WebPointerProperties(PointerId id_param)
+ : id(id_param),
force(std::numeric_limits<float>::quiet_NaN()),
tilt_x(0),
tilt_y(0),
@@ -58,8 +60,10 @@ class WebPointerProperties {
movement_x(0),
movement_y(0) {}
- WebPointerProperties(Button button_param, PointerType pointer_type_param)
- : id(0),
+ WebPointerProperties(PointerId id_param,
+ Button button_param,
+ PointerType pointer_type_param)
+ : id(id_param),
force(std::numeric_limits<float>::quiet_NaN()),
tilt_x(0),
tilt_y(0),
@@ -70,7 +74,7 @@ class WebPointerProperties {
movement_x(0),
movement_y(0) {}
- int id;
+ PointerId id;
// The valid range is [0,1], with NaN meaning pressure is not supported by
// the input device.
« no previous file with comments | « third_party/WebKit/public/platform/WebMouseWheelEvent.h ('k') | third_party/WebKit/public/platform/WebTouchPoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698