From 73a822fc4edecfd7995319f791f0fdd2fe60da60 Mon Sep 17 00:00:00 2001 From: "simonmorris@chromium.org" Date: Wed, 20 Apr 2011 10:25:53 +0000 Subject: If the user selects scale-to-fit, then PepperView starts maintaining and displaying a scaled copy of its pixel backing store. BUG=none TEST=none Review URL: http://codereview.chromium.org/6811043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82279 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/client/appengine/chromoting_session.html | 2 ++ remoting/client/appengine/static_files/chromoting_session.js | 8 ++++++++ remoting/client/appengine/static_files/main.css | 5 +++++ 3 files changed, 15 insertions(+) (limited to 'remoting/client/appengine') diff --git a/remoting/client/appengine/chromoting_session.html b/remoting/client/appengine/chromoting_session.html index eba943d..8af2190 100644 --- a/remoting/client/appengine/chromoting_session.html +++ b/remoting/client/appengine/chromoting_session.html @@ -29,6 +29,8 @@ found in the LICENSE file.
Initializing... +
diff --git a/remoting/client/appengine/static_files/chromoting_session.js b/remoting/client/appengine/static_files/chromoting_session.js index cb7813b..50c9079 100644 --- a/remoting/client/appengine/static_files/chromoting_session.js +++ b/remoting/client/appengine/static_files/chromoting_session.js @@ -10,6 +10,7 @@ var MAX_DEBUG_LOG_SIZE = 1000; // old messages. This starts at 1 and is incremented for each new message. chromoting.messageId = 1; +chromoting.scaleToFit = false; // Default to trying to sandboxed connections. chromoting.connectMethod = 'sandboxed'; @@ -145,6 +146,13 @@ function toggleDebugLog() { } } +function toggleScaleToFit() { + chromoting.scaleToFit = !chromoting.scaleToFit; + document.getElementById("scale_to_fit_toggle").value = + chromoting.scaleToFit ? "No scaling" : "Scale to fit"; + chromoting.plugin.setScaleToFit(chromoting.scaleToFit); +} + function submitLogin() { var username = document.getElementById("username").value; var password = document.getElementById("password").value; diff --git a/remoting/client/appengine/static_files/main.css b/remoting/client/appengine/static_files/main.css index 7fb6ed1..38a9e9a 100644 --- a/remoting/client/appengine/static_files/main.css +++ b/remoting/client/appengine/static_files/main.css @@ -148,6 +148,11 @@ a.hostentry { float: right; } +.scale_to_fit_toggle { + line-height: 0.8em; + float: right; + } + .gaia_login_panel { -webkit-user-select: none; font-family: arial,sans-serif; -- cgit v1.1