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

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: Rebased. Created 5 years, 11 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 | « extensions/common/api/_api_features.json ('k') | extensions/test/data/api_test/usb/list_interfaces/test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/api/usb.idl
diff --git a/extensions/common/api/usb.idl b/extensions/common/api/usb.idl
index 9be109f849ce7e8eb95e8ee9ac643e0e99c6b0aa..a60ce6df3fe8c000418b9345290c0949c883a67b 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.
« no previous file with comments | « extensions/common/api/_api_features.json ('k') | extensions/test/data/api_test/usb/list_interfaces/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698