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

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

Issue 68103011: Adds URL to each peerconnection tab title on webrtc-internals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 6 years, 10 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 | content/browser/resources/media/tab_view.js » ('j') | 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 * Maintains the stats table. 7 * Maintains the stats table.
8 * @param {SsrcInfoManager} ssrcInfoManager The source of the ssrc info. 8 * @param {SsrcInfoManager} ssrcInfoManager The source of the ssrc info.
9 */ 9 */
10 var StatsTable = (function(ssrcInfoManager) { 10 var StatsTable = (function(ssrcInfoManager) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 * @return {!Element} The stats table element. 76 * @return {!Element} The stats table element.
77 * @private 77 * @private
78 */ 78 */
79 ensureStatsTable_: function(peerConnectionElement, report) { 79 ensureStatsTable_: function(peerConnectionElement, report) {
80 var tableId = peerConnectionElement.id + '-table-' + report.id; 80 var tableId = peerConnectionElement.id + '-table-' + report.id;
81 var table = $(tableId); 81 var table = $(tableId);
82 if (!table) { 82 if (!table) {
83 var container = this.ensureStatsTableContainer_(peerConnectionElement); 83 var container = this.ensureStatsTableContainer_(peerConnectionElement);
84 var details = document.createElement('details'); 84 var details = document.createElement('details');
85 container.appendChild(details); 85 container.appendChild(details);
86
86 var summary = document.createElement('summary'); 87 var summary = document.createElement('summary');
87 summary.textContent = report.id; 88 summary.textContent = report.id;
88 details.appendChild(summary); 89 details.appendChild(summary);
89 90
90 table = document.createElement('table'); 91 table = document.createElement('table');
91 details.appendChild(table); 92 details.appendChild(table);
92 table.id = tableId; 93 table.id = tableId;
93 table.border = 1; 94 table.border = 1;
94 95
95 table.innerHTML = '<tr><th colspan=2></th></tr>'; 96 table.innerHTML = '<tr><th colspan=2></th></tr>';
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 updateStatsTableRow_: function(statsTable, rowName, value) { 133 updateStatsTableRow_: function(statsTable, rowName, value) {
133 var trId = statsTable.id + '-' + rowName; 134 var trId = statsTable.id + '-' + rowName;
134 var trElement = $(trId); 135 var trElement = $(trId);
135 if (!trElement) { 136 if (!trElement) {
136 trElement = document.createElement('tr'); 137 trElement = document.createElement('tr');
137 trElement.id = trId; 138 trElement.id = trId;
138 statsTable.firstChild.appendChild(trElement); 139 statsTable.firstChild.appendChild(trElement);
139 trElement.innerHTML = '<td>' + rowName + '</td><td></td>'; 140 trElement.innerHTML = '<td>' + rowName + '</td><td></td>';
140 } 141 }
141 trElement.cells[1].textContent = value; 142 trElement.cells[1].textContent = value;
143
144 // Highlights the table for the active connection.
145 if (rowName == 'googActiveConnection' && value == 'true')
146 statsTable.parentElement.classList.add('stats-table-active-connection');
142 } 147 }
143 }; 148 };
144 149
145 return StatsTable; 150 return StatsTable;
146 })(); 151 })();
OLDNEW
« no previous file with comments | « no previous file | content/browser/resources/media/tab_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698