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

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

Issue 1082383002: [Webapp Refactor] Remove remoting.clientSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix browser tests 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/session_connector_impl.js ('k') | remoting/webapp/crd/js/toolbar.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/smart_reconnector.js
diff --git a/remoting/webapp/crd/js/smart_reconnector.js b/remoting/webapp/crd/js/smart_reconnector.js
index d7e331b666d56f212ed6097fdbf26436f8de68dc..15973323fda52c8e206f903adcc4526ff078508a 100644
--- a/remoting/webapp/crd/js/smart_reconnector.js
+++ b/remoting/webapp/crd/js/smart_reconnector.js
@@ -20,16 +20,21 @@ var remoting = remoting || {};
/**
* @constructor
* @param {function()} reconnectCallback
+ * @param {function()} disconnectCallback
* @param {remoting.ClientSession} clientSession This represents the current
* remote desktop connection. It is used to monitor the changes in
* connection state.
* @implements {base.Disposable}
*/
-remoting.SmartReconnector = function(reconnectCallback, clientSession) {
+remoting.SmartReconnector =
+ function(reconnectCallback, disconnectCallback, clientSession) {
/** @private */
this.reconnectCallback_ = reconnectCallback;
/** @private */
+ this.disconnectCallback_ = disconnectCallback;
+
+ /** @private */
this.clientSession_ = clientSession;
/** @private */
@@ -67,7 +72,7 @@ remoting.SmartReconnector.kConnectionTimeout = 10000;
remoting.SmartReconnector.prototype = {
reconnect_: function() {
this.cancelPending_();
- remoting.app.disconnect();
+ this.disconnectCallback_();
remoting.setMode(remoting.AppMode.CLIENT_CONNECTING);
this.reconnectCallback_();
},
« no previous file with comments | « remoting/webapp/crd/js/session_connector_impl.js ('k') | remoting/webapp/crd/js/toolbar.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698