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

Unified Diff: remoting/webapp/me2mom/client_session.js

Issue 7511001: Don't transition to in-session mode until the connection has been established. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 5 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/me2mom/choice.html ('k') | remoting/webapp/me2mom/remoting.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/me2mom/client_session.js
diff --git a/remoting/webapp/me2mom/client_session.js b/remoting/webapp/me2mom/client_session.js
index 50127dd75939613279a518031abe07e29787d73e..6a38e26a441930c445896e28def4c7ba49a4731c 100644
--- a/remoting/webapp/me2mom/client_session.js
+++ b/remoting/webapp/me2mom/client_session.js
@@ -23,7 +23,9 @@ var remoting = remoting || {};
* @param {string} accessCode The access code for the IT2Me connection.
* @param {string} email The username for the talk network.
* @param {function(remoting.ClientSession.State):void} onStateChange
- * The callback to invoke when the session changes state.
+ * The callback to invoke when the session changes state. This callback
+ * occurs after the state changes and is passed the previous state; the
+ * new state is accessible via ClientSession's |state| property.
* @constructor
*/
remoting.ClientSession = function(hostJid, hostPublicKey, accessCode, email,
@@ -111,6 +113,8 @@ remoting.ClientSession.prototype.createPluginAndConnect =
this.plugin.id = this.PLUGIN_ID;
this.plugin.src = 'about://none';
this.plugin.type = 'pepper-application/x-chromoting';
+ this.plugin.width = 0;
+ this.plugin.height = 0;
container.appendChild(this.plugin);
if (!this.isPluginVersionSupported_(this.plugin)) {
@@ -320,9 +324,10 @@ remoting.ClientSession.prototype.connectionInfoUpdateCallback = function() {
* @return {void} Nothing.
*/
remoting.ClientSession.prototype.setState_ = function(state) {
+ var oldState = state;
this.state = state;
if (this.onStateChange) {
- this.onStateChange(this.state);
+ this.onStateChange(oldState);
}
};
« no previous file with comments | « remoting/webapp/me2mom/choice.html ('k') | remoting/webapp/me2mom/remoting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698