diff options
author | jamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-07 20:33:20 +0000 |
---|---|---|
committer | jamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-07 20:33:20 +0000 |
commit | 42925f78468ecac53836707a024ed096767e3b1e (patch) | |
tree | 87bef61191b6877d292e3cc3ed961e717852ef78 /remoting | |
parent | 3ca59bc8d5e24d2e73831331395fe96be36730f7 (diff) | |
download | chromium_src-42925f78468ecac53836707a024ed096767e3b1e.zip chromium_src-42925f78468ecac53836707a024ed096767e3b1e.tar.gz chromium_src-42925f78468ecac53836707a024ed096767e3b1e.tar.bz2 |
Improve host state logging and show a message on error.
BUG=None
TEST=Manual
Review URL: http://codereview.chromium.org/7841039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100008 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/webapp/me2mom/remoting.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/remoting/webapp/me2mom/remoting.js b/remoting/webapp/me2mom/remoting.js index 3d71b77..c7bea98 100644 --- a/remoting/webapp/me2mom/remoting.js +++ b/remoting/webapp/me2mom/remoting.js @@ -306,7 +306,9 @@ function onStateChanged_() { var state = plugin.state; 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) { + remoting.debug.log('Host plugin state: RECEIVED_ACCESS_CODE'); var accessCode = plugin.accessCode; var accessCodeDisplay = document.getElementById('access-code-display'); accessCodeDisplay.innerText = ''; @@ -332,12 +334,14 @@ function onStateChanged_() { remoting.cancelShare(); } } else if (state == plugin.CONNECTED) { + remoting.debug.log('Host plugin state: CONNECTED'); var element = document.getElementById('host-shared-message'); var client = plugin.client; l10n.localizeElement(element, client); remoting.setMode(remoting.AppMode.HOST_SHARED); disableTimeoutCountdown_(); } else if (state == plugin.DISCONNECTED) { + remoting.debug.log('Host plugin state: DISCONNECTED'); if (remoting.currentMode != remoting.AppMode.HOST_SHARE_FAILED) { // If an error is being displayed, then the plugin should not be able to // hide it by setting the state. Errors must be dismissed by the user @@ -346,7 +350,8 @@ function onStateChanged_() { } plugin.parentNode.removeChild(plugin); } else if (state == plugin.ERROR) { - remoting.setMode(remoting.AppMode.HOST_SHARE_FAILED); + remoting.debug.log('Host plugin state: ERROR'); + showShareError_(/*i18n-content*/'ERROR_GENERIC'); } else { remoting.debug.log('Unknown state -> ' + state); } |