| Index: Source/core/input/InputDevice.h
|
| diff --git a/Source/core/input/InputDevice.h b/Source/core/input/InputDevice.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bf014519751b5760893a0f7add6a68ac932bccc7
|
| --- /dev/null
|
| +++ b/Source/core/input/InputDevice.h
|
| @@ -0,0 +1,58 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef InputDevice_h
|
| +#define InputDevice_h
|
| +
|
| +#include "bindings/core/v8/ScriptWrappable.h"
|
| +#include "core/CoreExport.h"
|
| +#include "core/input/InputDeviceInit.h"
|
| +#include "wtf/PassRefPtr.h"
|
| +#include "wtf/RefCounted.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class CORE_EXPORT InputDevice : public RefCountedWillBeGarbageCollectedFinalized<InputDevice>, public ScriptWrappable {
|
| + DEFINE_WRAPPERTYPEINFO();
|
| +
|
| +public:
|
| + ~InputDevice();
|
| + static PassRefPtrWillBeRawPtr<InputDevice> create()
|
| + {
|
| + return adoptRefWillBeNoop(new InputDevice);
|
| + }
|
| +
|
| + static PassRefPtrWillBeRawPtr<InputDevice> create(bool firesTouchEvents)
|
| + {
|
| + return adoptRefWillBeNoop(new InputDevice(firesTouchEvents));
|
| + }
|
| +
|
| + static PassRefPtrWillBeRawPtr<InputDevice> create(
|
| + const InputDeviceInit& initializer)
|
| + {
|
| + return adoptRefWillBeNoop(new InputDevice(initializer));
|
| + }
|
| +
|
| + bool firesTouchEvents() const { return m_firesTouchEvents; }
|
| + void setFiresTouchEvents(bool firesTouchEvents)
|
| + {
|
| + m_firesTouchEvents = firesTouchEvents;
|
| + }
|
| +
|
| + DECLARE_VIRTUAL_TRACE();
|
| +
|
| +private:
|
| + InputDevice();
|
| + InputDevice(bool firesTouchEvents);
|
| + InputDevice(const InputDeviceInit&);
|
| +
|
| + // Whether this device dispatches touch events. This mainly lets developers
|
| + // avoid handling both touch and mouse events dispatched for a single user
|
| + // action.
|
| + bool m_firesTouchEvents;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // InputDevice_h
|
|
|