Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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; |
| OLD | NEW |