| Index: extensions/common/api/usb.idl
|
| diff --git a/extensions/common/api/usb.idl b/extensions/common/api/usb.idl
|
| index 18dd1f352d5a058804b854a492e9099708a73f84..af6d55054c261a7b123e729536c8fda7414e36c6 100644
|
| --- a/extensions/common/api/usb.idl
|
| +++ b/extensions/common/api/usb.idl
|
| @@ -60,6 +60,8 @@ namespace usb {
|
| UsageType? usage;
|
| // Polling interval (interrupt and isochronous only).
|
| long? pollingInterval;
|
| + // Extra descriptor data associated with this endpoint.
|
| + ArrayBuffer extra_data;
|
| };
|
|
|
| [noinline_doc] dictionary InterfaceDescriptor {
|
| @@ -77,6 +79,25 @@ namespace usb {
|
| DOMString? description;
|
| // Available endpoints.
|
| EndpointDescriptor[] endpoints;
|
| + // Extra descriptor data associated with this interface.
|
| + ArrayBuffer extra_data;
|
| + };
|
| +
|
| + [noinline_doc] dictionary ConfigDescriptor {
|
| + // The configuration number.
|
| + long configurationValue;
|
| + // Description of the configuration.
|
| + DOMString? description;
|
| + // The device is self-powered.
|
| + boolean selfPowered;
|
| + // The device supports remote wakeup.
|
| + boolean remoteWakeup;
|
| + // The maximum power needed by this device in milliamps (mA).
|
| + long maxPower;
|
| + // Available interfaces.
|
| + InterfaceDescriptor[] interfaces;
|
| + // Extra descriptor data associated with this configuration.
|
| + ArrayBuffer extra_data;
|
| };
|
|
|
| dictionary ControlTransferInfo {
|
| @@ -181,6 +202,7 @@ namespace usb {
|
| callback RequestAccessCallback = void (boolean success);
|
| callback OpenDeviceCallback = void (ConnectionHandle handle);
|
| callback FindDevicesCallback = void (ConnectionHandle[] handles);
|
| + callback GetConfigurationCallback = void (ConfigDescriptor config);
|
| callback ListInterfacesCallback = void (InterfaceDescriptor[] descriptors);
|
| callback CloseDeviceCallback = void ();
|
| callback TransferCallback = void (TransferResultInfo info);
|
| @@ -232,6 +254,12 @@ namespace usb {
|
| static void closeDevice(ConnectionHandle handle,
|
| optional CloseDeviceCallback callback);
|
|
|
| + // Gets the configuration descriptor for the currently selected
|
| + // configuration.
|
| + // |handle|: An open connection to the device.
|
| + static void getConfiguration(ConnectionHandle handle,
|
| + GetConfigurationCallback callback);
|
| +
|
| // Lists all interfaces on a USB device.
|
| // |handle|: An open connection to the device.
|
| static void listInterfaces(ConnectionHandle handle,
|
|
|