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

Unified Diff: remoting/webapp/base/js/application.js

Issue 1012073006: [Webapp Refactor] Removes the client plugin on disconnect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's feedback Created 5 years, 9 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 | « no previous file | remoting/webapp/crd/js/client_session.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/base/js/application.js
diff --git a/remoting/webapp/base/js/application.js b/remoting/webapp/base/js/application.js
index 82b64534c4a50a56a79271531acecc8fbb2c3b4e..3141ec92bb6e94ee1a31bd9d24f4adc26171d9d7 100644
--- a/remoting/webapp/base/js/application.js
+++ b/remoting/webapp/base/js/application.js
@@ -121,7 +121,7 @@ remoting.Application.prototype.disconnect = function() {
remoting.Application.prototype.onConnected = function(connectionInfo) {
this.sessionConnectedHooks_ = new base.Disposables(
new base.EventHook(connectionInfo.session(), 'stateChanged',
- this.onClientStateChange_.bind(this)),
+ this.onSessionFinished_.bind(this)),
new base.RepeatingTimer(this.updateStatistics_.bind(this), 1000)
);
remoting.clipboard.startSession();
@@ -193,7 +193,7 @@ remoting.Application.prototype.getSessionConnector = function() {
* @param {remoting.ClientSession.StateEvent=} state
* @private
*/
-remoting.Application.prototype.onClientStateChange_ = function(state) {
+remoting.Application.prototype.onSessionFinished_ = function(state) {
switch (state.current) {
case remoting.ClientSession.State.CLOSED:
console.log('Connection closed by host');
@@ -219,8 +219,7 @@ remoting.Application.prototype.onClientStateChange_ = function(state) {
base.dispose(this.sessionConnectedHooks_);
this.sessionConnectedHooks_= null;
- remoting.clientSession.dispose();
- remoting.clientSession = null;
+ this.sessionConnector_.closeSession();
};
/** @private */
« no previous file with comments | « no previous file | remoting/webapp/crd/js/client_session.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698