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/events/InputDeviceInit.h" |
| 11 #include "wtf/PassRefPtr.h" |
| 12 #include "wtf/RefCounted.h" |
| 13 |
| 14 namespace blink { |
| 15 |
| 16 class CORE_EXPORT InputDevice : public RefCountedWillBeGarbageCollectedFinalized
<InputDevice>, public ScriptWrappable { |
| 17 DEFINE_WRAPPERTYPEINFO(); |
| 18 |
| 19 public: |
| 20 ~InputDevice(); |
| 21 static PassRefPtrWillBeRawPtr<InputDevice> create() |
| 22 { |
| 23 return adoptRefWillBeNoop(new InputDevice); |
| 24 } |
| 25 |
| 26 static PassRefPtrWillBeRawPtr<InputDevice> create( |
| 27 const InputDeviceInit& initializer) |
| 28 { |
| 29 return adoptRefWillBeNoop(new InputDevice(initializer)); |
| 30 } |
| 31 |
| 32 bool firesTouchEvents() const { return m_firesTouchEvents; } |
| 33 void setFiresTouchEvents(bool firesTouchEvents) { m_firesTouchEvents = fires
TouchEvents; } |
| 34 |
| 35 DECLARE_VIRTUAL_TRACE(); |
| 36 |
| 37 private: |
| 38 InputDevice(); |
| 39 InputDevice(const InputDeviceInit&); |
| 40 |
| 41 // Whether this device dispatches touch events. This mainly lets developers |
| 42 // avoid handling both touch and mouse events dispatched for a single user |
| 43 // action. |
| 44 bool m_firesTouchEvents; |
| 45 }; |
| 46 |
| 47 } // namespace blink |
| 48 |
| 49 #endif // InputDevice_h |
OLD | NEW |