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

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

Issue 129533003: Remove the RTP recording related code from webrtc-internals. (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
Index: content/browser/resources/media/dump_creator.js
diff --git a/content/browser/resources/media/dump_creator.js b/content/browser/resources/media/dump_creator.js
index 91b02205fc5526bc3787cb3c0b78148454645456..463e0fc6da76f056b845d9d459ae1d99ebf893bb 100644
--- a/content/browser/resources/media/dump_creator.js
+++ b/content/browser/resources/media/dump_creator.js
@@ -4,9 +4,7 @@
/**
- * Provides the UI to start and stop RTP recording, forwards the start/stop
- * commands to Chrome, and updates the UI based on dump updates. Also provides
- * creating a file containing all PeerConnection updates and stats.
+ * Provides the UI for dump creation.
*/
var DumpCreator = (function() {
/**
@@ -16,30 +14,6 @@ var DumpCreator = (function() {
*/
function DumpCreator(containerElement) {
/**
- * True if the RTP packets are being recorded.
- * @type {bool}
- * @private
- */
- this.recording_ = false;
-
- /**
- * @type {!Object.<string>}
- * @private
- * @const
- */
- this.StatusStrings_ = {
- NOT_STARTED: 'not started.',
- RECORDING: 'recording...',
- },
-
- /**
- * The status of dump creation.
- * @type {string}
- * @private
- */
- this.status_ = this.StatusStrings_.NOT_STARTED;
-
- /**
* The root element of the dump creation UI.
* @type {Element}
* @private
@@ -54,8 +28,7 @@ var DumpCreator = (function() {
var content = document.createElement('div');
this.root_.appendChild(content);
- content.innerHTML = '<button disabled></button> Status: <span></span>' +
- '<div><a><button>' +
+ content.innerHTML = '<div><a><button>' +
'Download the PeerConnection updates and stats data' +
'</button></a></div>' +
'<p><label><input type=checkbox>' +
@@ -67,14 +40,10 @@ var DumpCreator = (function() {
' calls. When the box is unchecked or this page is closed, this' +
' recording functionality will be disabled.</p>';
- content.getElementsByTagName('button')[0].addEventListener(
- 'click', this.onRtpToggled_.bind(this));
content.getElementsByTagName('a')[0].addEventListener(
'click', this.onDownloadData_.bind(this));
content.getElementsByTagName('input')[0].addEventListener(
'click', this.onAecRecordingChanged_.bind(this));
-
- this.updateDisplay_();
}
DumpCreator.prototype = {
@@ -98,24 +67,6 @@ var DumpCreator = (function() {
},
/**
- * Handles the event of toggling the rtp recording state.
- *
- * @private
- */
- onRtpToggled_: function() {
- if (this.recording_) {
- this.recording_ = false;
- this.status_ = this.StatusStrings_.NOT_STARTED;
- chrome.send('stopRtpRecording');
- } else {
- this.recording_ = true;
- this.status_ = this.StatusStrings_.RECORDING;
- chrome.send('startRtpRecording');
- }
- this.updateDisplay_();
- },
-
- /**
* Handles the event of toggling the AEC recording state.
*
* @private
@@ -128,34 +79,6 @@ var DumpCreator = (function() {
chrome.send('disableAecRecording');
}
},
-
- /**
- * Updates the UI based on the recording status.
- *
- * @private
- */
- updateDisplay_: function() {
- if (this.recording_) {
- this.root_.getElementsByTagName('button')[0].textContent =
- 'Stop Recording RTP Packets';
- } else {
- this.root_.getElementsByTagName('button')[0].textContent =
- 'Start Recording RTP Packets';
- }
-
- this.root_.getElementsByTagName('span')[0].textContent = this.status_;
- },
-
- /**
- * Set the status to the content of the update.
- * @param {!Object} update
- */
- onUpdate: function(update) {
- if (this.recording_) {
- this.status_ = JSON.stringify(update);
- this.updateDisplay_();
- }
- },
};
return DumpCreator;
})();
« no previous file with comments | « content/browser/media/webrtc_internals_message_handler.cc ('k') | content/browser/resources/media/webrtc_internals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698