Chromium Code Reviews| Index: third_party/WebKit/Source/core/events/EventUtil.h |
| diff --git a/third_party/WebKit/Source/core/events/EventUtil.h b/third_party/WebKit/Source/core/events/EventUtil.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..df8928b092fe23c3a230c282b38319152fc1af29 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/events/EventUtil.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2016 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 EventUtil_h |
| +#define EventUtil_h |
| + |
| +#include "core/EventTypeNames.h" |
| + |
| +namespace blink { |
| + |
| +class EventUtil { |
|
bokan
2016/05/10 22:52:02
If this is just going to be a collection of functi
sahel
2016/05/11 21:15:02
I changed the class to the namespace.
I had the im
bokan
2016/05/11 21:19:59
Yah, that's fine, it's not in a hot code path.
|
| + |
| +public: |
| + static inline bool isPointerEventType(const AtomicString& eventType) |
| + { |
| + return eventType == EventTypeNames::gotpointercapture |
| + || eventType == EventTypeNames::lostpointercapture |
| + || eventType == EventTypeNames::pointercancel |
| + || eventType == EventTypeNames::pointerdown |
| + || eventType == EventTypeNames::pointerenter |
| + || eventType == EventTypeNames::pointerleave |
| + || eventType == EventTypeNames::pointermove |
| + || eventType == EventTypeNames::pointerout |
| + || eventType == EventTypeNames::pointerover |
| + || eventType == EventTypeNames::pointerup; |
| + } |
| + |
| +private: |
| + EventUtil() {}; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // EventUtil_h |