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

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

Issue 448503002: Set the file name of the webrtc-internals dump "webrtc_internals_dump.txt". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 onDownloadData_: function() { 79 onDownloadData_: function() {
80 var dump_object = 80 var dump_object =
81 { 81 {
82 'getUserMedia': userMediaRequests, 82 'getUserMedia': userMediaRequests,
83 'PeerConnections': peerConnectionDataStore, 83 'PeerConnections': peerConnectionDataStore,
84 }; 84 };
85 var textBlob = new Blob([JSON.stringify(dump_object, null, ' ')], 85 var textBlob = new Blob([JSON.stringify(dump_object, null, ' ')],
86 {type: 'octet/stream'}); 86 {type: 'octet/stream'});
87 var URL = window.URL.createObjectURL(textBlob); 87 var URL = window.URL.createObjectURL(textBlob);
88 88
89 this.root_.getElementsByTagName('a')[0].href = URL; 89 var anchor = this.root_.getElementsByTagName('a')[0];
90 anchor.href = URL;
91 anchor.download = 'webrtc_internals_dump.txt';
90 // The default action of the anchor will download the URL. 92 // The default action of the anchor will download the URL.
91 }, 93 },
92 94
93 /** 95 /**
94 * Handles the event of toggling the AEC recording state. 96 * Handles the event of toggling the AEC recording state.
95 * 97 *
96 * @private 98 * @private
97 */ 99 */
98 onAecRecordingChanged_: function() { 100 onAecRecordingChanged_: function() {
99 var enabled = this.root_.getElementsByTagName('input')[0].checked; 101 var enabled = this.root_.getElementsByTagName('input')[0].checked;
100 if (enabled) { 102 if (enabled) {
101 chrome.send('enableAecRecording'); 103 chrome.send('enableAecRecording');
102 } else { 104 } else {
103 chrome.send('disableAecRecording'); 105 chrome.send('disableAecRecording');
104 } 106 }
105 }, 107 },
106 }; 108 };
107 return DumpCreator; 109 return DumpCreator;
108 })(); 110 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698