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

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

Issue 2657423003: audio API: Use an enum for audio device device type (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') | no next file » | 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 401949cbb2f2b08f5b734b6624d0b1e3c9cae9b9..a1706126b68ffa83854e1eb15c2960da5ffe452b 100644
--- a/extensions/common/api/audio.idl
+++ b/extensions/common/api/audio.idl
@@ -13,6 +13,25 @@ namespace audio {
OUTPUT
};
+ // Available audio device types.
+ enum DeviceType {
+ HEADPHONE,
+ MIC,
+ USB,
+ BLUETOOTH,
+ HDMI,
+ INTERNAL_SPEAKER,
+ INTERNAL_MIC,
+ FRONT_MIC,
+ REAR_MIC,
+ KEYBOARD_MIC,
+ HOTWORD,
+ LINEOUT,
+ POST_MIX_LOOPBACK,
+ POST_DSP_LOOPBACK,
+ OTHER
+ };
+
dictionary OutputDeviceInfo {
// The unique identifier of the audio output device.
DOMString id;
@@ -46,10 +65,8 @@ namespace audio {
StreamType streamType;
// True for input device; false for output device.
[deprecated="Use |streamType|."] boolean isInput;
- // Type of the device, including "INTERNAL_SPEAKER", "INTERNAL_MIC",
- // "HEADPHONE", "USB", "BLUETOOTH", "HDMI", "MIC", "KEYBOARD_MIC",
- // "AOKR", and "OTHER".
- DOMString deviceType;
+ // Type of the device.
+ DeviceType deviceType;
// The user-friendly name (e.g. "USB Microphone").
DOMString displayName;
// Device name.
« no previous file with comments | « extensions/browser/api/audio/audio_service_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698