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_MAC_H_ | 5 #ifndef DEVICE_HID_HID_CONNECTION_MAC_H_ |
6 #define DEVICE_HID_HID_CONNECTION_MAC_H_ | 6 #define DEVICE_HID_HID_CONNECTION_MAC_H_ |
7 | 7 |
8 #include <CoreFoundation/CoreFoundation.h> | 8 #include <CoreFoundation/CoreFoundation.h> |
9 #include <IOKit/hid/IOHIDManager.h> | 9 #include <IOKit/hid/IOHIDManager.h> |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 scoped_refptr<net::IOBuffer> buffer, | 55 scoped_refptr<net::IOBuffer> buffer, |
56 size_t size, | 56 size_t size, |
57 const WriteCallback& callback); | 57 const WriteCallback& callback); |
58 | 58 |
59 void Flush(); | 59 void Flush(); |
60 void ProcessInputReport(scoped_refptr<net::IOBufferWithSize> buffer); | 60 void ProcessInputReport(scoped_refptr<net::IOBufferWithSize> buffer); |
61 void ProcessReadQueue(); | 61 void ProcessReadQueue(); |
62 | 62 |
63 base::ScopedCFTypeRef<IOHIDDeviceRef> device_; | 63 base::ScopedCFTypeRef<IOHIDDeviceRef> device_; |
64 scoped_refptr<base::MessageLoopProxy> message_loop_; | 64 scoped_refptr<base::MessageLoopProxy> message_loop_; |
65 scoped_ptr<uint8_t[]> inbound_buffer_; | 65 std::vector<uint8_t> inbound_buffer_; |
66 | 66 |
67 std::queue<PendingHidReport> pending_reports_; | 67 std::queue<PendingHidReport> pending_reports_; |
68 std::queue<PendingHidRead> pending_reads_; | 68 std::queue<PendingHidRead> pending_reads_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(HidConnectionMac); | 70 DISALLOW_COPY_AND_ASSIGN(HidConnectionMac); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace device | 73 } // namespace device |
74 | 74 |
75 #endif // DEVICE_HID_HID_CONNECTION_MAC_H_ | 75 #endif // DEVICE_HID_HID_CONNECTION_MAC_H_ |
OLD | NEW |