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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 * Interface abstracting the Application functionality. 7 * Interface abstracting the Application functionality.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 default: 212 default:
213 console.error('Unexpected client plugin state: ' + state.current); 213 console.error('Unexpected client plugin state: ' + state.current);
214 // This should only happen if the web-app and client plugin get out of 214 // This should only happen if the web-app and client plugin get out of
215 // sync, so MISSING_PLUGIN is a suitable error. 215 // sync, so MISSING_PLUGIN is a suitable error.
216 this.onError(new remoting.Error(remoting.Error.Tag.MISSING_PLUGIN)); 216 this.onError(new remoting.Error(remoting.Error.Tag.MISSING_PLUGIN));
217 break; 217 break;
218 } 218 }
219 219
220 base.dispose(this.sessionConnectedHooks_); 220 base.dispose(this.sessionConnectedHooks_);
221 this.sessionConnectedHooks_= null; 221 this.sessionConnectedHooks_= null;
222 remoting.clientSession.dispose(); 222 this.sessionConnector_.removePlugin();
garykac 2015/03/18 20:13:14 This doesn't just remove the plugin - it frees the
kelvinp 2015/03/18 20:43:36 Done.
223 remoting.clientSession = null;
224 }; 223 };
225 224
226 /** @private */ 225 /** @private */
227 remoting.Application.prototype.updateStatistics_ = function() { 226 remoting.Application.prototype.updateStatistics_ = function() {
228 var perfstats = remoting.clientSession.getPerfStats(); 227 var perfstats = remoting.clientSession.getPerfStats();
229 remoting.stats.update(perfstats); 228 remoting.stats.update(perfstats);
230 remoting.clientSession.logStatistics(perfstats); 229 remoting.clientSession.logStatistics(perfstats);
231 }; 230 };
232 231
233 232
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 * Perform any application-specific cleanup before exiting. This is called in 318 * Perform any application-specific cleanup before exiting. This is called in
320 * lieu of start() if the user declines the app permissions, and will usually 319 * lieu of start() if the user declines the app permissions, and will usually
321 * be called immediately prior to exiting, although delegates should not rely 320 * be called immediately prior to exiting, although delegates should not rely
322 * on this. 321 * on this.
323 */ 322 */
324 remoting.Application.Delegate.prototype.handleExit = function() {}; 323 remoting.Application.Delegate.prototype.handleExit = function() {};
325 324
326 325
327 /** @type {remoting.Application} */ 326 /** @type {remoting.Application} */
328 remoting.app = null; 327 remoting.app = null;
OLDNEW
« no previous file with comments | « no previous file | remoting/webapp/crd/js/client_session.js » ('j') | remoting/webapp/crd/js/client_session.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698