| 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/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "device/hid/hid_connection.h" | 12 #include "device/hid/hid_connection.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class SingleThreadTaskRunner; | 15 class SingleThreadTaskRunner; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace device { | 18 namespace device { |
| 19 | 19 |
| 20 class HidConnectionLinux : public HidConnection { | 20 class HidConnectionLinux : public HidConnection { |
| 21 public: | 21 public: |
| 22 HidConnectionLinux( | 22 HidConnectionLinux( |
| 23 const HidDeviceInfo& device_info, | 23 scoped_refptr<HidDeviceInfo> device_info, |
| 24 base::File device_file, | 24 base::File device_file, |
| 25 scoped_refptr<base::SingleThreadTaskRunner> file_thread_runner); | 25 scoped_refptr<base::SingleThreadTaskRunner> file_thread_runner); |
| 26 | 26 |
| 27 private: | 27 private: |
| 28 class Helper; | 28 class Helper; |
| 29 friend class Helper; | 29 friend class Helper; |
| 30 friend class base::RefCountedThreadSafe<HidConnectionLinux>; | 30 friend class base::RefCountedThreadSafe<HidConnectionLinux>; |
| 31 | 31 |
| 32 typedef base::Callback<void(ssize_t)> InternalWriteCallback; | 32 typedef base::Callback<void(ssize_t)> InternalWriteCallback; |
| 33 typedef base::Callback<void(int)> IoctlCallback; | 33 typedef base::Callback<void(int)> IoctlCallback; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 std::queue<PendingHidRead> pending_reads_; | 87 std::queue<PendingHidRead> pending_reads_; |
| 88 | 88 |
| 89 base::WeakPtrFactory<HidConnectionLinux> weak_factory_; | 89 base::WeakPtrFactory<HidConnectionLinux> weak_factory_; |
| 90 | 90 |
| 91 DISALLOW_COPY_AND_ASSIGN(HidConnectionLinux); | 91 DISALLOW_COPY_AND_ASSIGN(HidConnectionLinux); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace device | 94 } // namespace device |
| 95 | 95 |
| 96 #endif // DEVICE_HID_HID_CONNECTION_LINUX_H_ | 96 #endif // DEVICE_HID_HID_CONNECTION_LINUX_H_ |
| OLD | NEW |