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/audio.idl

Issue 2605983002: Simplify logic behind chrome.audio.setActiveDevices (Closed)
Patch Set: . Created 3 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/browser/api/audio/audio_service_chromeos.cc ('k') | extensions/test/data/api_test/audio/test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/api/audio.idl
diff --git a/extensions/common/api/audio.idl b/extensions/common/api/audio.idl
index 36a1124bd3b66b81339248e984c368cb6b9e5885..2d68b5d2c36b24f44d5d1ad4de6fcce076f0939b 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 either the
+ // input or output list is not set, devices in that category are
+ // unaffected.
+ // </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
+ // $(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.
« no previous file with comments | « extensions/browser/api/audio/audio_service_chromeos.cc ('k') | extensions/test/data/api_test/audio/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698