Index: remoting/webapp/crd/js/desktop_connected_view.js |
diff --git a/remoting/webapp/crd/js/desktop_connected_view.js b/remoting/webapp/crd/js/desktop_connected_view.js |
index 2b511cc06bc271b0679d71f1bcfb2589a535bf19..9c794d52bbc7395cf6b749b28e17bfd3d97776b3 100644 |
--- a/remoting/webapp/crd/js/desktop_connected_view.js |
+++ b/remoting/webapp/crd/js/desktop_connected_view.js |
@@ -45,6 +45,10 @@ remoting.DesktopConnectedView = function(container, connectionInfo) { |
/** private {base.Disposable} */ |
this.eventHooks_ = null; |
+ /** @private */ |
+ this.stats_ = new remoting.ConnectionStats( |
+ document.getElementById('statistics'), connectionInfo.plugin()); |
+ |
this.initPlugin_(); |
this.initUI_(); |
}; |
@@ -68,6 +72,9 @@ remoting.DesktopConnectedView.prototype.dispose = function() { |
base.dispose(this.viewport_); |
this.viewport_ = null; |
+ |
+ base.dispose(this.stats_); |
+ this.stats = null; |
}; |
/** |
@@ -99,6 +106,17 @@ remoting.DesktopConnectedView.prototype.getResizeToClient = function() { |
return false; |
}; |
+remoting.DesktopConnectedView.prototype.toggleStats = function() { |
+ this.stats_.toggle(); |
+}; |
+ |
+/** |
+ * @return {boolean} True if the connection stats is visible; false otherwise. |
+ */ |
+remoting.DesktopConnectedView.prototype.isStatsVisible = function() { |
+ return this.stats_.isVisible(); |
+}; |
+ |
/** |
* @return {Element} The element that should host the plugin. |
* @private |