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

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

Issue 129833002: Add getUserMedia info to the dump and add browser tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 enableAecRecording: function() { 51 enableAecRecording: function() {
52 this.root_.getElementsByTagName('input')[0].checked = true; 52 this.root_.getElementsByTagName('input')[0].checked = true;
53 }, 53 },
54 54
55 /** 55 /**
56 * Downloads the PeerConnection updates and stats data as a file. 56 * Downloads the PeerConnection updates and stats data as a file.
57 * 57 *
58 * @private 58 * @private
59 */ 59 */
60 onDownloadData_: function() { 60 onDownloadData_: function() {
61 var textBlob = 61 var dump_object =
62 new Blob([JSON.stringify(peerConnectionDataStore, null, ' ')], 62 {
63 {type: 'octet/stream'}); 63 'getUserMedia': userMediaRequests,
64 'PeerConnections': peerConnectionDataStore,
65 };
66 var textBlob = new Blob([JSON.stringify(dump_object, null, ' ')],
67 {type: 'octet/stream'});
64 var URL = window.URL.createObjectURL(textBlob); 68 var URL = window.URL.createObjectURL(textBlob);
69
65 this.root_.getElementsByTagName('a')[0].href = URL; 70 this.root_.getElementsByTagName('a')[0].href = URL;
66 // The default action of the anchor will download the URL. 71 // The default action of the anchor will download the URL.
67 }, 72 },
68 73
69 /** 74 /**
70 * Handles the event of toggling the AEC recording state. 75 * Handles the event of toggling the AEC recording state.
71 * 76 *
72 * @private 77 * @private
73 */ 78 */
74 onAecRecordingChanged_: function() { 79 onAecRecordingChanged_: function() {
75 var enabled = this.root_.getElementsByTagName('input')[0].checked; 80 var enabled = this.root_.getElementsByTagName('input')[0].checked;
76 if (enabled) { 81 if (enabled) {
77 chrome.send('enableAecRecording'); 82 chrome.send('enableAecRecording');
78 } else { 83 } else {
79 chrome.send('disableAecRecording'); 84 chrome.send('disableAecRecording');
80 } 85 }
81 }, 86 },
82 }; 87 };
83 return DumpCreator; 88 return DumpCreator;
84 })(); 89 })();
OLDNEW
« no previous file with comments | « content/browser/media/webrtc_internals_browsertest.cc ('k') | content/browser/resources/media/webrtc_internals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698