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

Unified Diff: content/browser/resources/media/webrtc_internals.js

Issue 129833002: Add getUserMedia info to the dump and add browser tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « content/browser/resources/media/dump_creator.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/resources/media/webrtc_internals.js
diff --git a/content/browser/resources/media/webrtc_internals.js b/content/browser/resources/media/webrtc_internals.js
index 7dd3d9d82eb7a71e4209cfa002ae359b97c7768d..dbc5c072cb93350e655f5a0932ffc21ed78e856a 100644
--- a/content/browser/resources/media/webrtc_internals.js
+++ b/content/browser/resources/media/webrtc_internals.js
@@ -9,6 +9,8 @@ var statsTable = null;
var dumpCreator = null;
/** A map from peer connection id to the PeerConnectionRecord. */
var peerConnectionDataStore = {};
+/** A list of getUserMedia requests. */
+var userMediaRequests = [];
/** A simple class to store the updates and stats data for a peer connection. */
var PeerConnectionRecord = (function() {
@@ -248,10 +250,11 @@ function addStats(data) {
* Adds a getUserMedia request.
*
* @param {!Object} data The object containing rid {number}, pid {number},
- * origin {string}, audio {Object<string>}, video {Object<string>}.
+ * origin {string}, audio {string}, video {string}.
*/
function addGetUserMedia(data) {
// TODO(jiayl): add the getUserMedia info to the tabbed UI.
+ userMediaRequests.push(data);
}
@@ -262,6 +265,10 @@ function addGetUserMedia(data) {
*/
function removeGetUserMediaForRenderer(data) {
// TODO(jiayl): remove the getUserMedia info from the tabbed UI.
+ for (var i = userMediaRequests.length - 1; i >= 0; --i) {
+ if (userMediaRequests[i].rid == data.rid)
+ userMediaRequests.splice(i, 1);
+ }
}
/**
« no previous file with comments | « content/browser/resources/media/dump_creator.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698