OLD | NEW |
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'; |
11 | 11 |
12 /** @suppress {duplicate} */ | 12 /** @suppress {duplicate} */ |
13 var remoting = remoting || {}; | 13 var remoting = remoting || {}; |
14 | 14 |
15 /** | 15 /** |
16 * @constructor | 16 * @constructor |
17 * @implements {remoting.WindowShape.ClientUI} | 17 * @implements {remoting.WindowShape.ClientUI} |
18 * @param {Element} statsElement The HTML div to which to update stats. | 18 * @param {Element} statsElement The HTML div to which to update stats. |
19 */ | 19 */ |
20 remoting.ConnectionStats = function(statsElement) { | 20 remoting.ConnectionStats = function(statsElement) { |
21 /** | 21 /** @private */ |
22 * @private | |
23 */ | |
24 this.statsElement_ = statsElement; | 22 this.statsElement_ = statsElement; |
25 | 23 |
26 /** | 24 /** @private {remoting.ClientSession.PerfStats} */ |
27 * @type {remoting.ClientSession.PerfStats} | |
28 * @private | |
29 */ | |
30 this.mostRecent_ = null | 25 this.mostRecent_ = null |
31 | 26 |
32 remoting.windowShape.addCallback(this); | 27 remoting.windowShape.addCallback(this); |
33 }; | 28 }; |
34 | 29 |
35 /** | 30 /** |
36 * @return {remoting.ClientSession.PerfStats} The most recently-set PerfStats, | 31 * @return {remoting.ClientSession.PerfStats} The most recently-set PerfStats, |
37 * or null if update() has not yet been called. | 32 * or null if update() has not yet been called. |
38 */ | 33 */ |
39 remoting.ConnectionStats.prototype.mostRecent = function() { | 34 remoting.ConnectionStats.prototype.mostRecent = function() { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 if (element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') { | 121 if (element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') { |
127 return; | 122 return; |
128 } | 123 } |
129 if (String.fromCharCode(event.which) == 'D') { | 124 if (String.fromCharCode(event.which) == 'D') { |
130 remoting.stats.toggle(); | 125 remoting.stats.toggle(); |
131 } | 126 } |
132 }; | 127 }; |
133 | 128 |
134 /** @type {remoting.ConnectionStats} */ | 129 /** @type {remoting.ConnectionStats} */ |
135 remoting.stats = null; | 130 remoting.stats = null; |
OLD | NEW |