Index: device/usb/usb_device_impl.h |
diff --git a/device/usb/usb_device_impl.h b/device/usb/usb_device_impl.h |
index 1ece2e0b17e784ba9803e9032ba4c0ad24106828..e95c8dbc9add72a27033e2a7da9300b4a82d493b 100644 |
--- a/device/usb/usb_device_impl.h |
+++ b/device/usb/usb_device_impl.h |
@@ -10,6 +10,7 @@ |
#include "base/basictypes.h" |
#include "base/callback.h" |
#include "base/threading/thread_checker.h" |
+#include "device/usb/usb_descriptors.h" |
#include "device/usb/usb_device.h" |
struct libusb_device; |
@@ -37,7 +38,7 @@ class UsbDeviceImpl : public UsbDevice { |
#endif // OS_CHROMEOS |
virtual scoped_refptr<UsbDeviceHandle> Open() OVERRIDE; |
virtual bool Close(scoped_refptr<UsbDeviceHandle> handle) OVERRIDE; |
- virtual scoped_refptr<UsbConfigDescriptor> ListInterfaces() OVERRIDE; |
+ virtual const UsbConfigDescriptor& GetConfiguration() OVERRIDE; |
protected: |
friend class UsbServiceImpl; |
@@ -59,6 +60,11 @@ class UsbDeviceImpl : public UsbDevice { |
base::ThreadChecker thread_checker_; |
PlatformUsbDevice platform_device_; |
+ // The active configuration descriptor is not read immediately but cached for |
+ // later use. |
+ bool current_configuration_cached_; |
+ UsbConfigDescriptor current_configuration_; |
+ |
// Retain the context so that it will not be released before UsbDevice. |
scoped_refptr<UsbContext> context_; |