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

Unified Diff: public/platform/WebPointerProperties.h

Issue 1212113007: Add WebPointerProperties type. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Comments, do not touch radiusX/Y, relocate WebPointerProperties.h Created 5 years, 5 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 | « Source/web/WebInputEvent.cpp ('k') | public/web/WebInputEvent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebPointerProperties.h
diff --git a/public/platform/WebPointerProperties.h b/public/platform/WebPointerProperties.h
new file mode 100644
index 0000000000000000000000000000000000000000..d75bdc8eef918eb064728d55632dba838c8f9f6b
--- /dev/null
+++ b/public/platform/WebPointerProperties.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2015 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 WebPointerProperties_h
+#define WebPointerProperties_h
+
+namespace blink {
+
+// 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.
+// TODO(e_hakkinen): Replace WebTouchEvent with WebPointerEvent, remove
+// WebTouchEvent and WebTouchPoint and merge this into WebPointerEvent.
+class WebPointerProperties {
+public:
+ WebPointerProperties()
+ : button(ButtonNone)
+ , id(0)
+ , force(0.f)
+ {
+ }
+
+ enum Button {
+ ButtonNone = -1,
+ ButtonLeft,
+ ButtonMiddle,
+ ButtonRight
+ };
+
+ Button button;
+
+ int id;
+ float force;
+};
+
+} // namespace blink
+
+#endif
« no previous file with comments | « Source/web/WebInputEvent.cpp ('k') | public/web/WebInputEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698