OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_USB_USB_DEVICE_HANDLE_WIN_H_ | 5 #ifndef DEVICE_USB_USB_DEVICE_HANDLE_WIN_H_ |
6 #define DEVICE_USB_USB_DEVICE_HANDLE_WIN_H_ | 6 #define DEVICE_USB_USB_DEVICE_HANDLE_WIN_H_ |
7 | 7 |
8 #include <unordered_map> | 8 #include <unordered_map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 void ClaimInterface(int interface_number, | 39 void ClaimInterface(int interface_number, |
40 const ResultCallback& callback) override; | 40 const ResultCallback& callback) override; |
41 void ReleaseInterface(int interface_number, | 41 void ReleaseInterface(int interface_number, |
42 const ResultCallback& callback) override; | 42 const ResultCallback& callback) override; |
43 void SetInterfaceAlternateSetting(int interface_number, | 43 void SetInterfaceAlternateSetting(int interface_number, |
44 int alternate_setting, | 44 int alternate_setting, |
45 const ResultCallback& callback) override; | 45 const ResultCallback& callback) override; |
46 void ResetDevice(const ResultCallback& callback) override; | 46 void ResetDevice(const ResultCallback& callback) override; |
47 void ClearHalt(uint8_t endpoint, const ResultCallback& callback) override; | 47 void ClearHalt(uint8_t endpoint, const ResultCallback& callback) override; |
48 | 48 |
49 void ControlTransfer(UsbEndpointDirection direction, | 49 void ControlTransfer(UsbTransferDirection direction, |
50 TransferRequestType request_type, | 50 UsbControlTransferType request_type, |
51 TransferRecipient recipient, | 51 UsbControlTransferRecipient recipient, |
52 uint8_t request, | 52 uint8_t request, |
53 uint16_t value, | 53 uint16_t value, |
54 uint16_t index, | 54 uint16_t index, |
55 scoped_refptr<net::IOBuffer> buffer, | 55 scoped_refptr<net::IOBuffer> buffer, |
56 size_t length, | 56 size_t length, |
57 unsigned int timeout, | 57 unsigned int timeout, |
58 const TransferCallback& callback) override; | 58 const TransferCallback& callback) override; |
59 | 59 |
60 void IsochronousTransferIn( | 60 void IsochronousTransferIn( |
61 uint8_t endpoint, | 61 uint8_t endpoint, |
62 const std::vector<uint32_t>& packet_lengths, | 62 const std::vector<uint32_t>& packet_lengths, |
63 unsigned int timeout, | 63 unsigned int timeout, |
64 const IsochronousTransferCallback& callback) override; | 64 const IsochronousTransferCallback& callback) override; |
65 | 65 |
66 void IsochronousTransferOut( | 66 void IsochronousTransferOut( |
67 uint8_t endpoint, | 67 uint8_t endpoint, |
68 scoped_refptr<net::IOBuffer> buffer, | 68 scoped_refptr<net::IOBuffer> buffer, |
69 const std::vector<uint32_t>& packet_lengths, | 69 const std::vector<uint32_t>& packet_lengths, |
70 unsigned int timeout, | 70 unsigned int timeout, |
71 const IsochronousTransferCallback& callback) override; | 71 const IsochronousTransferCallback& callback) override; |
72 | 72 |
73 void GenericTransfer(UsbEndpointDirection direction, | 73 void GenericTransfer(UsbTransferDirection direction, |
74 uint8_t endpoint_number, | 74 uint8_t endpoint_number, |
75 scoped_refptr<net::IOBuffer> buffer, | 75 scoped_refptr<net::IOBuffer> buffer, |
76 size_t length, | 76 size_t length, |
77 unsigned int timeout, | 77 unsigned int timeout, |
78 const TransferCallback& callback) override; | 78 const TransferCallback& callback) override; |
79 const UsbInterfaceDescriptor* FindInterfaceByEndpoint( | 79 const UsbInterfaceDescriptor* FindInterfaceByEndpoint( |
80 uint8_t endpoint_address) override; | 80 uint8_t endpoint_address) override; |
81 | 81 |
82 protected: | 82 protected: |
83 friend class UsbDeviceWin; | 83 friend class UsbDeviceWin; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 124 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
125 | 125 |
126 base::WeakPtrFactory<UsbDeviceHandleWin> weak_factory_; | 126 base::WeakPtrFactory<UsbDeviceHandleWin> weak_factory_; |
127 | 127 |
128 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandleWin); | 128 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandleWin); |
129 }; | 129 }; |
130 | 130 |
131 } // namespace device | 131 } // namespace device |
132 | 132 |
133 #endif // DEVICE_USB_USB_DEVICE_HANDLE_WIN_H_ | 133 #endif // DEVICE_USB_USB_DEVICE_HANDLE_WIN_H_ |
OLD | NEW |