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

Unified Diff: ui/events/ozone/evdev/key_event_converter.cc

Issue 137273009: evdev: Factor common code out of key & touch converters (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove duplicate variables & unneeded #include Created 6 years, 11 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 | « ui/events/ozone/evdev/key_event_converter.h ('k') | ui/events/ozone/evdev/touch_event_converter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/key_event_converter.cc
diff --git a/ui/events/ozone/evdev/key_event_converter.cc b/ui/events/ozone/evdev/key_event_converter.cc
index 30fd476d2719a1663c6eb845c03947262135725b..52bc628c6aa8170e52131fd3c32c5d9eedfc7a06 100644
--- a/ui/events/ozone/evdev/key_event_converter.cc
+++ b/ui/events/ozone/evdev/key_event_converter.cc
@@ -187,28 +187,11 @@ bool IsLockButton(unsigned int code) { return code == KEY_CAPSLOCK; }
KeyEventConverterEvdev::KeyEventConverterEvdev(int fd,
base::FilePath path,
EventModifiersEvdev* modifiers)
- : fd_(fd), path_(path), modifiers_(modifiers) {
+ : EventConverterEvdev(fd, path, modifiers) {
// TODO(spang): Initialize modifiers using EVIOCGKEY.
}
-KeyEventConverterEvdev::~KeyEventConverterEvdev() {
- if (fd_ >= 0 && close(fd_) < 0)
- DLOG(WARNING) << "failed close on " << path_.value();
-}
-
-void KeyEventConverterEvdev::OnFileCanReadWithoutBlocking(int fd) {
- input_event inputs[4];
- ssize_t read_size = read(fd, inputs, sizeof(inputs));
- if (read_size <= 0)
- return;
-
- CHECK_EQ(read_size % sizeof(*inputs), 0u);
- ProcessEvents(inputs, read_size / sizeof(*inputs));
-}
-
-void KeyEventConverterEvdev::OnFileCanWriteWithoutBlocking(int fd) {
- NOTREACHED();
-}
+KeyEventConverterEvdev::~KeyEventConverterEvdev() {}
void KeyEventConverterEvdev::ProcessEvents(const input_event* inputs,
int count) {
« no previous file with comments | « ui/events/ozone/evdev/key_event_converter.h ('k') | ui/events/ozone/evdev/touch_event_converter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698