| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_connection_linux.h" | 5 #include "device/hid/hid_connection_linux.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <libudev.h> | 9 #include <libudev.h> |
| 10 #include <linux/hidraw.h> | 10 #include <linux/hidraw.h> |
| 11 #include <sys/ioctl.h> | 11 #include <sys/ioctl.h> |
| 12 | 12 |
| 13 #include <string> | 13 #include <string> |
| 14 | 14 |
| 15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 16 #include "base/message_loop/message_loop.h" |
| 16 #include "base/posix/eintr_wrapper.h" | 17 #include "base/posix/eintr_wrapper.h" |
| 17 #include "base/threading/thread_restrictions.h" | 18 #include "base/threading/thread_restrictions.h" |
| 18 #include "base/tuple.h" | 19 #include "base/tuple.h" |
| 19 #include "device/hid/hid_service.h" | 20 #include "device/hid/hid_service.h" |
| 20 | 21 |
| 21 // These are already defined in newer versions of linux/hidraw.h. | 22 // These are already defined in newer versions of linux/hidraw.h. |
| 22 #ifndef HIDIOCSFEATURE | 23 #ifndef HIDIOCSFEATURE |
| 23 #define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE | _IOC_READ, 'H', 0x06, len) | 24 #define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE | _IOC_READ, 'H', 0x06, len) |
| 24 #endif | 25 #endif |
| 25 #ifndef HIDIOCGFEATURE | 26 #ifndef HIDIOCGFEATURE |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 pending_reports_.pop(); | 225 pending_reports_.pop(); |
| 225 | 226 |
| 226 if (CompleteRead(report.buffer, read.callback)) { | 227 if (CompleteRead(report.buffer, read.callback)) { |
| 227 pending_reads_.pop(); | 228 pending_reads_.pop(); |
| 228 } | 229 } |
| 229 } | 230 } |
| 230 } | 231 } |
| 231 } | 232 } |
| 232 | 233 |
| 233 } // namespace device | 234 } // namespace device |
| OLD | NEW |