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

Side by Side Diff: chrome/common/extensions/api/webrtc_audio_private.idl

Issue 2784563003: WebRTC Audio private API: removing WebRtcAudioPrivate(Set/Get)ActiveSinkFunction (Closed)
Patch Set: nitfixes Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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.webrtcAudioPrivate</code> API allows enumeration 5 // The <code>chrome.webrtcAudioPrivate</code> API allows enumeration
6 // of audio output (sink) devices as well as getting and setting the 6 // of audio output (sink) devices.
7 // active device for a given requesting process.
8 // 7 //
9 // Note that device IDs as used in this API are opaque (i.e. they are 8 // Note that device IDs as used in this API are opaque (i.e. they are
10 // not the hardware identifier of the device) and while they are 9 // not the hardware identifier of the device) and while they are
11 // unique and persistent across sessions, they are valid only to the 10 // unique and persistent across sessions, they are valid only to the
12 // extension calling this API (i.e. they cannot be shared between 11 // extension calling this API (i.e. they cannot be shared between
13 // extensions). 12 // extensions).
14 // 13 //
15 // See http://goo.gl/8rOmgk for further documentation of this API. 14 // See http://goo.gl/8rOmgk for further documentation of this API.
16 15
17 namespace webrtcAudioPrivate { 16 namespace webrtcAudioPrivate {
(...skipping 14 matching lines...) Expand all
32 // 31 //
33 // TODO(joi): Do unplugged devices even get included in enumeration? 32 // TODO(joi): Do unplugged devices even get included in enumeration?
34 boolean isReady; 33 boolean isReady;
35 // True if this device is the default audio sink device on the 34 // True if this device is the default audio sink device on the
36 // machine. 35 // machine.
37 boolean isDefault; 36 boolean isDefault;
38 }; 37 };
39 38
40 callback GetSinksCallback = void(SinkInfo[] sinkInfo); 39 callback GetSinksCallback = void(SinkInfo[] sinkInfo);
41 callback SinkIdCallback = void(DOMString sinkId); 40 callback SinkIdCallback = void(DOMString sinkId);
42 callback CompletionCallback = void();
43 41
44 dictionary RequestInfo { 42 dictionary RequestInfo {
Devlin 2017/04/05 14:13:55 This is no longer needed, right?
o1ka 2017/04/06 12:18:29 Done.
45 // The tab identifier from the chrome.tabs API, if the request is from a 43 // The tab identifier from the chrome.tabs API, if the request is from a
46 // tab. 44 // tab.
47 long? tabId; 45 long? tabId;
48 // The guest process id for the requester, if the request is from a 46 // The guest process id for the requester, if the request is from a
49 // webview. 47 // webview.
50 long? guestProcessId; 48 long? guestProcessId;
51 }; 49 };
52 50
53 interface Functions { 51 interface Functions {
54 // Retrieves a list of available audio sink devices. 52 // Retrieves a list of available audio sink devices.
55 static void getSinks(GetSinksCallback callback); 53 static void getSinks(GetSinksCallback callback);
56 54
57 // Retrieves the currently active audio sink for the given requesting
58 // process.
59 static void getActiveSink(RequestInfo request,
60 SinkIdCallback callback);
61
62 // Sets the active audio sink device for the specified requesting process.
63 static void setActiveSink(RequestInfo request,
64 DOMString sinkId,
65 optional CompletionCallback callback);
66
67 // Given a security origin and an input device ID valid for that 55 // Given a security origin and an input device ID valid for that
68 // security origin, retrieve an audio sink ID valid for the 56 // security origin, retrieve an audio sink ID valid for the
69 // extension, or the empty string if there is no associated audio 57 // extension, or the empty string if there is no associated audio
70 // sink. 58 // sink.
71 // 59 //
72 // The associated sink ID can be used as a sink ID for 60 // The associated sink ID can be used as a sink ID for
73 // setActiveSink. It is valid irrespective of which process you are 61 // setActiveSink. It is valid irrespective of which process you are
74 // setting the active sink for. 62 // setting the active sink for.
75 static void getAssociatedSink(DOMString securityOrigin, 63 static void getAssociatedSink(DOMString securityOrigin,
76 DOMString sourceIdInOrigin, 64 DOMString sourceIdInOrigin,
77 SinkIdCallback cb); 65 SinkIdCallback cb);
78 }; 66 };
79 67
80 interface Events { 68 interface Events {
81 // Fired when audio sink devices are added or removed. 69 // Fired when audio sink devices are added or removed.
82 static void onSinksChanged(); 70 static void onSinksChanged();
83 }; 71 };
84 }; 72 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698