Chromium Code Reviews| 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 ce3730058b06cdc18835cbe5368fbc4d26216ed8..d49de5874ccd10d262fc7207a790e42026c7c7d4 100644 | 
| --- a/third_party/WebKit/public/platform/WebInputEvent.h | 
| +++ b/third_party/WebKit/public/platform/WebInputEvent.h | 
| @@ -130,8 +130,10 @@ class WebInputEvent { | 
| kGestureFlingCancel, | 
| // Pinch is two fingers moving closer or farther apart. | 
| kGesturePinchBegin, | 
| + kGesturePinchTypeFirst = kGesturePinchBegin, | 
| kGesturePinchEnd, | 
| kGesturePinchUpdate, | 
| + kGesturePinchTypeLast = kGesturePinchUpdate, | 
| // The following types are variations and subevents of single-taps. | 
| // | 
| @@ -310,6 +312,11 @@ class WebInputEvent { | 
| return type_ == other.type_; | 
| } | 
| + // Returns true if the WebInputEvent |type| is a pinch gesture event. | 
| + static bool IsPinchGestureEventType(int type) { | 
| 
 
dtapuska
2017/05/08 19:23:19
can you use WebInputEvent::Type here instead of in
 
Lei Zhang
2017/05/08 22:50:45
Done. I fixed the other IsFooType() methods above
 
 | 
| + return kGesturePinchTypeFirst <= type && type <= kGesturePinchTypeLast; | 
| + } | 
| + | 
| static const char* GetName(WebInputEvent::Type type) { | 
| #define CASE_TYPE(t) \ | 
| case WebInputEvent::k##t: \ | 
| @@ -402,7 +409,7 @@ class WebInputEvent { | 
| #endif | 
| } | 
| - WebInputEvent(unsigned size_param) { | 
| + explicit WebInputEvent(unsigned size_param) { | 
| // TODO(dtapuska): Remove this memset when we remove the chrome IPC of this | 
| // struct. | 
| memset(this, 0, size_param); |