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

Unified Diff: remoting/webapp/crd/js/desktop_connected_view.js

Issue 1089493002: [Webapp Refactor] Re-add remoting.ConnectionStats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's feedback Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/crd/js/connection_stats.js ('k') | remoting/webapp/crd/js/options_menu.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « remoting/webapp/crd/js/connection_stats.js ('k') | remoting/webapp/crd/js/options_menu.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698