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

Unified Diff: device/usb/usb_device_impl.h

Issue 562763002: Convert device::UsbConfigDescriptor and friends to structs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add interface and endpoint descriptor iterator typedefs. Created 6 years, 3 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
« no previous file with comments | « device/usb/usb_device_handle_impl.cc ('k') | device/usb/usb_device_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « device/usb/usb_device_handle_impl.cc ('k') | device/usb/usb_device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698