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

Unified Diff: remoting/webapp/wcs_sandbox_container.js

Issue 17449017: Delete and recreate the client plugin if WCS is reloaded. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer feedback. Created 7 years, 6 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/session_connector.js ('k') | remoting/webapp/wcs_sandbox_content.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/wcs_sandbox_container.js
diff --git a/remoting/webapp/wcs_sandbox_container.js b/remoting/webapp/wcs_sandbox_container.js
index 68f2fbd83fbc81bb69d3dd5707f0035af0839b0b..e47421ef10f4ee6feb108ce52772bd0a5fac5e75 100644
--- a/remoting/webapp/wcs_sandbox_container.js
+++ b/remoting/webapp/wcs_sandbox_container.js
@@ -22,7 +22,7 @@ var remoting = remoting || {};
remoting.WcsSandboxContainer = function(sandbox) {
this.sandbox_ = sandbox;
/** @type {?function(string):void} */
- this.onReady_ = null;
+ this.onLocalJid_ = null;
/** @type {?function(remoting.Error):void} */
this.onError_ = null;
/** @type {?function(string):void} */
@@ -34,12 +34,14 @@ remoting.WcsSandboxContainer = function(sandbox) {
};
/**
- * @param {?function(string):void} onReady Callback invoked with the client JID
- * when the WCS code has loaded.
+ * @param {?function(string):void} onLocalJid Callback invoked with the client
+ * JID when the WCS code has loaded. Note that this may be called more than
+ * once (potentially with a different JID) if the WCS node is reloaded for
+ * any reason.
* @return {void} Nothing.
*/
-remoting.WcsSandboxContainer.prototype.setOnReady = function(onReady) {
- this.onReady_ = onReady;
+remoting.WcsSandboxContainer.prototype.setOnLocalJid = function(onLocalJid) {
+ this.onLocalJid_ = onLocalJid;
};
/**
@@ -92,15 +94,15 @@ remoting.WcsSandboxContainer.prototype.sendIq = function(stanza) {
remoting.WcsSandboxContainer.prototype.onMessage_ = function(event) {
switch (event.data['command']) {
- case 'onReady':
+ case 'onLocalJid':
/** @type {string} */
var clientJid = event.data['clientJid'];
if (clientJid === undefined) {
console.error('onReady: missing client JID');
break;
}
- if (this.onReady_) {
- this.onReady_(clientJid);
+ if (this.onLocalJid_) {
+ this.onLocalJid_(clientJid);
}
break;
« no previous file with comments | « remoting/webapp/session_connector.js ('k') | remoting/webapp/wcs_sandbox_content.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698