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

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

Issue 601073002: Move string descriptor getters from UsbDeviceHandle to UsbDevice. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix function order. Created 6 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
« 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 <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 22 matching lines...) Expand all
33 // UsbDeviceHandle class provides basic I/O related functionalities. 33 // UsbDeviceHandle class provides basic I/O related functionalities.
34 class UsbDeviceHandleImpl : public UsbDeviceHandle { 34 class UsbDeviceHandleImpl : public UsbDeviceHandle {
35 public: 35 public:
36 virtual scoped_refptr<UsbDevice> GetDevice() const OVERRIDE; 36 virtual scoped_refptr<UsbDevice> GetDevice() const OVERRIDE;
37 virtual void Close() OVERRIDE; 37 virtual void Close() OVERRIDE;
38 virtual bool ClaimInterface(int interface_number) OVERRIDE; 38 virtual bool ClaimInterface(int interface_number) OVERRIDE;
39 virtual bool ReleaseInterface(int interface_number) OVERRIDE; 39 virtual bool ReleaseInterface(int interface_number) OVERRIDE;
40 virtual bool SetInterfaceAlternateSetting(int interface_number, 40 virtual bool SetInterfaceAlternateSetting(int interface_number,
41 int alternate_setting) OVERRIDE; 41 int alternate_setting) OVERRIDE;
42 virtual bool ResetDevice() OVERRIDE; 42 virtual bool ResetDevice() OVERRIDE;
43 virtual bool GetManufacturer(base::string16* manufacturer) OVERRIDE; 43 virtual bool GetStringDescriptor(uint8 string_id,
44 virtual bool GetProduct(base::string16* product) OVERRIDE; 44 base::string16* string) OVERRIDE;
45 virtual bool GetSerial(base::string16* serial) OVERRIDE; 45
46 virtual void ControlTransfer(UsbEndpointDirection direction, 46 virtual void ControlTransfer(UsbEndpointDirection direction,
47 TransferRequestType request_type, 47 TransferRequestType request_type,
48 TransferRecipient recipient, 48 TransferRecipient recipient,
49 uint8 request, 49 uint8 request,
50 uint16 value, 50 uint16 value,
51 uint16 index, 51 uint16 index,
52 net::IOBuffer* buffer, 52 net::IOBuffer* buffer,
53 size_t length, 53 size_t length,
54 unsigned int timeout, 54 unsigned int timeout,
55 const UsbTransferCallback& callback) OVERRIDE; 55 const UsbTransferCallback& callback) OVERRIDE;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 const UsbTransferCallback& callback); 125 const UsbTransferCallback& callback);
126 126
127 static void LIBUSB_CALL 127 static void LIBUSB_CALL
128 PlatformTransferCallback(PlatformUsbTransferHandle handle); 128 PlatformTransferCallback(PlatformUsbTransferHandle handle);
129 129
130 // Invokes the callbacks associated with a given transfer, and removes it from 130 // Invokes the callbacks associated with a given transfer, and removes it from
131 // the in-flight transfer set. 131 // the in-flight transfer set.
132 void CompleteTransfer(PlatformUsbTransferHandle transfer); 132 void CompleteTransfer(PlatformUsbTransferHandle transfer);
133 133
134 bool GetSupportedLanguages(); 134 bool GetSupportedLanguages();
135 bool GetStringDescriptor(uint8 string_id, base::string16* string);
136 135
137 // Informs the object to drop internal references. 136 // Informs the object to drop internal references.
138 void InternalClose(); 137 void InternalClose();
139 138
140 UsbDeviceImpl* device_; 139 UsbDeviceImpl* device_;
141 140
142 PlatformUsbDeviceHandle handle_; 141 PlatformUsbDeviceHandle handle_;
143 142
144 const UsbConfigDescriptor& config_; 143 const UsbConfigDescriptor& config_;
145 144
(...skipping 17 matching lines...) Expand all
163 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 162 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
164 163
165 base::ThreadChecker thread_checker_; 164 base::ThreadChecker thread_checker_;
166 165
167 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandleImpl); 166 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandleImpl);
168 }; 167 };
169 168
170 } // namespace device 169 } // namespace device
171 170
172 #endif // DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_ 171 #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