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

Side by Side Diff: ui/events/ozone/evdev/input_device_factory_evdev.h

Issue 893753002: Dump touchpad event logs for touch log source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactored the code per previous comments. Created 5 years, 10 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_ 6 #define UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 15 matching lines...) Expand all
26 26
27 #if !defined(USE_EVDEV) 27 #if !defined(USE_EVDEV)
28 #error Missing dependency on ui/events/ozone:events_ozone_evdev 28 #error Missing dependency on ui/events/ozone:events_ozone_evdev
29 #endif 29 #endif
30 30
31 #if defined(USE_EVDEV_GESTURES) 31 #if defined(USE_EVDEV_GESTURES)
32 class GesturePropertyProvider; 32 class GesturePropertyProvider;
33 #endif 33 #endif
34 34
35 typedef base::Callback<void(scoped_ptr<std::string>)> GetTouchDeviceStatusReply; 35 typedef base::Callback<void(scoped_ptr<std::string>)> GetTouchDeviceStatusReply;
36 typedef base::Callback<void(scoped_ptr<std::vector<base::FilePath>>)>
37 GetTouchEventLogReply;
36 38
37 // Manager for event device objects. All device I/O starts here. 39 // Manager for event device objects. All device I/O starts here.
38 class EVENTS_OZONE_EVDEV_EXPORT InputDeviceFactoryEvdev { 40 class EVENTS_OZONE_EVDEV_EXPORT InputDeviceFactoryEvdev {
39 public: 41 public:
40 InputDeviceFactoryEvdev(scoped_ptr<DeviceEventDispatcherEvdev> dispatcher, 42 InputDeviceFactoryEvdev(scoped_ptr<DeviceEventDispatcherEvdev> dispatcher,
41 CursorDelegateEvdev* cursor); 43 CursorDelegateEvdev* cursor);
42 ~InputDeviceFactoryEvdev(); 44 ~InputDeviceFactoryEvdev();
43 45
44 // Open & start reading a newly plugged-in input device. 46 // Open & start reading a newly plugged-in input device.
45 void AddInputDevice(int id, const base::FilePath& path); 47 void AddInputDevice(int id, const base::FilePath& path);
(...skipping 16 matching lines...) Expand all
62 64
63 // Bits from InputController that have to be answered on IO. 65 // Bits from InputController that have to be answered on IO.
64 void SetTouchpadSensitivity(int value); 66 void SetTouchpadSensitivity(int value);
65 void SetTapToClick(bool enabled); 67 void SetTapToClick(bool enabled);
66 void SetThreeFingerClick(bool enabled); 68 void SetThreeFingerClick(bool enabled);
67 void SetTapDragging(bool enabled); 69 void SetTapDragging(bool enabled);
68 void SetNaturalScroll(bool enabled); 70 void SetNaturalScroll(bool enabled);
69 void SetMouseSensitivity(int value); 71 void SetMouseSensitivity(int value);
70 void SetTapToClickPaused(bool state); 72 void SetTapToClickPaused(bool state);
71 void GetTouchDeviceStatus(const GetTouchDeviceStatusReply& reply); 73 void GetTouchDeviceStatus(const GetTouchDeviceStatusReply& reply);
74 void GetTouchEventLog(const base::FilePath& out_dir,
75 const GetTouchEventLogReply& reply);
72 76
73 base::WeakPtr<InputDeviceFactoryEvdev> GetWeakPtr(); 77 base::WeakPtr<InputDeviceFactoryEvdev> GetWeakPtr();
74 78
75 private: 79 private:
76 // Open device at path & starting processing events (on UI thread). 80 // Open device at path & starting processing events (on UI thread).
77 void AttachInputDevice(scoped_ptr<EventConverterEvdev> converter); 81 void AttachInputDevice(scoped_ptr<EventConverterEvdev> converter);
78 82
79 // Close device at path (on UI thread). 83 // Close device at path (on UI thread).
80 void DetachInputDevice(const base::FilePath& file_path); 84 void DetachInputDevice(const base::FilePath& file_path);
81 85
(...skipping 30 matching lines...) Expand all
112 116
113 // Support weak pointers for attach & detach callbacks. 117 // Support weak pointers for attach & detach callbacks.
114 base::WeakPtrFactory<InputDeviceFactoryEvdev> weak_ptr_factory_; 118 base::WeakPtrFactory<InputDeviceFactoryEvdev> weak_ptr_factory_;
115 119
116 DISALLOW_COPY_AND_ASSIGN(InputDeviceFactoryEvdev); 120 DISALLOW_COPY_AND_ASSIGN(InputDeviceFactoryEvdev);
117 }; 121 };
118 122
119 } // namespace ui 123 } // namespace ui
120 124
121 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_ 125 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698