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

Side by Side Diff: Source/core/input/InputDevice.h

Issue 1174683004: Populates sourceDevice attribute into MouseEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add initinternal 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 unified diff | Download patch
« no previous file with comments | « Source/core/input/EventHandler.cpp ('k') | Source/core/input/InputDevice.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 InputDevice_h 5 #ifndef InputDevice_h
6 #define InputDevice_h 6 #define InputDevice_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/InputDeviceInit.h" 10 #include "core/input/InputDeviceInit.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class CORE_EXPORT InputDevice : public GarbageCollectedFinalized<InputDevice>, p ublic ScriptWrappable { 14 class CORE_EXPORT InputDevice : public GarbageCollectedFinalized<InputDevice>, p ublic ScriptWrappable {
15 DEFINE_WRAPPERTYPEINFO(); 15 DEFINE_WRAPPERTYPEINFO();
16 16
17 public: 17 public:
18 ~InputDevice(); 18 ~InputDevice();
19 19
20 // This return a static local InputDevice pointer which has firesTouchEvents set to be true. 20 // This return a static local InputDevice pointer which has firesTouchEvents set to be true.
21 static InputDevice* touchEventInstance(); 21 static InputDevice* firesTouchEventsInputDevice();
22
23 // This return a static local InputDevice pointer which has firesTouchEvents set to be false.
24 static InputDevice* doesntFireTouchEventsInputDevice();
22 25
23 static InputDevice* create(bool firesTouchEvents) 26 static InputDevice* create(bool firesTouchEvents)
24 { 27 {
25 return new InputDevice(firesTouchEvents); 28 return new InputDevice(firesTouchEvents);
26 } 29 }
27 30
28 static InputDevice* create( 31 static InputDevice* create(
29 const InputDeviceInit& initializer) 32 const InputDeviceInit& initializer)
30 { 33 {
31 return new InputDevice(initializer); 34 return new InputDevice(initializer);
32 } 35 }
33 36
34 bool firesTouchEvents() const { return m_firesTouchEvents; } 37 bool firesTouchEvents() const { return m_firesTouchEvents; }
35 38
36 DEFINE_INLINE_TRACE() { } 39 DEFINE_INLINE_TRACE() { }
37 40
38 private: 41 private:
39 InputDevice(bool firesTouchEvents); 42 InputDevice(bool firesTouchEvents);
40 InputDevice(const InputDeviceInit&); 43 InputDevice(const InputDeviceInit&);
41 44
42 // Whether this device dispatches touch events. This mainly lets developers 45 // Whether this device dispatches touch events. This mainly lets developers
43 // avoid handling both touch and mouse events dispatched for a single user 46 // avoid handling both touch and mouse events dispatched for a single user
44 // action. 47 // action.
45 bool m_firesTouchEvents; 48 bool m_firesTouchEvents;
46 }; 49 };
47 50
48 } // namespace blink 51 } // namespace blink
49 52
50 #endif // InputDevice_h 53 #endif // InputDevice_h
OLDNEW
« no previous file with comments | « Source/core/input/EventHandler.cpp ('k') | Source/core/input/InputDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698