summaryrefslogtreecommitdiffstats
path: root/remoting/client/appengine
diff options
context:
space:
mode:
authorsimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-20 10:25:53 +0000
committersimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-20 10:25:53 +0000
commit73a822fc4edecfd7995319f791f0fdd2fe60da60 (patch)
treeba9da5ad28528835015e5ec810110fdd6fc48ad2 /remoting/client/appengine
parent55cb9d5693f8b8e9ebac337d55c2dcab4cd27dd0 (diff)
downloadchromium_src-73a822fc4edecfd7995319f791f0fdd2fe60da60.zip
chromium_src-73a822fc4edecfd7995319f791f0fdd2fe60da60.tar.gz
chromium_src-73a822fc4edecfd7995319f791f0fdd2fe60da60.tar.bz2
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
Diffstat (limited to 'remoting/client/appengine')
-rw-r--r--remoting/client/appengine/chromoting_session.html2
-rw-r--r--remoting/client/appengine/static_files/chromoting_session.js8
-rw-r--r--remoting/client/appengine/static_files/main.css5
3 files changed, 15 insertions, 0 deletions
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.
<body class="chromoting_body" onload="init();">
<div id="status_msg_div">
<span id="status_msg" class="status_msg">Initializing...</span>
+ <input type="button" value="Scale to fit" class="scale_to_fit_toggle"
+ id="scale_to_fit_toggle" onclick="toggleScaleToFit();"/>
<input type="button" value="Show Debug Log" class="debug_log_toggle"
id="debug_log_toggle" onclick="toggleDebugLog();"/>
</div>
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;