OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 | 5 |
6 /** | 6 /** |
7 * Provides the UI for dump creation. | 7 * Provides the UI for dump creation. |
8 */ | 8 */ |
9 var DumpCreator = (function() { | 9 var DumpCreator = (function() { |
10 /** | 10 /** |
(...skipping 14 matching lines...) Expand all Loading... |
25 var summary = document.createElement('summary'); | 25 var summary = document.createElement('summary'); |
26 this.root_.appendChild(summary); | 26 this.root_.appendChild(summary); |
27 summary.textContent = 'Create Dump'; | 27 summary.textContent = 'Create Dump'; |
28 var content = document.createElement('div'); | 28 var content = document.createElement('div'); |
29 this.root_.appendChild(content); | 29 this.root_.appendChild(content); |
30 | 30 |
31 content.innerHTML = '<div><a><button>' + | 31 content.innerHTML = '<div><a><button>' + |
32 'Download the PeerConnection updates and stats data' + | 32 'Download the PeerConnection updates and stats data' + |
33 '</button></a></div>' + | 33 '</button></a></div>' + |
34 '<p><label><input type=checkbox>' + | 34 '<p><label><input type=checkbox>' + |
35 'Enable diagnostic audio recordings.</label></p>' + | 35 'Enable diagnostic audio recordings</label></p>' + |
36 '<p>A diagnostic audio recording is used for analyzing audio' + | 36 '<p>A diagnostic audio recording is used for analyzing audio' + |
37 ' problems. It contains the audio played out from the speaker and' + | 37 ' problems. It contains the audio played out from the speaker and' + |
38 ' recorded from the microphone and is saved to the local disk.' + | 38 ' recorded from the microphone and is saved to the local disk.' + |
39 ' Checking this box will enable the recording for ongoing WebRTC' + | 39 ' Checking this box will enable the recording for ongoing WebRTC' + |
40 ' calls and for future WebRTC calls. When the box is unchecked or' + | 40 ' calls and for future WebRTC calls. When the box is unchecked or' + |
41 ' this page is closed, all ongoing recordings will be stopped and' + | 41 ' this page is closed, all ongoing recordings will be stopped and' + |
42 ' this recording functionality will be disabled for future WebRTC' + | 42 ' this recording functionality will be disabled for future WebRTC' + |
43 ' calls. Recordings in multiple tabs are supported as well as' + | 43 ' calls. Recordings in multiple tabs are supported as well as' + |
44 ' multiple recordings in the same tab. When enabling, you select a' + | 44 ' multiple recordings in the same tab. When enabling, you select a' + |
45 ' base filename to save the dump(s) to. The base filename will have a' + | 45 ' base filename to save the dump(s) to. The base filename will have a' + |
46 ' suffix appended to it as <base filename>.<render process' + | 46 ' suffix appended to it as <base filename>.<render process' + |
47 ' ID>.<recording ID>. If recordings are' + | 47 ' ID>.<recording ID>. If recordings are' + |
48 ' disabled and then enabled using the same base filename, the' + | 48 ' disabled and then enabled using the same base filename, the' + |
49 ' file(s) will be appended to and may become invalid. It is' + | 49 ' file(s) will be appended to and may become invalid. It is' + |
50 ' recommended to choose a new base filename each time or move' + | 50 ' recommended to choose a new base filename each time or move' + |
51 ' the resulting files before enabling again. If track processing is' + | 51 ' the resulting files before enabling again. If track processing is' + |
52 ' disabled (--disable-audio-track-processing): (1) Only one recording' + | 52 ' disabled (--disable-audio-track-processing): (1) Only one recording' + |
53 ' per render process is supported. (2) When the box is unchecked or' + | 53 ' per render process is supported. (2) When the box is unchecked or' + |
54 ' this page is closed, ongoing recordings will continue until the' + | 54 ' this page is closed, ongoing recordings will continue until the' + |
55 ' call ends or the page with the recording is closed.</p>'; | 55 ' call ends or the page with the recording is closed</p>'; |
56 | 56 |
57 content.getElementsByTagName('a')[0].addEventListener( | 57 content.getElementsByTagName('a')[0].addEventListener( |
58 'click', this.onDownloadData_.bind(this)); | 58 'click', this.onDownloadData_.bind(this)); |
59 content.getElementsByTagName('input')[0].addEventListener( | 59 content.getElementsByTagName('input')[0].addEventListener( |
60 'click', this.onAecRecordingChanged_.bind(this)); | 60 'click', this.onAecRecordingChanged_.bind(this)); |
61 } | 61 } |
62 | 62 |
63 DumpCreator.prototype = { | 63 DumpCreator.prototype = { |
64 // Mark the AEC recording checkbox checked. | 64 // Mark the AEC recording checkbox checked. |
65 enableAecRecording: function() { | 65 enableAecRecording: function() { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 var enabled = this.root_.getElementsByTagName('input')[0].checked; | 101 var enabled = this.root_.getElementsByTagName('input')[0].checked; |
102 if (enabled) { | 102 if (enabled) { |
103 chrome.send('enableAecRecording'); | 103 chrome.send('enableAecRecording'); |
104 } else { | 104 } else { |
105 chrome.send('disableAecRecording'); | 105 chrome.send('disableAecRecording'); |
106 } | 106 } |
107 }, | 107 }, |
108 }; | 108 }; |
109 return DumpCreator; | 109 return DumpCreator; |
110 })(); | 110 })(); |
OLD | NEW |