Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: device/usb/usb_device_handle_impl.h

Issue 2821813002: Use Mojo enum types in the C++ USB interface (Closed)
Patch Set: Fix up //device/usb dependencies in //extensions/browser/api Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/usb/usb_device_handle.h ('k') | device/usb/usb_device_handle_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 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_USB_USB_DEVICE_HANDLE_IMPL_H_ 5 #ifndef DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_
6 #define DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_ 6 #define DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void ClaimInterface(int interface_number, 54 void ClaimInterface(int interface_number,
55 const ResultCallback& callback) override; 55 const ResultCallback& callback) override;
56 void ReleaseInterface(int interface_number, 56 void ReleaseInterface(int interface_number,
57 const ResultCallback& callback) override; 57 const ResultCallback& callback) override;
58 void SetInterfaceAlternateSetting(int interface_number, 58 void SetInterfaceAlternateSetting(int interface_number,
59 int alternate_setting, 59 int alternate_setting,
60 const ResultCallback& callback) override; 60 const ResultCallback& callback) override;
61 void ResetDevice(const ResultCallback& callback) override; 61 void ResetDevice(const ResultCallback& callback) override;
62 void ClearHalt(uint8_t endpoint, const ResultCallback& callback) override; 62 void ClearHalt(uint8_t endpoint, const ResultCallback& callback) override;
63 63
64 void ControlTransfer(UsbEndpointDirection direction, 64 void ControlTransfer(UsbTransferDirection direction,
65 TransferRequestType request_type, 65 UsbControlTransferType request_type,
66 TransferRecipient recipient, 66 UsbControlTransferRecipient recipient,
67 uint8_t request, 67 uint8_t request,
68 uint16_t value, 68 uint16_t value,
69 uint16_t index, 69 uint16_t index,
70 scoped_refptr<net::IOBuffer> buffer, 70 scoped_refptr<net::IOBuffer> buffer,
71 size_t length, 71 size_t length,
72 unsigned int timeout, 72 unsigned int timeout,
73 const TransferCallback& callback) override; 73 const TransferCallback& callback) override;
74 74
75 void IsochronousTransferIn( 75 void IsochronousTransferIn(
76 uint8_t endpoint, 76 uint8_t endpoint,
77 const std::vector<uint32_t>& packet_lengths, 77 const std::vector<uint32_t>& packet_lengths,
78 unsigned int timeout, 78 unsigned int timeout,
79 const IsochronousTransferCallback& callback) override; 79 const IsochronousTransferCallback& callback) override;
80 80
81 void IsochronousTransferOut( 81 void IsochronousTransferOut(
82 uint8_t endpoint, 82 uint8_t endpoint,
83 scoped_refptr<net::IOBuffer> buffer, 83 scoped_refptr<net::IOBuffer> buffer,
84 const std::vector<uint32_t>& packet_lengths, 84 const std::vector<uint32_t>& packet_lengths,
85 unsigned int timeout, 85 unsigned int timeout,
86 const IsochronousTransferCallback& callback) override; 86 const IsochronousTransferCallback& callback) override;
87 87
88 void GenericTransfer(UsbEndpointDirection direction, 88 void GenericTransfer(UsbTransferDirection direction,
89 uint8_t endpoint_number, 89 uint8_t endpoint_number,
90 scoped_refptr<net::IOBuffer> buffer, 90 scoped_refptr<net::IOBuffer> buffer,
91 size_t length, 91 size_t length,
92 unsigned int timeout, 92 unsigned int timeout,
93 const TransferCallback& callback) override; 93 const TransferCallback& callback) override;
94 const UsbInterfaceDescriptor* FindInterfaceByEndpoint( 94 const UsbInterfaceDescriptor* FindInterfaceByEndpoint(
95 uint8_t endpoint_address) override; 95 uint8_t endpoint_address) override;
96 96
97 protected: 97 protected:
98 friend class UsbDeviceImpl; 98 friend class UsbDeviceImpl;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // Refresh endpoint_map_ after ClaimInterface, ReleaseInterface and 134 // Refresh endpoint_map_ after ClaimInterface, ReleaseInterface and
135 // SetInterfaceAlternateSetting. 135 // SetInterfaceAlternateSetting.
136 void RefreshEndpointMap(); 136 void RefreshEndpointMap();
137 137
138 // Look up the claimed interface by endpoint. Return NULL if the interface 138 // Look up the claimed interface by endpoint. Return NULL if the interface
139 // of the endpoint is not found. 139 // of the endpoint is not found.
140 scoped_refptr<InterfaceClaimer> GetClaimedInterfaceForEndpoint( 140 scoped_refptr<InterfaceClaimer> GetClaimedInterfaceForEndpoint(
141 uint8_t endpoint); 141 uint8_t endpoint);
142 142
143 void ControlTransferInternal( 143 void ControlTransferInternal(
144 UsbEndpointDirection direction, 144 UsbTransferDirection direction,
145 TransferRequestType request_type, 145 UsbControlTransferType request_type,
146 TransferRecipient recipient, 146 UsbControlTransferRecipient recipient,
147 uint8_t request, 147 uint8_t request,
148 uint16_t value, 148 uint16_t value,
149 uint16_t index, 149 uint16_t index,
150 scoped_refptr<net::IOBuffer> buffer, 150 scoped_refptr<net::IOBuffer> buffer,
151 size_t length, 151 size_t length,
152 unsigned int timeout, 152 unsigned int timeout,
153 scoped_refptr<base::TaskRunner> callback_task_runner, 153 scoped_refptr<base::TaskRunner> callback_task_runner,
154 const TransferCallback& callback); 154 const TransferCallback& callback);
155 155
156 void IsochronousTransferInInternal( 156 void IsochronousTransferInInternal(
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 207 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
208 208
209 base::ThreadChecker thread_checker_; 209 base::ThreadChecker thread_checker_;
210 210
211 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandleImpl); 211 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandleImpl);
212 }; 212 };
213 213
214 } // namespace device 214 } // namespace device
215 215
216 #endif // DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_ 216 #endif // DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_
OLDNEW
« no previous file with comments | « device/usb/usb_device_handle.h ('k') | device/usb/usb_device_handle_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698