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

Side by Side Diff: ui/events/ozone/evdev/libgestures_glue/event_reader_libevdev_cros.cc

Issue 1102673002: Revert of Ozone support for device special cases in keyboard event rewriting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 #include "ui/events/ozone/evdev/libgestures_glue/event_reader_libevdev_cros.h" 5 #include "ui/events/ozone/evdev/libgestures_glue/event_reader_libevdev_cros.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <libevdev/libevdev.h> 8 #include <libevdev/libevdev.h>
9 #include <linux/input.h> 9 #include <linux/input.h>
10 10
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 25
26 } // namespace 26 } // namespace
27 27
28 EventReaderLibevdevCros::EventReaderLibevdevCros(int fd, 28 EventReaderLibevdevCros::EventReaderLibevdevCros(int fd,
29 const base::FilePath& path, 29 const base::FilePath& path,
30 int id, 30 int id,
31 InputDeviceType type, 31 InputDeviceType type,
32 const EventDeviceInfo& devinfo, 32 const EventDeviceInfo& devinfo,
33 scoped_ptr<Delegate> delegate) 33 scoped_ptr<Delegate> delegate)
34 : EventConverterEvdev(fd, 34 : EventConverterEvdev(fd, path, id, type),
35 path,
36 id,
37 type,
38 devinfo.name(),
39 devinfo.vendor_id(),
40 devinfo.product_id()),
41 has_keyboard_(devinfo.HasKeyboard()), 35 has_keyboard_(devinfo.HasKeyboard()),
42 has_mouse_(devinfo.HasMouse()), 36 has_mouse_(devinfo.HasMouse()),
43 has_touchpad_(devinfo.HasTouchpad()), 37 has_touchpad_(devinfo.HasTouchpad()),
44 has_caps_lock_led_(devinfo.HasLedEvent(LED_CAPSL)), 38 has_caps_lock_led_(devinfo.HasLedEvent(LED_CAPSL)),
45 delegate_(delegate.Pass()) { 39 delegate_(delegate.Pass()) {
46 // This class assumes it does not deal with internal keyboards. 40 // This class assumes it does not deal with internal keyboards.
47 CHECK(!has_keyboard_ || type != INPUT_DEVICE_INTERNAL); 41 CHECK(!has_keyboard_ || type != INPUT_DEVICE_INTERNAL);
48 42
49 memset(&evdev_, 0, sizeof(evdev_)); 43 memset(&evdev_, 0, sizeof(evdev_));
50 evdev_.log = OnLogMessage; 44 evdev_.log = OnLogMessage;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 if (level >= LOGLEVEL_ERROR) 115 if (level >= LOGLEVEL_ERROR)
122 LOG(ERROR) << "libevdev: " << FormatLog(fmt, args); 116 LOG(ERROR) << "libevdev: " << FormatLog(fmt, args);
123 else if (level >= LOGLEVEL_WARNING) 117 else if (level >= LOGLEVEL_WARNING)
124 LOG(WARNING) << "libevdev: " << FormatLog(fmt, args); 118 LOG(WARNING) << "libevdev: " << FormatLog(fmt, args);
125 else 119 else
126 VLOG(3) << "libevdev: " << FormatLog(fmt, args); 120 VLOG(3) << "libevdev: " << FormatLog(fmt, args);
127 va_end(args); 121 va_end(args);
128 } 122 }
129 123
130 } // namespace ui 124 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/keyboard_evdev.cc ('k') | ui/events/ozone/evdev/tablet_event_converter_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698