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; |
})(); |