Chromium Code Reviews| Index: device/usb/usb_device.h |
| diff --git a/device/usb/usb_device.h b/device/usb/usb_device.h |
| index 53087c8c79ddc5e7fb16f1cf1362824a1f9b513a..1fb19ec4598a0409fd3fc8f84e6cfe8db7ac3d59 100644 |
| --- a/device/usb/usb_device.h |
| +++ b/device/usb/usb_device.h |
| @@ -5,15 +5,17 @@ |
| #ifndef DEVICE_USB_USB_DEVICE_H_ |
| #define DEVICE_USB_USB_DEVICE_H_ |
| +#include <vector> |
| + |
| #include "base/basictypes.h" |
| #include "base/callback.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/strings/string16.h" |
| +#include "device/usb/usb_descriptors.h" |
| namespace device { |
| class UsbDeviceHandle; |
| -struct UsbConfigDescriptor; |
| // A UsbDevice object represents a detected USB device, providing basic |
| // information about it. Methods other than simple property accessors must be |
| @@ -52,7 +54,12 @@ class UsbDevice : public base::RefCountedThreadSafe<UsbDevice> { |
| // Gets the UsbConfigDescriptor for the active device configuration or nullptr |
| // if the device is unconfigured. |
| - virtual const UsbConfigDescriptor* GetConfiguration() = 0; |
| + virtual const UsbConfigDescriptor* GetActiveConfiguration() = 0; |
| + |
| + // Gets all the UsbConfigDescriptor for the device configuration. |
|
Reilly Grant (use Gerrit)
2015/08/03 18:04:04
"Gets all of the device's UsbConfigDescriptors."
juncai
2015/08/03 21:56:25
Done.
|
| + const std::vector<UsbConfigDescriptor>& configurations() { |
| + return configurations_; |
| + } |
| protected: |
| UsbDevice(uint16 vendor_id, |
| @@ -69,6 +76,9 @@ class UsbDevice : public base::RefCountedThreadSafe<UsbDevice> { |
| base::string16 product_string_; |
| base::string16 serial_number_; |
| + // The device's all configuration descriptors. |
|
Reilly Grant (use Gerrit)
2015/08/03 18:04:04
"All of the device's configuration descriptors."
juncai
2015/08/03 21:56:25
Done.
|
| + std::vector<UsbConfigDescriptor> configurations_; |
| + |
| private: |
| friend class base::RefCountedThreadSafe<UsbDevice>; |