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

Unified Diff: third_party/WebKit/Source/platform/PlatformGestureEvent.h

Issue 1403893003: Plumb gesture source value through Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Convert more tests (related to CL) to use Touchscreen. Created 5 years, 2 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/Source/platform/PlatformGestureEvent.h
diff --git a/third_party/WebKit/Source/platform/PlatformGestureEvent.h b/third_party/WebKit/Source/platform/PlatformGestureEvent.h
index 05308f418f558fd637cb64ebdd545a8acc42db22..57d5ef7b17833b97427b48a11db3c2e9780337eb 100644
--- a/third_party/WebKit/Source/platform/PlatformGestureEvent.h
+++ b/third_party/WebKit/Source/platform/PlatformGestureEvent.h
@@ -35,21 +35,29 @@
namespace blink {
+enum PlatformGestureSource {
+ PlatformGestureSourceUninitialized,
+ PlatformGestureSourceTouchpad,
+ PlatformGestureSourceTouchscreen
+};
+
class PlatformGestureEvent : public PlatformEvent {
public:
PlatformGestureEvent()
: PlatformEvent(PlatformEvent::GestureScrollBegin)
+ , m_source(PlatformGestureSourceUninitialized)
{
memset(&m_data, 0, sizeof(m_data));
}
PlatformGestureEvent(Type type, const IntPoint& position,
const IntPoint& globalPosition, const IntSize& area, double timestamp,
- PlatformEvent::Modifiers modifiers)
+ PlatformEvent::Modifiers modifiers, PlatformGestureSource source)
: PlatformEvent(type, modifiers, timestamp)
, m_position(position)
, m_globalPosition(globalPosition)
, m_area(area)
+ , m_source(source)
{
memset(&m_data, 0, sizeof(m_data));
}
@@ -85,6 +93,8 @@ public:
const IntSize& area() const { return m_area; }
+ PlatformGestureSource source() const { return m_source; }
+
float deltaX() const
{
ASSERT(m_type == PlatformEvent::GestureScrollUpdate);
@@ -188,6 +198,7 @@ protected:
IntPoint m_position;
IntPoint m_globalPosition;
IntSize m_area;
+ PlatformGestureSource m_source;
union {
struct {
« no previous file with comments | « third_party/WebKit/Source/core/events/GestureEvent.cpp ('k') | third_party/WebKit/Source/web/LinkHighlightImplTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698