Index: third_party/WebKit/public/platform/WebInputEvent.h |
diff --git a/third_party/WebKit/public/platform/WebInputEvent.h b/third_party/WebKit/public/platform/WebInputEvent.h |
index 362d189be0b596725767eeb0c8ac8df94f09a076..4916a305e2a016f5ddfa2b446d57a493769bfed1 100644 |
--- a/third_party/WebKit/public/platform/WebInputEvent.h |
+++ b/third_party/WebKit/public/platform/WebInputEvent.h |
@@ -180,6 +180,14 @@ class WebInputEvent { |
kTouchScrollStarted, |
kTouchTypeLast = kTouchScrollStarted, |
+ // WebPointerEvent: work in progress |
+ kPointerDown, |
+ kPointerTypeFirst = kPointerDown, |
+ kPointerUp, |
+ kPointerMove, |
+ kPointerCancel, |
+ kPointerTypeLast = kPointerCancel, |
+ |
kTypeLast = kTouchTypeLast |
}; |
@@ -300,6 +308,11 @@ class WebInputEvent { |
return kGestureTypeFirst <= type && type <= kGestureTypeLast; |
} |
+ // Returns true if the WebInputEvent |type| is a pointer event. |
+ static bool IsPointerEventType(WebInputEvent::Type type) { |
+ return kPointerTypeFirst <= type && type <= kPointerTypeLast; |
+ } |
+ |
bool IsSameEventClass(const WebInputEvent& other) const { |
if (IsMouseEventType(type_)) |
return IsMouseEventType(other.type_); |
@@ -309,6 +322,8 @@ class WebInputEvent { |
return IsTouchEventType(other.type_); |
if (IsKeyboardEventType(type_)) |
return IsKeyboardEventType(other.type_); |
+ if (IsPointerEventType(type_)) |
+ return IsPointerEventType(other.type_); |
return type_ == other.type_; |
} |
@@ -356,9 +371,10 @@ class WebInputEvent { |
CASE_TYPE(TouchEnd); |
CASE_TYPE(TouchCancel); |
CASE_TYPE(TouchScrollStarted); |
- default: |
- NOTREACHED(); |
- return ""; |
+ CASE_TYPE(PointerDown); |
+ CASE_TYPE(PointerUp); |
+ CASE_TYPE(PointerMove); |
+ CASE_TYPE(PointerCancel); |
} |
#undef CASE_TYPE |
} |