diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-09 21:06:38 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-09 21:06:38 +0000 |
commit | 9816a5d291165560436a4882c1ee222cc326f209 (patch) | |
tree | 37fc8130a768dc7e87f5642bc0b3eed8883cb527 /remoting/webapp | |
parent | 8dd45659fd04cf75cc4ee88f0d2289737b8daeb7 (diff) | |
download | chromium_src-9816a5d291165560436a4882c1ee222cc326f209.zip chromium_src-9816a5d291165560436a4882c1ee222cc326f209.tar.gz chromium_src-9816a5d291165560436a4882c1ee222cc326f209.tar.bz2 |
Cleanup state transitions for Host plugin.
BUG=94105
TEST=See repro steps in the bug.
Review URL: http://codereview.chromium.org/7857011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100489 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/webapp')
-rw-r--r-- | remoting/webapp/me2mom/host_plugin_proto.js | 3 | ||||
-rw-r--r-- | remoting/webapp/me2mom/remoting.js | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/remoting/webapp/me2mom/host_plugin_proto.js b/remoting/webapp/me2mom/host_plugin_proto.js index 8b3a72a..59addc6 100644 --- a/remoting/webapp/me2mom/host_plugin_proto.js +++ b/remoting/webapp/me2mom/host_plugin_proto.js @@ -27,11 +27,12 @@ remoting.HostPlugin.prototype.localize = function(callback) {}; /** @type {number} */ remoting.HostPlugin.prototype.state; +/** @type {number} */ remoting.HostPlugin.prototype.STARTING; /** @type {number} */ remoting.HostPlugin.prototype.REQUESTED_ACCESS_CODE; /** @type {number} */ remoting.HostPlugin.prototype.RECEIVED_ACCESS_CODE; /** @type {number} */ remoting.HostPlugin.prototype.CONNECTED; /** @type {number} */ remoting.HostPlugin.prototype.DISCONNECTED; -/** @type {number} */ remoting.HostPlugin.prototype.AFFIRMING_CONNECTION; +/** @type {number} */ remoting.HostPlugin.prototype.DISCONNECTING; /** @type {number} */ remoting.HostPlugin.prototype.ERROR; /** @type {number} */ remoting.HostPlugin.prototype.accessCodeLifetime; diff --git a/remoting/webapp/me2mom/remoting.js b/remoting/webapp/me2mom/remoting.js index c7bea98..dde8cc7 100644 --- a/remoting/webapp/me2mom/remoting.js +++ b/remoting/webapp/me2mom/remoting.js @@ -304,7 +304,10 @@ function onStateChanged_() { var plugin = /** @type {remoting.HostPlugin} */ document.getElementById(remoting.HOST_PLUGIN_ID); var state = plugin.state; - if (state == plugin.REQUESTED_ACCESS_CODE) { + if (state == plugin.STARTING) { + // Nothing to do here. + remoting.debug.log('Host plugin state: STARTING'); + } else if (state == plugin.REQUESTED_ACCESS_CODE) { // Nothing to do here. remoting.debug.log('Host plugin state: REQUESTED_ACCESS_CODE'); } else if (state == plugin.RECEIVED_ACCESS_CODE) { @@ -340,6 +343,8 @@ function onStateChanged_() { l10n.localizeElement(element, client); remoting.setMode(remoting.AppMode.HOST_SHARED); disableTimeoutCountdown_(); + } else if (state == plugin.DISCONNECTING) { + remoting.debug.log('Host plugin state: DISCONNECTING'); } else if (state == plugin.DISCONNECTED) { remoting.debug.log('Host plugin state: DISCONNECTED'); if (remoting.currentMode != remoting.AppMode.HOST_SHARE_FAILED) { |