Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef EventUtil_h | |
| 6 #define EventUtil_h | |
| 7 | |
| 8 #include "core/EventTypeNames.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 | |
| 12 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.
| |
| 13 | |
| 14 public: | |
| 15 static inline bool isPointerEventType(const AtomicString& eventType) | |
| 16 { | |
| 17 return eventType == EventTypeNames::gotpointercapture | |
| 18 || eventType == EventTypeNames::lostpointercapture | |
| 19 || eventType == EventTypeNames::pointercancel | |
| 20 || eventType == EventTypeNames::pointerdown | |
| 21 || eventType == EventTypeNames::pointerenter | |
| 22 || eventType == EventTypeNames::pointerleave | |
| 23 || eventType == EventTypeNames::pointermove | |
| 24 || eventType == EventTypeNames::pointerout | |
| 25 || eventType == EventTypeNames::pointerover | |
| 26 || eventType == EventTypeNames::pointerup; | |
| 27 } | |
| 28 | |
| 29 private: | |
| 30 EventUtil() {}; | |
| 31 }; | |
| 32 | |
| 33 } // namespace blink | |
| 34 | |
| 35 #endif // EventUtil_h | |
| OLD | NEW |