| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef InputDeviceCapabilities_h | 5 #ifndef InputDeviceCapabilities_h |
| 6 #define InputDeviceCapabilities_h | 6 #define InputDeviceCapabilities_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
| 10 #include "core/input/InputDeviceCapabilitiesInit.h" | 10 #include "core/input/InputDeviceCapabilitiesInit.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class CORE_EXPORT InputDeviceCapabilities final : public GarbageCollectedFinaliz
ed<InputDeviceCapabilities>, public ScriptWrappable { | 14 class CORE_EXPORT InputDeviceCapabilities final : public GarbageCollected<InputD
eviceCapabilities>, public ScriptWrappable { |
| 15 DEFINE_WRAPPERTYPEINFO(); | 15 DEFINE_WRAPPERTYPEINFO(); |
| 16 | |
| 17 public: | 16 public: |
| 18 ~InputDeviceCapabilities(); | |
| 19 | |
| 20 // This return a static local InputDeviceCapabilities pointer which has fire
sTouchEvents set to be true. | 17 // This return a static local InputDeviceCapabilities pointer which has fire
sTouchEvents set to be true. |
| 21 static InputDeviceCapabilities* firesTouchEventsSourceCapabilities(); | 18 static InputDeviceCapabilities* firesTouchEventsSourceCapabilities(); |
| 22 | 19 |
| 23 // This return a static local InputDeviceCapabilities pointer which has fire
sTouchEvents set to be false. | 20 // This return a static local InputDeviceCapabilities pointer which has fire
sTouchEvents set to be false. |
| 24 static InputDeviceCapabilities* doesntFireTouchEventsSourceCapabilities(); | 21 static InputDeviceCapabilities* doesntFireTouchEventsSourceCapabilities(); |
| 25 | 22 |
| 26 static InputDeviceCapabilities* create(bool firesTouchEvents) | 23 static InputDeviceCapabilities* create(bool firesTouchEvents) |
| 27 { | 24 { |
| 28 return new InputDeviceCapabilities(firesTouchEvents); | 25 return new InputDeviceCapabilities(firesTouchEvents); |
| 29 } | 26 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 44 | 41 |
| 45 // Whether this device dispatches touch events. This mainly lets developers | 42 // Whether this device dispatches touch events. This mainly lets developers |
| 46 // avoid handling both touch and mouse events dispatched for a single user | 43 // avoid handling both touch and mouse events dispatched for a single user |
| 47 // action. | 44 // action. |
| 48 bool m_firesTouchEvents; | 45 bool m_firesTouchEvents; |
| 49 }; | 46 }; |
| 50 | 47 |
| 51 } // namespace blink | 48 } // namespace blink |
| 52 | 49 |
| 53 #endif // InputDeviceCapabilities_h | 50 #endif // InputDeviceCapabilities_h |
| OLD | NEW |