diff options
author | jamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-26 01:08:46 +0000 |
---|---|---|
committer | jamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-26 01:08:46 +0000 |
commit | 28973f008ca89d623ec9ce48518a04436b1c71e4 (patch) | |
tree | 107f14dd85ba81a107106aeafe92ba4e85c039c6 /remoting/webapp | |
parent | 7596aa440a08c1ec3c591549d43c7c94c89e0312 (diff) | |
download | chromium_src-28973f008ca89d623ec9ce48518a04436b1c71e4.zip chromium_src-28973f008ca89d623ec9ce48518a04436b1c71e4.tar.gz chromium_src-28973f008ca89d623ec9ce48518a04436b1c71e4.tar.bz2 |
Pass current state to callback.
BUG=92433
TEST=Manual
Review URL: http://codereview.chromium.org/8395022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107266 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/webapp')
-rw-r--r-- | remoting/webapp/me2mom/remoting.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/remoting/webapp/me2mom/remoting.js b/remoting/webapp/me2mom/remoting.js index 3690eb1..6139cd2 100644 --- a/remoting/webapp/me2mom/remoting.js +++ b/remoting/webapp/me2mom/remoting.js @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +'use strict'; + /** @suppress {duplicate} */ var remoting = remoting || {}; -'use strict'; - /** * Whether or not the plugin should scale itself. * @type {boolean} @@ -353,10 +353,13 @@ function onNatTraversalPolicyChanged_(enabled) { container.hidden = enabled; } -function onStateChanged_() { +/** + * Callback for the host plugin to notify the web app of state changes. + * @param {number} state The new state of the plugin. + */ +function onStateChanged_(state) { var plugin = /** @type {remoting.HostPlugin} */ document.getElementById(remoting.HOST_PLUGIN_ID); - var state = plugin.state; if (state == plugin.STARTING) { // Nothing to do here. remoting.debug.log('Host plugin state: STARTING'); |