summaryrefslogtreecommitdiffstats
path: root/remoting/webapp/client_session.js
diff options
context:
space:
mode:
authorsimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 20:59:33 +0000
committersimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 20:59:33 +0000
commitc34059c966837512f6a9242de6a738a14f0bb184 (patch)
treec6402c886a33c86522ad7bd0fbe9e221be8b77d2 /remoting/webapp/client_session.js
parentd2aa06b4b5f2be4a76a895e3c6e4e041218af42a (diff)
downloadchromium_src-c34059c966837512f6a9242de6a738a14f0bb184.zip
chromium_src-c34059c966837512f6a9242de6a738a14f0bb184.tar.gz
chromium_src-c34059c966837512f6a9242de6a738a14f0bb184.tar.bz2
[Chromoting] Move the code that styles the scale-to-fit button
from client_screen.js to client_session.js. BUG=116633 Review URL: https://chromiumcodereview.appspot.com/9816017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128056 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/webapp/client_session.js')
-rw-r--r--remoting/webapp/client_session.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/remoting/webapp/client_session.js b/remoting/webapp/client_session.js
index 9de1d48..1c6dc0a 100644
--- a/remoting/webapp/client_session.js
+++ b/remoting/webapp/client_session.js
@@ -9,7 +9,7 @@
* The ClientSession class controls lifetime of the client plugin
* object and provides the plugin with the functionality it needs to
* establish connection. Specifically it:
- * - Delivers incoming/otgoing signaling messages,
+ * - Delivers incoming/outgoing signaling messages,
* - Adjusts plugin size and position when destop resolution changes,
*
* This class should not access the plugin directly, instead it should
@@ -226,8 +226,9 @@ remoting.ClientSession.prototype.onPluginInitialized_ =
return;
}
- // Enable scale-to-fit if the plugin is new enough for high-quality scaling.
- remoting.setScaleToFit(this.plugin.isHiQualityScalingSupported());
+ // Enable scale-to-fit if and only if the plugin is new enough for
+ // high-quality scaling.
+ this.setScaleToFit(this.plugin.isHiQualityScalingSupported());
/** @type {remoting.ClientSession} */ var that = this;
/** @param {string} msg The IQ stanza to send. */
@@ -307,6 +308,12 @@ remoting.ClientSession.prototype.disconnect = function() {
remoting.ClientSession.prototype.setScaleToFit = function(scaleToFit) {
this.scaleToFit = scaleToFit;
this.updateDimensions();
+ var button = document.getElementById('toggle-scaling');
+ if (scaleToFit) {
+ button.classList.add('toggle-button-active');
+ } else {
+ button.classList.remove('toggle-button-active');
+ }
}
/**