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

Side by Side Diff: content/browser/resources/media/dump_creator.js

Issue 213703004: Ensure that WebRTC AEC recording checkbox is not set if cancelling file dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review fixes + rebase. Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 })();
OLDNEW
« no previous file with comments | « content/browser/media/webrtc_internals_unittest.cc ('k') | content/browser/resources/media/webrtc_internals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698