Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(957)

Unified Diff: Source/core/input/InputDevice.h

Issue 1157173003: Impelement InputDevice.firesTouchEvents (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/input/InputDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..244e5638ceaae3b3e167c6ee2c9fa4736b0eede0
--- /dev/null
+++ b/Source/core/input/InputDevice.h
@@ -0,0 +1,46 @@
+// 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"
+
+namespace blink {
+
+class CORE_EXPORT InputDevice : public GarbageCollectedFinalized<InputDevice>, public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
+
+public:
+ ~InputDevice();
+ static InputDevice* create(bool firesTouchEvents)
+ {
+ return new InputDevice(firesTouchEvents);
+ }
+
+ static InputDevice* create(
+ const InputDeviceInit& initializer)
+ {
+ return new InputDevice(initializer);
+ }
+
+ bool firesTouchEvents() const { return m_firesTouchEvents; }
+
+ DEFINE_INLINE_TRACE() { }
+
+private:
+ 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
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/input/InputDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698