Chromium Code Reviews| Index: device/usb/usb_device_impl.h |
| diff --git a/device/usb/usb_device_impl.h b/device/usb/usb_device_impl.h |
| index 3e9c8d0cc435455626918372c3cd96b9a9e23af4..8c1aa26ff9cedfacfb3e146e7cd3fc7345a6986c 100644 |
| --- a/device/usb/usb_device_impl.h |
| +++ b/device/usb/usb_device_impl.h |
| @@ -5,12 +5,9 @@ |
| #ifndef DEVICE_USB_USB_DEVICE_IMPL_H_ |
| #define DEVICE_USB_USB_DEVICE_IMPL_H_ |
| -#include <vector> |
|
Reilly Grant (use Gerrit)
2015/08/03 18:04:04
Don't remove these includes just because usb_devic
juncai
2015/08/03 21:56:25
Done.
|
| - |
| #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; |
| @@ -42,7 +39,7 @@ class UsbDeviceImpl : public UsbDevice { |
| #endif // OS_CHROMEOS |
| void Open(const OpenCallback& callback) override; |
| bool Close(scoped_refptr<UsbDeviceHandle> handle) override; |
| - const UsbConfigDescriptor* GetConfiguration() override; |
| + const UsbConfigDescriptor* GetActiveConfiguration() override; |
| // These functions are used during enumeration only. The values must not |
| // change during the object's lifetime. |
| @@ -76,11 +73,13 @@ class UsbDeviceImpl : public UsbDevice { |
| void set_visited(bool visited) { visited_ = visited; } |
| bool was_visited() const { return visited_; } |
| void OnDisconnect(); |
| + void set_configurations(); |
| // Called by UsbDeviceHandleImpl. |
| void RefreshConfiguration(); |
| private: |
| + void GetAllConfigurations(); |
| #if defined(OS_CHROMEOS) |
| void OnOpenRequestComplete(const OpenCallback& callback, |
| dbus::FileDescriptor fd); |
| @@ -101,7 +100,7 @@ class UsbDeviceImpl : public UsbDevice { |
| // The current device configuration descriptor. May be null if the device is |
| // in an unconfigured state. |
| - scoped_ptr<UsbConfigDescriptor> configuration_; |
| + const UsbConfigDescriptor* configuration_; |
|
Reilly Grant (use Gerrit)
2015/08/03 18:04:04
Maybe call this "active_configuration_" and docume
juncai
2015/08/03 21:56:25
Done.
|
| // Retain the context so that it will not be released before UsbDevice. |
| scoped_refptr<UsbContext> context_; |