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

Unified Diff: device/usb/mojo/device_impl.cc

Issue 1784733002: Track USB device configuration state in Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blink_open_state
Patch Set: Rebased. Created 4 years, 9 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/mojo/device_impl.h ('k') | device/usb/mojo/type_converters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/mojo/device_impl.cc
diff --git a/device/usb/mojo/device_impl.cc b/device/usb/mojo/device_impl.cc
index 94725714d0ffb6226f74072ce72d8e0ee2c75e2e..a2dd316f3471fe7a2a21ada55bfa5a52f0329c41 100644
--- a/device/usb/mojo/device_impl.cc
+++ b/device/usb/mojo/device_impl.cc
@@ -190,12 +190,9 @@ void DeviceImpl::OnOpen(const OpenCallback& callback,
}
void DeviceImpl::GetDeviceInfo(const GetDeviceInfoCallback& callback) {
- callback.Run(device_info_->Clone());
-}
-
-void DeviceImpl::GetConfiguration(const GetConfigurationCallback& callback) {
const UsbConfigDescriptor* config = device_->GetActiveConfiguration();
- callback.Run(config ? config->configuration_value : 0);
+ device_info_->active_configuration = config ? config->configuration_value : 0;
+ callback.Run(device_info_->Clone());
}
void DeviceImpl::Open(const OpenCallback& callback) {
« no previous file with comments | « device/usb/mojo/device_impl.h ('k') | device/usb/mojo/type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698