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

Unified Diff: remoting/webapp/crd/js/session_connector_impl.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 | « remoting/webapp/crd/js/session_connector.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/session_connector_impl.js
diff --git a/remoting/webapp/crd/js/session_connector_impl.js b/remoting/webapp/crd/js/session_connector_impl.js
index 13def395a28b4a4cc4633f4fe91f07671d0d7d90..971ac40f4055d9d7cfdc6c81eceda3fed0f5e75f 100644
--- a/remoting/webapp/crd/js/session_connector_impl.js
+++ b/remoting/webapp/crd/js/session_connector_impl.js
@@ -86,7 +86,7 @@ remoting.SessionConnectorImpl = function(clientContainer, onConnected, onError,
* @private
*/
remoting.SessionConnectorImpl.prototype.resetConnection_ = function() {
- this.removePlugin_();
+ this.closeSession();
/** @private {remoting.Host} */
this.host_ = null;
@@ -323,7 +323,7 @@ remoting.SessionConnectorImpl.prototype.createSession_ = function() {
// In some circumstances, the WCS <iframe> can get reloaded, which results
// in a new clientJid and a new callback. In this case, remove the old
// client plugin before instantiating a new one.
- this.removePlugin_();
+ this.closeSession();
var pluginContainer = this.clientContainer_.querySelector(
'.client-plugin-container');
@@ -382,14 +382,11 @@ remoting.SessionConnectorImpl.prototype.onPluginInitialized_ = function(
remoting.SessionConnectorImpl.prototype.pluginError_ = function(error) {
this.signalStrategy_.setIncomingStanzaCallback(null);
this.clientSession_.disconnect(error);
- this.removePlugin_();
+ this.closeSession();
};
-/** @private */
-remoting.SessionConnectorImpl.prototype.removePlugin_ = function() {
- if (this.clientSession_) {
- this.clientSession_.removePlugin();
- }
+remoting.SessionConnectorImpl.prototype.closeSession = function() {
+ base.dispose(this.clientSession_);
this.clientSession_ = null;
remoting.clientSession = null;
« no previous file with comments | « remoting/webapp/crd/js/session_connector.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698