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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 ' non-existing file name. Selecting an existing file will append to' + | 48 ' non-existing file name. Selecting an existing file will append to' + |
49 ' it, not overwrite it, rendering the file invalid. </p>'; | 49 ' it, not overwrite it, rendering the file invalid. </p>'; |
50 | 50 |
51 content.getElementsByTagName('a')[0].addEventListener( | 51 content.getElementsByTagName('a')[0].addEventListener( |
52 'click', this.onDownloadData_.bind(this)); | 52 'click', this.onDownloadData_.bind(this)); |
53 content.getElementsByTagName('input')[0].addEventListener( | 53 content.getElementsByTagName('input')[0].addEventListener( |
54 'click', this.onAecRecordingChanged_.bind(this)); | 54 'click', this.onAecRecordingChanged_.bind(this)); |
55 } | 55 } |
56 | 56 |
57 DumpCreator.prototype = { | 57 DumpCreator.prototype = { |
58 /** Mark the AEC recording checkbox checked.*/ | 58 // Mark the AEC recording checkbox checked. |
59 enableAecRecording: function() { | 59 enableAecRecording: function() { |
60 this.root_.getElementsByTagName('input')[0].checked = true; | 60 this.root_.getElementsByTagName('input')[0].checked = true; |
61 }, | 61 }, |
62 | 62 |
| 63 // Mark the AEC recording checkbox unchecked. |
| 64 disableAecRecording: function() { |
| 65 this.root_.getElementsByTagName('input')[0].checked = false; |
| 66 }, |
| 67 |
63 /** | 68 /** |
64 * Downloads the PeerConnection updates and stats data as a file. | 69 * Downloads the PeerConnection updates and stats data as a file. |
65 * | 70 * |
66 * @private | 71 * @private |
67 */ | 72 */ |
68 onDownloadData_: function() { | 73 onDownloadData_: function() { |
69 var dump_object = | 74 var dump_object = |
70 { | 75 { |
71 'getUserMedia': userMediaRequests, | 76 'getUserMedia': userMediaRequests, |
72 'PeerConnections': peerConnectionDataStore, | 77 'PeerConnections': peerConnectionDataStore, |
(...skipping 15 matching lines...) Expand all Loading... |
88 var enabled = this.root_.getElementsByTagName('input')[0].checked; | 93 var enabled = this.root_.getElementsByTagName('input')[0].checked; |
89 if (enabled) { | 94 if (enabled) { |
90 chrome.send('enableAecRecording'); | 95 chrome.send('enableAecRecording'); |
91 } else { | 96 } else { |
92 chrome.send('disableAecRecording'); | 97 chrome.send('disableAecRecording'); |
93 } | 98 } |
94 }, | 99 }, |
95 }; | 100 }; |
96 return DumpCreator; | 101 return DumpCreator; |
97 })(); | 102 })(); |
OLD | NEW |