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

Side by Side Diff: device/usb/usb_device_handle.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_filter_unittest.cc ('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 <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // The platform device handle will be closed when UsbDeviceHandle destructs. 49 // The platform device handle will be closed when UsbDeviceHandle destructs.
50 virtual void Close() = 0; 50 virtual void Close() = 0;
51 51
52 // Device manipulation operations. These methods are blocking and must be 52 // Device manipulation operations. These methods are blocking and must be
53 // called on FILE thread. 53 // called on FILE thread.
54 virtual bool ClaimInterface(int interface_number) = 0; 54 virtual bool ClaimInterface(int interface_number) = 0;
55 virtual bool ReleaseInterface(int interface_number) = 0; 55 virtual bool ReleaseInterface(int interface_number) = 0;
56 virtual bool SetInterfaceAlternateSetting(int interface_number, 56 virtual bool SetInterfaceAlternateSetting(int interface_number,
57 int alternate_setting) = 0; 57 int alternate_setting) = 0;
58 virtual bool ResetDevice() = 0; 58 virtual bool ResetDevice() = 0;
59 virtual bool GetManufacturer(base::string16* manufacturer) = 0; 59
60 virtual bool GetProduct(base::string16* product) = 0; 60 // Gets the string descriptor with the given index from the device, or returns
61 virtual bool GetSerial(base::string16* serial) = 0; 61 // false. This method is blocking and must be called on the FILE thread.
62 virtual bool GetStringDescriptor(uint8 string_id, base::string16* string) = 0;
62 63
63 // Async IO. Can be called on any thread. 64 // Async IO. Can be called on any thread.
64 virtual void ControlTransfer(UsbEndpointDirection direction, 65 virtual void ControlTransfer(UsbEndpointDirection direction,
65 TransferRequestType request_type, 66 TransferRequestType request_type,
66 TransferRecipient recipient, 67 TransferRecipient recipient,
67 uint8 request, 68 uint8 request,
68 uint16 value, 69 uint16 value,
69 uint16 index, 70 uint16 index,
70 net::IOBuffer* buffer, 71 net::IOBuffer* buffer,
71 size_t length, 72 size_t length,
(...skipping 29 matching lines...) Expand all
101 UsbDeviceHandle() {}; 102 UsbDeviceHandle() {};
102 103
103 virtual ~UsbDeviceHandle() {}; 104 virtual ~UsbDeviceHandle() {};
104 105
105 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandle); 106 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandle);
106 }; 107 };
107 108
108 } // namespace device 109 } // namespace device
109 110
110 #endif // DEVICE_USB_USB_DEVICE_HANDLE_H_ 111 #endif // DEVICE_USB_USB_DEVICE_HANDLE_H_
OLDNEW
« no previous file with comments | « device/usb/usb_device_filter_unittest.cc ('k') | device/usb/usb_device_handle_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698