| OLD | NEW |
| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 * | 74 * |
| 75 * @param {!Element} peerConnectionElement The root element. | 75 * @param {!Element} peerConnectionElement The root element. |
| 76 * @param {!PeerConnectionUpdateEntry} update The update to add. | 76 * @param {!PeerConnectionUpdateEntry} update The update to add. |
| 77 */ | 77 */ |
| 78 addPeerConnectionUpdate: function(peerConnectionElement, update) { | 78 addPeerConnectionUpdate: function(peerConnectionElement, update) { |
| 79 var tableElement = this.ensureUpdateContainer_(peerConnectionElement); | 79 var tableElement = this.ensureUpdateContainer_(peerConnectionElement); |
| 80 | 80 |
| 81 var row = document.createElement('tr'); | 81 var row = document.createElement('tr'); |
| 82 tableElement.firstChild.appendChild(row); | 82 tableElement.firstChild.appendChild(row); |
| 83 | 83 |
| 84 var time = new Date(parseInt(update.time)); | 84 var time = new Date(parseFloat(update.time)); |
| 85 row.innerHTML = '<td>' + time.toLocaleString() + '</td>'; | 85 row.innerHTML = '<td>' + time.toLocaleString() + '</td>'; |
| 86 | 86 |
| 87 if (update.value.length == 0) { | 87 if (update.value.length == 0) { |
| 88 row.innerHTML += '<td>' + update.type + '</td>'; | 88 row.innerHTML += '<td>' + update.type + '</td>'; |
| 89 return; | 89 return; |
| 90 } | 90 } |
| 91 | 91 |
| 92 row.innerHTML += '<td><details><summary>' + update.type + | 92 row.innerHTML += '<td><details><summary>' + update.type + |
| 93 '</summary></details></td>'; | 93 '</summary></details></td>'; |
| 94 | 94 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 120 tableContainer.appendChild(tableElement); | 120 tableContainer.appendChild(tableElement); |
| 121 tableElement.innerHTML = '<tr><th>Time</th>' + | 121 tableElement.innerHTML = '<tr><th>Time</th>' + |
| 122 '<th class="update-log-header-event">Event</th></tr>'; | 122 '<th class="update-log-header-event">Event</th></tr>'; |
| 123 } | 123 } |
| 124 return tableElement; | 124 return tableElement; |
| 125 } | 125 } |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 return PeerConnectionUpdateTable; | 128 return PeerConnectionUpdateTable; |
| 129 })(); | 129 })(); |
| OLD | NEW |