Chromium Code Reviews| 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 "platform/heap/Handle.h" | |
| 12 #include "wtf/PassRefPtr.h" | |
| 13 #include "wtf/RefCounted.h" | |
| 14 | |
| 15 namespace blink { | |
| 16 | |
| 17 class CORE_EXPORT InputDevice : public RefCountedWillBeGarbageCollectedFinalized <InputDevice>, public ScriptWrappable { | |
| 18 DEFINE_WRAPPERTYPEINFO(); | |
| 19 | |
| 20 public: | |
| 21 ~InputDevice(); | |
| 22 static PassRefPtrWillBeRawPtr<InputDevice> create() | |
| 23 { | |
| 24 return adoptRefWillBeNoop(new InputDevice); | |
| 25 } | |
| 26 | |
| 27 static PassRefPtrWillBeRawPtr<InputDevice> create( | |
| 28 const InputDeviceInit& initializer) | |
| 29 { | |
| 30 return adoptRefWillBeNoop(new InputDevice(initializer)); | |
| 31 } | |
| 32 | |
| 33 bool firesTouchEvents() const { return m_firesTouchEvents; } | |
| 34 | |
| 35 DECLARE_VIRTUAL_TRACE(); | |
| 36 | |
| 37 private: | |
| 38 InputDevice(); | |
| 39 InputDevice(const InputDeviceInit&); | |
| 40 | |
| 41 // Whether this device dispatches touch events for movement. This is used t o detect | |
| 42 // mouse events which represent only an action that has already been handled by | |
| 43 // touch event handlers. | |
|
tdresser
2015/05/27 12:38:47
"Whether this device dispatches touch events for m
lanwei
2015/05/28 14:56:17
Done.
| |
| 44 bool m_firesTouchEvents; | |
| 45 }; | |
| 46 | |
| 47 } // namespace blink | |
| 48 | |
| 49 #endif // InputDevice_h | |
| OLD | NEW |