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

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

Issue 1847183002: Use interface associations to check function permissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nit and fixed Windows build. Created 4 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/public/interfaces/device.mojom ('k') | device/usb/usb_device_handle_impl.h » ('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_H_ 5 #ifndef DEVICE_USB_USB_DEVICE_HANDLE_H_
6 #define DEVICE_USB_USB_DEVICE_HANDLE_H_ 6 #define DEVICE_USB_USB_DEVICE_HANDLE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 unsigned int timeout, 104 unsigned int timeout,
105 const IsochronousTransferCallback& callback) = 0; 105 const IsochronousTransferCallback& callback) = 0;
106 106
107 virtual void GenericTransfer(UsbEndpointDirection direction, 107 virtual void GenericTransfer(UsbEndpointDirection direction,
108 uint8_t endpoint_number, 108 uint8_t endpoint_number,
109 scoped_refptr<net::IOBuffer> buffer, 109 scoped_refptr<net::IOBuffer> buffer,
110 size_t length, 110 size_t length,
111 unsigned int timeout, 111 unsigned int timeout,
112 const TransferCallback& callback) = 0; 112 const TransferCallback& callback) = 0;
113 113
114 // Gets the interface containing |endpoint_address|. Returns false if no 114 // Gets the interface containing |endpoint_address|. Returns nullptr if no
115 // claimed interface contains that endpoint. 115 // claimed interface contains that endpoint.
116 virtual bool FindInterfaceByEndpoint(uint8_t endpoint_address, 116 virtual const UsbInterfaceDescriptor* FindInterfaceByEndpoint(
117 uint8_t* interface_number) = 0; 117 uint8_t endpoint_address) = 0;
118 118
119 protected: 119 protected:
120 friend class base::RefCountedThreadSafe<UsbDeviceHandle>; 120 friend class base::RefCountedThreadSafe<UsbDeviceHandle>;
121 121
122 UsbDeviceHandle(); 122 UsbDeviceHandle();
123 123
124 virtual ~UsbDeviceHandle(); 124 virtual ~UsbDeviceHandle();
125 125
126 private: 126 private:
127 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandle); 127 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandle);
128 }; 128 };
129 129
130 } // namespace device 130 } // namespace device
131 131
132 #endif // DEVICE_USB_USB_DEVICE_HANDLE_H_ 132 #endif // DEVICE_USB_USB_DEVICE_HANDLE_H_
OLDNEW
« no previous file with comments | « device/usb/public/interfaces/device.mojom ('k') | device/usb/usb_device_handle_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698