OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 InputDevice_h |
| 6 #define InputDevice_h |
| 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "core/CoreExport.h" |
| 10 #include "core/input/InputDeviceInit.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class CORE_EXPORT InputDevice : public GarbageCollectedFinalized<InputDevice>, p
ublic ScriptWrappable { |
| 15 DEFINE_WRAPPERTYPEINFO(); |
| 16 |
| 17 public: |
| 18 ~InputDevice(); |
| 19 static InputDevice* create(bool firesTouchEvents) |
| 20 { |
| 21 return new InputDevice(firesTouchEvents); |
| 22 } |
| 23 |
| 24 static InputDevice* create( |
| 25 const InputDeviceInit& initializer) |
| 26 { |
| 27 return new InputDevice(initializer); |
| 28 } |
| 29 |
| 30 bool firesTouchEvents() const { return m_firesTouchEvents; } |
| 31 |
| 32 DEFINE_INLINE_TRACE() { } |
| 33 |
| 34 private: |
| 35 InputDevice(bool firesTouchEvents); |
| 36 InputDevice(const InputDeviceInit&); |
| 37 |
| 38 // Whether this device dispatches touch events. This mainly lets developers |
| 39 // avoid handling both touch and mouse events dispatched for a single user |
| 40 // action. |
| 41 bool m_firesTouchEvents; |
| 42 }; |
| 43 |
| 44 } // namespace blink |
| 45 |
| 46 #endif // InputDevice_h |
OLD | NEW |