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

Unified Diff: device/usb/usb_device_impl.h

Issue 1265833005: Get all the UsbConfigDescriptor for the device configuration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated chromeos related code again Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
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..56d783e5bd0718aa0e35bf446707a6adcd20cd0c 100644
--- a/device/usb/usb_device_impl.h
+++ b/device/usb/usb_device_impl.h
@@ -5,8 +5,6 @@
#ifndef DEVICE_USB_USB_DEVICE_IMPL_H_
#define DEVICE_USB_USB_DEVICE_IMPL_H_
-#include <vector>
-
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/threading/thread_checker.h"
@@ -42,7 +40,8 @@ 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* GetCurrentConfiguration() override;
+ const std::vector<UsbConfigDescriptor>& configurations() const override;
// These functions are used during enumeration only. The values must not
// change during the object's lifetime.
@@ -81,6 +80,7 @@ class UsbDeviceImpl : public UsbDevice {
void RefreshConfiguration();
private:
+ void GetAllConfigurations();
#if defined(OS_CHROMEOS)
void OnOpenRequestComplete(const OpenCallback& callback,
dbus::FileDescriptor fd);
@@ -103,6 +103,9 @@ class UsbDeviceImpl : public UsbDevice {
// in an unconfigured state.
scoped_ptr<UsbConfigDescriptor> configuration_;
+ // The device's all configuration descriptors.
+ std::vector<UsbConfigDescriptor> configurations_;
+
// Retain the context so that it will not be released before UsbDevice.
scoped_refptr<UsbContext> context_;

Powered by Google App Engine
This is Rietveld 408576698