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

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

Issue 2621493002: webrtc-internals: highlight failures (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | content/browser/resources/media/webrtc_internals.css » ('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 * The data of a peer connection update. 7 * The data of a peer connection update.
8 * @param {number} pid The id of the renderer. 8 * @param {number} pid The id of the renderer.
9 * @param {number} lid The id of the peer conneciton inside a renderer. 9 * @param {number} lid The id of the peer conneciton inside a renderer.
10 * @param {string} type The type of the update. 10 * @param {string} type The type of the update.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 return; 99 return;
100 } 100 }
101 101
102 row.innerHTML += '<td><details><summary>' + type + 102 row.innerHTML += '<td><details><summary>' + type +
103 '</summary></details></td>'; 103 '</summary></details></td>';
104 104
105 var valueContainer = document.createElement('pre'); 105 var valueContainer = document.createElement('pre');
106 var details = row.cells[1].childNodes[0]; 106 var details = row.cells[1].childNodes[0];
107 details.appendChild(valueContainer); 107 details.appendChild(valueContainer);
108 108
109 // Highlight ICE failures and failure callbacks.
110 if ((update.type === 'iceConnectionStateChange' &&
111 update.value === 'ICEConnectionStateFailed') ||
tommi (sloooow) - chröme 2017/01/08 16:48:05 nit: indent one more space to group with the above
fippo 2017/01/08 17:10:01 Done.
112 update.type.indexOf('OnFailure') !== -1) {
113 valueContainer.parentElement.classList.add('update-log-failure');
114 }
115
109 var value = update.value; 116 var value = update.value;
110 // map internal names and values to names and events from the 117 // map internal names and values to names and events from the
111 // specification. This is a display change which shall not 118 // specification. This is a display change which shall not
112 // change the JSON dump. 119 // change the JSON dump.
113 if (update.type === 'iceConnectionStateChange') { 120 if (update.type === 'iceConnectionStateChange') {
114 value = { 121 value = {
115 ICEConnectionStateNew: 'new', 122 ICEConnectionStateNew: 'new',
116 ICEConnectionStateChecking: 'checking', 123 ICEConnectionStateChecking: 'checking',
117 ICEConnectionStateConnected: 'connected', 124 ICEConnectionStateConnected: 'connected',
118 ICEConnectionStateCompleted: 'completed', 125 ICEConnectionStateCompleted: 'completed',
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 tableContainer.appendChild(tableElement); 169 tableContainer.appendChild(tableElement);
163 tableElement.innerHTML = '<tr><th>Time</th>' + 170 tableElement.innerHTML = '<tr><th>Time</th>' +
164 '<th class="update-log-header-event">Event</th></tr>'; 171 '<th class="update-log-header-event">Event</th></tr>';
165 } 172 }
166 return tableElement; 173 return tableElement;
167 } 174 }
168 }; 175 };
169 176
170 return PeerConnectionUpdateTable; 177 return PeerConnectionUpdateTable;
171 })(); 178 })();
OLDNEW
« no previous file with comments | « no previous file | content/browser/resources/media/webrtc_internals.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698