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