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

Unified Diff: extensions/common/api/usb.idl

Issue 826283002: Add support for sending a USB SET_CONFIGURATION request. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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: extensions/common/api/usb.idl
diff --git a/extensions/common/api/usb.idl b/extensions/common/api/usb.idl
index bae27e2b55fdcd976e0d029db76c535fd5b8f3c1..15307b1b67b2c716e2c2482fb420642ab2699513 100644
--- a/extensions/common/api/usb.idl
+++ b/extensions/common/api/usb.idl
@@ -210,6 +210,7 @@ namespace usb {
callback RequestAccessCallback = void (boolean success);
callback OpenDeviceCallback = void (ConnectionHandle handle);
callback FindDevicesCallback = void (ConnectionHandle[] handles);
+ callback SetConfigurationCallback = void (boolean success);
callback GetConfigurationCallback = void (ConfigDescriptor config);
callback ListInterfacesCallback = void (InterfaceDescriptor[] descriptors);
callback CloseDeviceCallback = void ();
@@ -268,6 +269,17 @@ namespace usb {
static void closeDevice(ConnectionHandle handle,
optional CloseDeviceCallback callback);
+ // Select a device configuration.
+ //
+ // This function effectively resets the device by selecting one of the
+ // device's available configurations. Only configuration values greater
+ // than <code>0</code> are valid however some buggy devices have a working
+ // configuration <code>0</code> and so this value is allowed.
+ // |handle|: An open connection to the device.
+ static void setConfiguration(ConnectionHandle handle,
+ long configurationValue,
+ SetConfigurationCallback callback);
+
// Gets the configuration descriptor for the currently selected
// configuration.
// |handle|: An open connection to the device.

Powered by Google App Engine
This is Rietveld 408576698