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

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

Issue 1650133002: Start and stop RTC event logs from private extension API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bug in current time-limited audio debug recordings. Created 4 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 // Use the <code>chrome.webrtcLoggingPrivate</code> API to control diagnostic 5 // Use the <code>chrome.webrtcLoggingPrivate</code> API to control diagnostic
6 // WebRTC logging. 6 // WebRTC logging.
7 namespace webrtcLoggingPrivate { 7 namespace webrtcLoggingPrivate {
8 dictionary MetaDataEntry { 8 dictionary MetaDataEntry {
9 // The meta data entry key. 9 // The meta data entry key.
10 DOMString key; 10 DOMString key;
(...skipping 10 matching lines...) Expand all
21 dictionary RequestInfo { 21 dictionary RequestInfo {
22 // The tab identifier from the chrome.tabs API, if the request is from a 22 // The tab identifier from the chrome.tabs API, if the request is from a
23 // tab. 23 // tab.
24 long? tabId; 24 long? tabId;
25 25
26 // The guest process id for the requester, if the request is from a 26 // The guest process id for the requester, if the request is from a
27 // webview. 27 // webview.
28 long? guestProcessId; 28 long? guestProcessId;
29 }; 29 };
30 30
31 // This contains information about the result of audio debug recordings. 31 // This contains information about the result of audio debug recordings or
32 dictionary AudioDebugRecordingsInfo { 32 // WebRTC event logs.
33 dictionary RecordingInfo {
33 // Absolute path prefix for the files with the audio debug recordings. 34 // Absolute path prefix for the files with the audio debug recordings.
34 DOMString prefixPath; 35 DOMString prefixPath;
35 36
36 // Indicates if recording was stopped. 37 // Indicates if recording was stopped (either by a timed callback after the
38 // time limit has elapsed, or by a manual call).
37 boolean didStop; 39 boolean didStop;
38 40
39 // Indicates if recording was stopped manually through a 41 // Indicates if recording was stopped manually through a
40 // stopAudioDebugRecordings() call. 42 // stopAudioDebugRecordings() or stopWebRtcEventLogging() call.
41 boolean didManualStop; 43 boolean didManualStop;
42 }; 44 };
43 45
44
45 callback GenericDoneCallback = void (); 46 callback GenericDoneCallback = void ();
46 callback AudioDebugRecordingsCallback = 47 callback RecordingDoneCallback = void (RecordingInfo info);
47 void (AudioDebugRecordingsInfo info);
48 callback UploadDoneCallback = void (UploadResult result); 48 callback UploadDoneCallback = void (UploadResult result);
49 49
50 interface Functions { 50 interface Functions {
51 // For all functions, |request| determines which render process to apply 51 // For all functions, |request| determines which render process to apply
52 // the operation on. |request| identifies the requesting process. 52 // the operation on. |request| identifies the requesting process.
53 // |securityOrigin| is the security origin for the tab identified by |tabId| 53 // |securityOrigin| is the security origin for the tab identified by |tabId|
54 // and is used for verifying that the tab is the correct one and has not 54 // and is used for verifying that the tab is the correct one and has not
55 // been navigated away from. 55 // been navigated away from.
56 56
57 // Sets additional custom meta data that will be uploaded along with the 57 // Sets additional custom meta data that will be uploaded along with the
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // |seconds| indicates how many seconds of audio to record. |callback| 132 // |seconds| indicates how many seconds of audio to record. |callback|
133 // is invoked once recording stops. 133 // is invoked once recording stops.
134 // If |seconds| is zero, recording will continue until 134 // If |seconds| is zero, recording will continue until
135 // stopAudioDebugRecordings() is explicitly called. In this case, 135 // stopAudioDebugRecordings() is explicitly called. In this case,
136 // |callback| is invoked once recording starts and will report 136 // |callback| is invoked once recording starts and will report
137 // that recording has not stopped. 137 // that recording has not stopped.
138 // If |seconds| is negative, startAudioDebugRecordings() fails. 138 // If |seconds| is negative, startAudioDebugRecordings() fails.
139 static void startAudioDebugRecordings(RequestInfo request, 139 static void startAudioDebugRecordings(RequestInfo request,
140 DOMString securityOrigin, 140 DOMString securityOrigin,
141 long seconds, 141 long seconds,
142 AudioDebugRecordingsCallback callback); 142 RecordingDoneCallback callback);
143 143
144 // Stops audio debug recordings. |callback| is invoked once recording 144 // Stops audio debug recordings. |callback| is invoked once recording
145 // stops. If there is no recording in progress, stopAudioDebugRecordings() 145 // stops. If there is no recording in progress, stopAudioDebugRecordings()
146 // fails. 146 // fails.
147 static void stopAudioDebugRecordings(RequestInfo request, 147 static void stopAudioDebugRecordings(RequestInfo request,
148 DOMString securityOrigin, 148 DOMString securityOrigin,
149 AudioDebugRecordingsCallback callback); 149 RecordingDoneCallback callback);
150
151 // Starts WebRTC event logging.
152 // startWebRtcEventLogging() logs the most recent events that happened
153 // before the call, and then keep logging for |seconds| seconds into the
154 // future. |callback| is invoked once the logging stops.
155 // If |seconds| is zero, the logging will continue until
156 // stopWebRtcEventLogging() is explicitly called. In this case,
157 // |callback| is invoked once recording starts and will report
158 // that recording has not stopped.
159 // If |seconds| is negative, startWebRtcEventLogging() fails.
160 static void startWebRtcEventLogging(RequestInfo request,
161 DOMString securityOrigin,
tommi (sloooow) - chröme 2016/04/07 12:44:29 indent looks off here and below
terelius-chromium 2016/04/13 08:52:05 You're right. Done.
162 long seconds,
163 RecordingDoneCallback callback);
164
165 // Stops RTC event logging. |callback| is invoked once the logging stops.
166 // If there is no recording in progress, stopWebRtcEventLogging() fails.
167 static void stopWebRtcEventLogging(RequestInfo request,
168 DOMString securityOrigin,
169 RecordingDoneCallback callback);
150 }; 170 };
151 }; 171 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698