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

Unified Diff: device/usb/mojo/type_converters.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.cc ('k') | device/usb/public/interfaces/device.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/mojo/type_converters.cc
diff --git a/device/usb/mojo/type_converters.cc b/device/usb/mojo/type_converters.cc
index 0145abd1ff2d2c96de49d4a15494c4fcee4f70cd..e22b58fb67f945950e5b7a2f7a5fa3cf6e5c213c 100644
--- a/device/usb/mojo/type_converters.cc
+++ b/device/usb/mojo/type_converters.cc
@@ -260,6 +260,8 @@ TypeConverter<device::usb::DeviceInfoPtr, device::UsbDevice>::Convert(
info->manufacturer_name = base::UTF16ToUTF8(device.manufacturer_string());
info->product_name = base::UTF16ToUTF8(device.product_string());
info->serial_number = base::UTF16ToUTF8(device.serial_number());
+ const device::UsbConfigDescriptor* config = device.GetActiveConfiguration();
+ info->active_configuration = config ? config->configuration_value : 0;
info->configurations = mojo::Array<device::usb::ConfigurationInfoPtr>::From(
device.configurations());
if (device.webusb_allowed_origins()) {
« no previous file with comments | « device/usb/mojo/device_impl.cc ('k') | device/usb/public/interfaces/device.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698