| 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 #ifndef DEVICE_HID_HID_CONNECTION_LINUX_H_ | 5 #ifndef DEVICE_HID_HID_CONNECTION_LINUX_H_ |
| 6 #define DEVICE_HID_HID_CONNECTION_LINUX_H_ | 6 #define DEVICE_HID_HID_CONNECTION_LINUX_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/message_loop/message_pump_libevent.h" | 12 #include "base/message_loop/message_pump_libevent.h" |
| 13 #include "device/hid/hid_connection.h" | 13 #include "device/hid/hid_connection.h" |
| 14 #include "device/hid/hid_device_info.h" | 14 #include "device/hid/hid_device_info.h" |
| 15 #include "device/hid/udev_common.h" | |
| 16 | 15 |
| 17 namespace device { | 16 namespace device { |
| 18 | 17 |
| 19 class HidConnectionLinux : public HidConnection, | 18 class HidConnectionLinux : public HidConnection, |
| 20 public base::MessagePumpLibevent::Watcher { | 19 public base::MessagePumpLibevent::Watcher { |
| 21 public: | 20 public: |
| 22 HidConnectionLinux(HidDeviceInfo device_info, std::string dev_node); | 21 HidConnectionLinux(HidDeviceInfo device_info, std::string dev_node); |
| 23 | 22 |
| 24 virtual void Read(scoped_refptr<net::IOBufferWithSize> buffer, | 23 virtual void Read(scoped_refptr<net::IOBufferWithSize> buffer, |
| 25 const IOCallback& callback) OVERRIDE; | 24 const IOCallback& callback) OVERRIDE; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 50 std::queue<PendingHidReport> pending_reports_; | 49 std::queue<PendingHidReport> pending_reports_; |
| 51 std::queue<PendingHidRead> pending_reads_; | 50 std::queue<PendingHidRead> pending_reads_; |
| 52 | 51 |
| 53 base::ThreadChecker thread_checker_; | 52 base::ThreadChecker thread_checker_; |
| 54 | 53 |
| 55 DISALLOW_COPY_AND_ASSIGN(HidConnectionLinux); | 54 DISALLOW_COPY_AND_ASSIGN(HidConnectionLinux); |
| 56 }; | 55 }; |
| 57 | 56 |
| 58 } // namespace device | 57 } // namespace device |
| 59 | 58 |
| 60 #endif // DEVICE_HID_HID_CONNECTION_LINUX__ | 59 #endif // DEVICE_HID_HID_CONNECTION_LINUX_H_ |
| OLD | NEW |