| 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 <linux/hidraw.h> | 8 #include <linux/hidraw.h> |
| 9 #include <sys/ioctl.h> | 9 #include <sys/ioctl.h> |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 15 #include "base/macros.h" |
| 15 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
| 16 #include "base/message_loop/message_pump_libevent.h" | 17 #include "base/message_loop/message_pump_libevent.h" |
| 17 #include "base/posix/eintr_wrapper.h" | 18 #include "base/posix/eintr_wrapper.h" |
| 18 #include "base/thread_task_runner_handle.h" | 19 #include "base/thread_task_runner_handle.h" |
| 19 #include "base/threading/thread_restrictions.h" | 20 #include "base/threading/thread_restrictions.h" |
| 20 #include "components/device_event_log/device_event_log.h" | 21 #include "components/device_event_log/device_event_log.h" |
| 21 #include "device/hid/hid_service.h" | 22 #include "device/hid/hid_service.h" |
| 22 | 23 |
| 23 // These are already defined in newer versions of linux/hidraw.h. | 24 // These are already defined in newer versions of linux/hidraw.h. |
| 24 #ifndef HIDIOCSFEATURE | 25 #ifndef HIDIOCSFEATURE |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 PendingHidReport report = pending_reports_.front(); | 317 PendingHidReport report = pending_reports_.front(); |
| 317 | 318 |
| 318 pending_reports_.pop(); | 319 pending_reports_.pop(); |
| 319 if (CompleteRead(report.buffer, report.size, read.callback)) { | 320 if (CompleteRead(report.buffer, report.size, read.callback)) { |
| 320 pending_reads_.pop(); | 321 pending_reads_.pop(); |
| 321 } | 322 } |
| 322 } | 323 } |
| 323 } | 324 } |
| 324 | 325 |
| 325 } // namespace device | 326 } // namespace device |
| OLD | NEW |