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> | |
10 #include <linux/hidraw.h> | 9 #include <linux/hidraw.h> |
11 #include <sys/ioctl.h> | 10 #include <sys/ioctl.h> |
12 | 11 |
13 #include <string> | 12 #include <string> |
14 | 13 |
15 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
16 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
17 #include "base/posix/eintr_wrapper.h" | 16 #include "base/posix/eintr_wrapper.h" |
18 #include "base/threading/thread_restrictions.h" | 17 #include "base/threading/thread_restrictions.h" |
19 #include "base/tuple.h" | 18 #include "base/tuple.h" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 PendingHidReport report = pending_reports_.front(); | 218 PendingHidReport report = pending_reports_.front(); |
220 | 219 |
221 pending_reports_.pop(); | 220 pending_reports_.pop(); |
222 if (CompleteRead(report.buffer, report.size, read.callback)) { | 221 if (CompleteRead(report.buffer, report.size, read.callback)) { |
223 pending_reads_.pop(); | 222 pending_reads_.pop(); |
224 } | 223 } |
225 } | 224 } |
226 } | 225 } |
227 | 226 |
228 } // namespace device | 227 } // namespace device |
OLD | NEW |