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

Side by Side Diff: extensions/common/api/audio.idl

Issue 2585413002: Update audio api to use v2 stable device ID (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // The <code>chrome.audio</code> API is provided to allow users to 5 // The <code>chrome.audio</code> API is provided to allow users to
6 // get information about and control the audio devices attached to the 6 // get information about and control the audio devices attached to the
7 // system. This API is currently only implemented for ChromeOS. 7 // system. This API is currently only implemented for ChromeOS.
8 namespace audio { 8 namespace audio {
9 9
10 dictionary OutputDeviceInfo { 10 dictionary OutputDeviceInfo {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // The user-friendly name (e.g. "USB Microphone"). 45 // The user-friendly name (e.g. "USB Microphone").
46 DOMString displayName; 46 DOMString displayName;
47 // Device name. 47 // Device name.
48 DOMString deviceName; 48 DOMString deviceName;
49 // True if this is the current active device. 49 // True if this is the current active device.
50 boolean isActive; 50 boolean isActive;
51 // True if this is muted. 51 // True if this is muted.
52 boolean isMuted; 52 boolean isMuted;
53 // The sound level of the device, volume for output, gain for input. 53 // The sound level of the device, volume for output, gain for input.
54 long level; 54 long level;
55 // The stable/persisted device id string when available. 55 // The stable/persisted device id string.
56 DOMString stableId;
Devlin 2016/12/20 18:15:45 This is kind of a shame - we now have 3 different
tbarzic 2016/12/20 18:51:20 I guess we could, but at cost of the app losing in
Devlin 2016/12/20 19:36:17 That makes it better. If that's the case, can we
tbarzic 2016/12/20 19:53:56 We could, but imho it would be better to provide t
57
58 // Deprecated version of stable audio device ID. Available for backward
59 // compatibility - usages should be migrated to |stableId|.
60 [deprecated = "Use |stableId|."]
56 DOMString? stableDeviceId; 61 DOMString? stableDeviceId;
57 }; 62 };
58 63
59 dictionary DeviceProperties { 64 dictionary DeviceProperties {
60 // True if this is muted. 65 // True if this is muted.
61 boolean isMuted; 66 boolean isMuted;
62 // If this is an output device then this field indicates the output volume. 67 // If this is an output device then this field indicates the output volume.
63 // If this is an input device then this field is ignored. 68 // If this is an input device then this field is ignored.
64 double? volume; 69 double? volume;
65 // If this is an input device then this field indicates the input gain. 70 // If this is an input device then this field indicates the input gain.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // |isInput|: true indicating audio input; false indicating audio output. 111 // |isInput|: true indicating audio input; false indicating audio output.
107 // |isMuted|: new value of mute state. 112 // |isMuted|: new value of mute state.
108 static void OnMuteChanged(boolean isInput, boolean isMuted); 113 static void OnMuteChanged(boolean isInput, boolean isMuted);
109 114
110 // Fired when audio devices change, either new devices being added, or 115 // Fired when audio devices change, either new devices being added, or
111 // existing devices being removed. 116 // existing devices being removed.
112 // |devices|: List of all present audio devices after the change. 117 // |devices|: List of all present audio devices after the change.
113 static void OnDevicesChanged(AudioDeviceInfo[] devices); 118 static void OnDevicesChanged(AudioDeviceInfo[] devices);
114 }; 119 };
115 }; 120 };
OLDNEW
« no previous file with comments | « extensions/browser/api/audio/audio_service_chromeos.cc ('k') | extensions/test/data/api_test/audio/add_nodes/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698