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

Side by Side Diff: remoting/webapp/base/js/connection_stats.js

Issue 1143453007: remoting.WindowShape clean up. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's feedback Created 5 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * @fileoverview 6 * @fileoverview
7 * Module to support debug overlay window with connection stats. 7 * Module to support debug overlay window with connection stats.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 19 matching lines...) Expand all
30 /** @private */ 30 /** @private */
31 this.plugin_ = plugin; 31 this.plugin_ = plugin;
32 32
33 var that = this; 33 var that = this;
34 34
35 /** @private */ 35 /** @private */
36 this.timer_ = new base.RepeatingTimer(function(){ 36 this.timer_ = new base.RepeatingTimer(function(){
37 that.update(plugin.getPerfStats()); 37 that.update(plugin.getPerfStats());
38 }, 1000, true); 38 }, 1000, true);
39 39
40 remoting.windowShape.addCallback(this); 40 remoting.windowShape.registerClientUI(this);
41 }; 41 };
42 42
43 remoting.ConnectionStats.prototype.dispose = function() { 43 remoting.ConnectionStats.prototype.dispose = function() {
44 base.dispose(this.timer_); 44 base.dispose(this.timer_);
45 this.timer_ = null; 45 this.timer_ = null;
46 this.plugin_ = null; 46 this.plugin_ = null;
47 remoting.windowShape.unregisterClientUI(this);
47 }; 48 };
48 49
49 /** 50 /**
50 * @return {remoting.ClientSession.PerfStats} The most recently-set PerfStats, 51 * @return {remoting.ClientSession.PerfStats} The most recently-set PerfStats,
51 * or null if update() has not yet been called. 52 * or null if update() has not yet been called.
52 */ 53 */
53 remoting.ConnectionStats.prototype.mostRecent = function() { 54 remoting.ConnectionStats.prototype.mostRecent = function() {
54 return this.mostRecent_; 55 return this.mostRecent_;
55 }; 56 };
56 57
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 var statistics = document.getElementById('statistics'); 129 var statistics = document.getElementById('statistics');
129 this.statsElement_.innerText = ( 130 this.statsElement_.innerText = (
130 'Bandwidth: ' + formatStatNumber(videoBandwidth, units) + 131 'Bandwidth: ' + formatStatNumber(videoBandwidth, units) +
131 ', Frame Rate: ' + formatStatNumber(stats.videoFrameRate, 'fps') + 132 ', Frame Rate: ' + formatStatNumber(stats.videoFrameRate, 'fps') +
132 ', Capture: ' + formatStatNumber(stats.captureLatency, 'ms') + 133 ', Capture: ' + formatStatNumber(stats.captureLatency, 'ms') +
133 ', Encode: ' + formatStatNumber(stats.encodeLatency, 'ms') + 134 ', Encode: ' + formatStatNumber(stats.encodeLatency, 'ms') +
134 ', Decode: ' + formatStatNumber(stats.decodeLatency, 'ms') + 135 ', Decode: ' + formatStatNumber(stats.decodeLatency, 'ms') +
135 ', Render: ' + formatStatNumber(stats.renderLatency, 'ms') + 136 ', Render: ' + formatStatNumber(stats.renderLatency, 'ms') +
136 ', Latency: ' + formatStatNumber(stats.roundtripLatency, 'ms')); 137 ', Latency: ' + formatStatNumber(stats.roundtripLatency, 'ms'));
137 }; 138 };
OLDNEW
« no previous file with comments | « remoting/webapp/app_remoting/js/idle_detector.js ('k') | remoting/webapp/base/js/window_shape.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698