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

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

Issue 1369643002: Add configuration and interface permission checks to DeviceImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add new method ot Android USB mocks. Created 5 years, 2 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
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 <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 unsigned int packet_length, 75 unsigned int packet_length,
76 unsigned int timeout, 76 unsigned int timeout,
77 const TransferCallback& callback) override; 77 const TransferCallback& callback) override;
78 78
79 void GenericTransfer(UsbEndpointDirection direction, 79 void GenericTransfer(UsbEndpointDirection direction,
80 uint8_t endpoint, 80 uint8_t endpoint,
81 scoped_refptr<net::IOBuffer> buffer, 81 scoped_refptr<net::IOBuffer> buffer,
82 size_t length, 82 size_t length,
83 unsigned int timeout, 83 unsigned int timeout,
84 const TransferCallback& callback) override; 84 const TransferCallback& callback) override;
85 bool FindInterfaceByEndpoint(uint8_t endpoint_address,
86 uint8_t* interface_number) override;
85 87
86 protected: 88 protected:
87 friend class UsbDeviceImpl; 89 friend class UsbDeviceImpl;
88 90
89 // This constructor is called by UsbDeviceImpl. 91 // This constructor is called by UsbDeviceImpl.
90 UsbDeviceHandleImpl( 92 UsbDeviceHandleImpl(
91 scoped_refptr<UsbContext> context, 93 scoped_refptr<UsbContext> context,
92 scoped_refptr<UsbDeviceImpl> device, 94 scoped_refptr<UsbDeviceImpl> device,
93 PlatformUsbDeviceHandle handle, 95 PlatformUsbDeviceHandle handle,
94 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner); 96 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner);
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 217 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
216 218
217 base::ThreadChecker thread_checker_; 219 base::ThreadChecker thread_checker_;
218 220
219 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandleImpl); 221 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandleImpl);
220 }; 222 };
221 223
222 } // namespace device 224 } // namespace device
223 225
224 #endif // DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_ 226 #endif // DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698