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

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

Issue 2832263004: Fixing some strings that go into webrtc-internals. (Closed)
Patch Set: Created 3 years, 8 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 * 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 update.type === 'addIceCandidateFailed') { 122 update.type === 'addIceCandidateFailed') {
123 valueContainer.parentElement.classList.add('update-log-failure'); 123 valueContainer.parentElement.classList.add('update-log-failure');
124 } 124 }
125 125
126 var value = update.value; 126 var value = update.value;
127 // map internal names and values to names and events from the 127 // map internal names and values to names and events from the
128 // specification. This is a display change which shall not 128 // specification. This is a display change which shall not
129 // change the JSON dump. 129 // change the JSON dump.
130 if (update.type === 'iceConnectionStateChange') { 130 if (update.type === 'iceConnectionStateChange') {
131 value = { 131 value = {
132 ICEConnectionStateNew: 'new', 132 kICEConnectionStateNew: 'new',
133 ICEConnectionStateChecking: 'checking', 133 kICEConnectionStateChecking: 'checking',
134 ICEConnectionStateConnected: 'connected', 134 kICEConnectionStateConnected: 'connected',
135 ICEConnectionStateCompleted: 'completed', 135 kICEConnectionStateCompleted: 'completed',
136 ICEConnectionStateFailed: 'failed', 136 kICEConnectionStateFailed: 'failed',
137 ICEConnectionStateDisconnected: 'disconnected', 137 kICEConnectionStateDisconnected: 'disconnected',
138 ICEConnectionStateClosed: 'closed', 138 kICEConnectionStateClosed: 'closed',
139 }[value] || value; 139 }[value] || value;
140 } else if (update.type === 'iceGatheringStateChange') { 140 } else if (update.type === 'iceGatheringStateChange') {
141 value = { 141 value = {
142 ICEGatheringStateNew: 'new', 142 kICEGatheringStateNew: 'new',
143 ICEGatheringStateGathering: 'gathering', 143 kICEGatheringStateGathering: 'gathering',
144 ICEGatheringStateComplete: 'complete', 144 kICEGatheringStateComplete: 'complete',
145 }[value] || value; 145 }[value] || value;
146 } else if (update.type === 'signalingStateChange') { 146 } else if (update.type === 'signalingStateChange') {
147 value = { 147 value = {
148 SignalingStateStable: 'stable', 148 kSignalingStateStable: 'stable',
149 SignalingStateHaveLocalOffer: 'have-local-offer', 149 kSignalingStateHaveLocalOffer: 'have-local-offer',
150 SignalingStateHaveRemoteOffer: 'have-remote-offer', 150 kSignalingStateHaveRemoteOffer: 'have-remote-offer',
151 SignalingStateHaveLocalPrAnswer: 'have-local-pranswer', 151 kSignalingStateHaveLocalPrAnswer: 'have-local-pranswer',
152 SignalingStateHaveRemotePrAnswer: 'have-remote-pranswer', 152 kSignalingStateHaveRemotePrAnswer: 'have-remote-pranswer',
153 SignalingStateClosed: 'closed', 153 kSignalingStateClosed: 'closed',
154 }[value] || value; 154 }[value] || value;
155 } 155 }
156 156
157 valueContainer.textContent = value; 157 valueContainer.textContent = value;
158 }, 158 },
159 159
160 /** 160 /**
161 * Makes sure the update log table of the peer connection is created. 161 * Makes sure the update log table of the peer connection is created.
162 * 162 *
163 * @param {!Element} peerConnectionElement The root element. 163 * @param {!Element} peerConnectionElement The root element.
(...skipping 15 matching lines...) Expand all
179 tableContainer.appendChild(tableElement); 179 tableContainer.appendChild(tableElement);
180 tableElement.innerHTML = '<tr><th>Time</th>' + 180 tableElement.innerHTML = '<tr><th>Time</th>' +
181 '<th class="update-log-header-event">Event</th></tr>'; 181 '<th class="update-log-header-event">Event</th></tr>';
182 } 182 }
183 return tableElement; 183 return tableElement;
184 } 184 }
185 }; 185 };
186 186
187 return PeerConnectionUpdateTable; 187 return PeerConnectionUpdateTable;
188 })(); 188 })();
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/peer_connection_tracker.cc » ('j') | content/renderer/media/peer_connection_tracker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698