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

Unified Diff: ui/events/ozone/evdev/event_device_info.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/ozone/evdev/event_device_info.h ('k') | ui/events/ozone/evdev/event_factory_evdev.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/event_device_info.cc
diff --git a/ui/events/ozone/evdev/event_device_info.cc b/ui/events/ozone/evdev/event_device_info.cc
index e3c9f73c34a07991629338169d44d248406d0040..dd297791ec6762d2d3c2513878c6062372c4d141 100644
--- a/ui/events/ozone/evdev/event_device_info.cc
+++ b/ui/events/ozone/evdev/event_device_info.cc
@@ -17,11 +17,6 @@
namespace {
-// USB vendor and product strings are pragmatically limited to 126
-// characters each, so device names more than twice that should be
-// unusual.
-const size_t kMaximumDeviceNameLength = 256;
-
bool GetEventBits(int fd, unsigned int type, void* buf, unsigned int size) {
if (ioctl(fd, EVIOCGBIT(type, size), buf) < 0) {
PLOG(ERROR) << "EVIOCGBIT(" << type << ", " << size << ") on fd " << fd;
@@ -45,27 +40,6 @@
PLOG(ERROR) << "EVIOCGABS(" << code << ") on fd " << fd;
return false;
}
- return true;
-}
-
-bool GetDeviceName(int fd, std::string* name) {
- char device_name[kMaximumDeviceNameLength];
- if (ioctl(fd, EVIOCGNAME(kMaximumDeviceNameLength - 1), &device_name) < 0) {
- PLOG(INFO) << "Can't read device name on fd " << fd;
- return false;
- }
- *name = device_name;
- return true;
-}
-
-bool GetDeviceIdentifiers(int fd, uint16_t* vendor, uint16_t* product) {
- struct input_id evdev_id;
- if (ioctl(fd, EVIOCGID, &evdev_id) < 0) {
- PLOG(INFO) << "Can't read device name on fd " << fd;
- return false;
- }
- *vendor = evdev_id.vendor;
- *product = evdev_id.product;
return true;
}
@@ -161,12 +135,6 @@
slots->assign(request_slots, request_slots + max_num_slots);
}
- if (!GetDeviceName(fd, &name_))
- return false;
-
- if (!GetDeviceIdentifiers(fd, &vendor_id_, &product_id_))
- return false;
-
return true;
}
« no previous file with comments | « ui/events/ozone/evdev/event_device_info.h ('k') | ui/events/ozone/evdev/event_factory_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698