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

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

Issue 2263693003: Add palm suppression feature to EventConverterEvdev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@stylus
Patch Set: fixed unit tests Created 4 years, 3 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 | « no previous file | ui/events/ozone/evdev/event_converter_evdev.cc » ('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 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_EVENT_CONVERTER_EVDEV_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_ 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 // Returns true if the converter is used for a mouse device; 71 // Returns true if the converter is used for a mouse device;
72 virtual bool HasMouse() const; 72 virtual bool HasMouse() const;
73 73
74 // Returns true if the converter is used for a touchpad device. 74 // Returns true if the converter is used for a touchpad device.
75 virtual bool HasTouchpad() const; 75 virtual bool HasTouchpad() const;
76 76
77 // Returns true if the converter is used for a touchscreen device. 77 // Returns true if the converter is used for a touchscreen device.
78 virtual bool HasTouchscreen() const; 78 virtual bool HasTouchscreen() const;
79 79
80 // Returns true if the converter is used for a pen device.
81 virtual bool HasPen() const;
82
80 // Returns true if the converter is used for a device with a caps lock LED. 83 // Returns true if the converter is used for a device with a caps lock LED.
81 virtual bool HasCapsLockLed() const; 84 virtual bool HasCapsLockLed() const;
82 85
83 // Returns the size of the touchscreen device if the converter is used for a 86 // Returns the size of the touchscreen device if the converter is used for a
84 // touchscreen device. 87 // touchscreen device.
85 virtual gfx::Size GetTouchscreenSize() const; 88 virtual gfx::Size GetTouchscreenSize() const;
86 89
87 // Returns the number of touch points this device supports. Should not be 90 // Returns the number of touch points this device supports. Should not be
88 // called unless HasTouchscreen() returns true 91 // called unless HasTouchscreen() returns true
89 virtual int GetTouchPoints() const; 92 virtual int GetTouchPoints() const;
90 93
91 // Sets which keyboard keys should be processed. If |enable_filter| is 94 // Sets which keyboard keys should be processed. If |enable_filter| is
92 // false, all keys are allowed and |allowed_keys| is ignored. 95 // false, all keys are allowed and |allowed_keys| is ignored.
93 virtual void SetKeyFilter(bool enable_filter, 96 virtual void SetKeyFilter(bool enable_filter,
94 std::vector<DomCode> allowed_keys); 97 std::vector<DomCode> allowed_keys);
95 98
96 // Update caps lock LED state. 99 // Update caps lock LED state.
97 virtual void SetCapsLockLed(bool enabled); 100 virtual void SetCapsLockLed(bool enabled);
98 101
99 // Update touch event logging state. 102 // Update touch event logging state.
100 virtual void SetTouchEventLoggingEnabled(bool enabled); 103 virtual void SetTouchEventLoggingEnabled(bool enabled);
101 104
105 // Sets callback to enable/disable palm suppression.
106 virtual void SetPalmSuppressionCallback(
107 const base::Callback<void(bool)>& callback);
108
102 // Helper to generate a base::TimeTicks from an input_event's time 109 // Helper to generate a base::TimeTicks from an input_event's time
103 static base::TimeTicks TimeTicksFromInputEvent(const input_event& event); 110 static base::TimeTicks TimeTicksFromInputEvent(const input_event& event);
104 111
105 protected: 112 protected:
106 // base::MessagePumpLibevent::Watcher: 113 // base::MessagePumpLibevent::Watcher:
107 void OnFileCanWriteWithoutBlocking(int fd) override; 114 void OnFileCanWriteWithoutBlocking(int fd) override;
108 115
109 // File descriptor to read. 116 // File descriptor to read.
110 int fd_; 117 int fd_;
111 118
(...skipping 13 matching lines...) Expand all
125 // Controller for watching the input fd. 132 // Controller for watching the input fd.
126 base::MessagePumpLibevent::FileDescriptorWatcher controller_; 133 base::MessagePumpLibevent::FileDescriptorWatcher controller_;
127 134
128 private: 135 private:
129 DISALLOW_COPY_AND_ASSIGN(EventConverterEvdev); 136 DISALLOW_COPY_AND_ASSIGN(EventConverterEvdev);
130 }; 137 };
131 138
132 } // namespace ui 139 } // namespace ui
133 140
134 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_ 141 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_
OLDNEW
« no previous file with comments | « no previous file | ui/events/ozone/evdev/event_converter_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698