| OLD | NEW |
| 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 "device/hid/hid_service_linux.h" |
| 6 |
| 5 #include <linux/hidraw.h> | 7 #include <linux/hidraw.h> |
| 6 #include <sys/ioctl.h> | 8 #include <sys/ioctl.h> |
| 7 | |
| 8 #include <stdint.h> | 9 #include <stdint.h> |
| 9 | 10 |
| 10 #include <string> | 11 #include <string> |
| 11 | 12 |
| 12 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/files/file.h" |
| 13 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 14 #include "base/logging.h" | 16 #include "base/logging.h" |
| 15 #include "base/platform_file.h" | |
| 16 #include "base/stl_util.h" | 17 #include "base/stl_util.h" |
| 17 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
| 18 #include "base/strings/string_piece.h" | 19 #include "base/strings/string_piece.h" |
| 19 #include "base/strings/string_split.h" | 20 #include "base/strings/string_split.h" |
| 20 #include "device/hid/hid_connection_linux.h" | 21 #include "device/hid/hid_connection_linux.h" |
| 21 #include "device/hid/hid_device_info.h" | 22 #include "device/hid/hid_device_info.h" |
| 22 #include "device/hid/hid_report_descriptor.h" | 23 #include "device/hid/hid_report_descriptor.h" |
| 23 #include "device/hid/hid_service_linux.h" | |
| 24 #include "device/udev_linux/udev.h" | 24 #include "device/udev_linux/udev.h" |
| 25 | 25 |
| 26 namespace device { | 26 namespace device { |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 const char kHIDSubSystem[] = "hid"; | 30 const char kHIDSubSystem[] = "hid"; |
| 31 const char kHidrawSubsystem[] = "hidraw"; | 31 const char kHidrawSubsystem[] = "hidraw"; |
| 32 const char kHIDID[] = "HID_ID"; | 32 const char kHIDID[] = "HID_ID"; |
| 33 const char kHIDName[] = "HID_NAME"; | 33 const char kHIDName[] = "HID_NAME"; |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 *result = raw_path; | 193 *result = raw_path; |
| 194 return true; | 194 return true; |
| 195 } | 195 } |
| 196 } | 196 } |
| 197 } | 197 } |
| 198 | 198 |
| 199 return false; | 199 return false; |
| 200 } | 200 } |
| 201 | 201 |
| 202 } // namespace device | 202 } // namespace device |
| OLD | NEW |