Chromium Code Reviews| Index: extensions/common/api/audio.idl |
| diff --git a/extensions/common/api/audio.idl b/extensions/common/api/audio.idl |
| index 36a1124bd3b66b81339248e984c368cb6b9e5885..dcd7ac8f08dbc9da12c06b611e80fcb32775de55 100644 |
| --- a/extensions/common/api/audio.idl |
| +++ b/extensions/common/api/audio.idl |
| @@ -67,31 +67,45 @@ namespace audio { |
| double? gain; |
| }; |
| + dictionary DeviceIdLists { |
| + // <p>List of input devices specified by their ID.</p> |
| + // <p>To indicate input devices should be unaffected, leave this property |
| + // unset.</p> |
| + DOMString[]? input; |
| + |
| + // <p>List of output devices specified by their ID.</p> |
| + // <p>To indicate output devices should be unaffected, leave this property |
| + // unset.</p> |
| + DOMString[]? output; |
| + }; |
| + |
| callback GetInfoCallback = void(OutputDeviceInfo[] outputInfo, |
| InputDeviceInfo[] inputInfo); |
| - callback SetActiveDevicesCallback = void(); |
| - callback SetPropertiesCallback = void(); |
| + callback EmptyCallback = void(); |
| interface Functions { |
| // Gets the information of all audio output and input devices. |
| static void getInfo(GetInfoCallback callback); |
| - // Sets the active devices to the devices specified by |ids|. |
| - // It can pass in the "complete" active device id list of either input |
| - // devices, or output devices, or both. If only input device ids are passed |
| - // in, it will only change the input devices' active status, output devices will |
| - // NOT be changed; similarly for the case if only output devices are passed. |
| - // If the devices specified in |new_active_ids| are already active, they will |
| - // remain active. Otherwise, the old active devices will be de-activated |
| - // before we activate the new devices with the same type(input/output). |
| - static void setActiveDevices(DOMString[] ids, |
| - SetActiveDevicesCallback callback); |
| + // Sets lists of active input and/or output devices. |
| + // |ids|: <p>Specifies IDs of devices that should be active. If the list |
|
Devlin
2017/01/17 21:05:39
Rephrase slightly: If either the input or output l
tbarzic
2017/01/17 21:40:25
Done (though, with 'not set' instead of 'empty').
|
| + // of devices with a particular audio stream type is not specified, set |
| + // of active devices with that stream type will not be affected. |
| + // </p> |
| + // <p>It is an error to pass in a non-existent device ID.</p> |
| + // <p><b>NOTE:</b> While the method signature allows device IDs to be |
| + // passed as a list of strings, this method of setting active devices |
| + // is deprecated and should not be relied upon to work. Please, use |
|
Devlin
2017/01/17 21:05:39
nit: No ',' after please
tbarzic
2017/01/17 21:40:25
Done.
|
| + // $(ref: DeviceIdLists) instead. |
| + // </p> |
| + static void setActiveDevices((DeviceIdLists or DOMString[]) ids, |
| + EmptyCallback callback); |
| // Sets the properties for the input or output device. |
| static void setProperties(DOMString id, |
| DeviceProperties properties, |
| - SetPropertiesCallback callback); |
| - }; |
| + EmptyCallback callback); |
| + }; |
| interface Events { |
| // Fired when anything changes to the audio device configuration. |