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

Side by Side Diff: remoting/webapp/me2mom/remoting_session.js

Issue 7078022: Fix up remoting UI to make it closer to spec (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: turned on strict Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Maximum numer of lines to record in the debug log. 5 // Maximum numer of lines to record in the debug log.
6 // Only the most recent <n> lines are displayed. 6 // Only the most recent <n> lines are displayed.
7 var MAX_DEBUG_LOG_SIZE = 1000; 7 var MAX_DEBUG_LOG_SIZE = 1000;
8 8
9 var remoting = chrome.extension.getBackgroundPage().remoting; 9 var remoting = chrome.extension.getBackgroundPage().remoting;
10 10
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 var videoBandwidth = remoting.plugin.videoBandwidth; 328 var videoBandwidth = remoting.plugin.videoBandwidth;
329 var videoCaptureLatency = remoting.plugin.videoCaptureLatency; 329 var videoCaptureLatency = remoting.plugin.videoCaptureLatency;
330 var videoEncodeLatency = remoting.plugin.videoEncodeLatency; 330 var videoEncodeLatency = remoting.plugin.videoEncodeLatency;
331 var videoDecodeLatency = remoting.plugin.videoDecodeLatency; 331 var videoDecodeLatency = remoting.plugin.videoDecodeLatency;
332 var videoRenderLatency = remoting.plugin.videoRenderLatency; 332 var videoRenderLatency = remoting.plugin.videoRenderLatency;
333 333
334 var units = ''; 334 var units = '';
335 if (videoBandwidth < 1024) { 335 if (videoBandwidth < 1024) {
336 units = 'Bps'; 336 units = 'Bps';
337 } else if (videoBandwidth < 1048576) { 337 } else if (videoBandwidth < 1048576) {
338 units = 'KBps'; 338 units = 'KiBps';
339 videoBandwidth = videoBandwidth / 1024; 339 videoBandwidth = videoBandwidth / 1024;
340 } else if (videoBandwidth < 1073741824) { 340 } else if (videoBandwidth < 1073741824) {
341 units = 'MBps'; 341 units = 'MiBps';
342 videoBandwidth = videoBandwidth / 1048576; 342 videoBandwidth = videoBandwidth / 1048576;
343 } else { 343 } else {
344 units = 'GBps'; 344 units = 'GiBps';
345 videoBandwidth = videoBandwidth / 1073741824; 345 videoBandwidth = videoBandwidth / 1073741824;
346 } 346 }
347 347
348 setClientStateMessage( 348 setClientStateMessage(
349 'Video stats: bandwidth: ' + videoBandwidth.toFixed(2) + units + 349 'Bandwidth: ' + videoBandwidth.toFixed(2) + units +
350 ', Latency: capture: ' + videoCaptureLatency.toFixed(2) + 'ms' + 350 ', Capture: ' + videoCaptureLatency.toFixed(2) + 'ms' +
351 ', encode: ' + videoEncodeLatency.toFixed(2) + 'ms' + 351 ', Encode: ' + videoEncodeLatency.toFixed(2) + 'ms' +
352 ', decode: ' + videoDecodeLatency.toFixed(2) + 'ms' + 352 ', Decode: ' + videoDecodeLatency.toFixed(2) + 'ms' +
353 ', render: ' + videoRenderLatency.toFixed(2) + 'ms'); 353 ', Render: ' + videoRenderLatency.toFixed(2) + 'ms');
354 354
355 // Update the stats once per second. 355 // Update the stats once per second.
356 window.setTimeout('updateStatusBarStats()', 1000); 356 window.setTimeout('updateStatusBarStats()', 1000);
357 } 357 }
OLDNEW
« remoting/webapp/me2mom/remoting_session.html ('K') | « remoting/webapp/me2mom/remoting_session.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698