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

Unified Diff: tools/perf/page_sets/webrtc_track_peerconnections.js

Issue 2450803002: Expose unprefixed RTCPeerConnection (Closed)
Patch Set: Update webrtc_track_peerconnections.js Created 4 years, 2 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 | « third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/webrtc_track_peerconnections.js
diff --git a/tools/perf/page_sets/webrtc_track_peerconnections.js b/tools/perf/page_sets/webrtc_track_peerconnections.js
index 68ee11fbee5718be09c99551274c0899cfc6c1b5..bb77bb6b1cf7547a951b4f812c03b1761f3a691d 100644
--- a/tools/perf/page_sets/webrtc_track_peerconnections.js
+++ b/tools/perf/page_sets/webrtc_track_peerconnections.js
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// This file overwrites the webkitRTCPeerConnection constructor with a
-// new constructor which tracks all created connections. It does this by
-// periodically gathering statistics on all connections, using the WebRTC
-// statistics API. All reports are gathered into window.peerConnectionReports,
-// which contains one list per connection. In each list there is a number of
-// report batches, which in turn contains metric names mapped to values.
+// This file overwrites the RTCPeerConnection constructor with a new constructor
+// which tracks all created connections. It does this by periodically gathering
+// statistics on all connections, using the WebRTC statistics API. All reports
+// are gathered into window.peerConnectionReports, which contains one list per
+// connection. In each list there is a number of report batches, which in turn
+// contains metric names mapped to values.
window.peerConnectionReports = [];
-webkitRTCPeerConnection = (function() {
+RTCPeerConnection = webkitRTCPeerConnection = (function() {
function getReportsAsDicts(getStatsResult) {
var result = [];
getStatsResult.forEach(function(report) {
@@ -37,7 +37,7 @@ webkitRTCPeerConnection = (function() {
}, pollIntervalMs);
}
- var originalConstructor = webkitRTCPeerConnection;
+ var originalConstructor = RTCPeerConnection;
return function() {
// Bind the incoming arguments to the original constructor.
var args = [null].concat(Array.prototype.slice.call(arguments));
@@ -49,4 +49,4 @@ webkitRTCPeerConnection = (function() {
gatherStatsFromOneConnection(peerConnection);
return peerConnection;
}
-})();
+})();
« no previous file with comments | « third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698