Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Side by Side Diff: remoting/webapp/me2mom/client_session.js

Issue 7718008: Use a split toggle button to reflect scaling state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed i18n-content tag. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/webapp/me2mom/choice.html ('k') | remoting/webapp/me2mom/remoting.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Session class that handles creation and teardown of a remoting session. 7 * Session class that handles creation and teardown of a remoting session.
8 * 8 *
9 * This abstracts a <embed> element and controls the plugin which does the 9 * This abstracts a <embed> element and controls the plugin which does the
10 * actual remoting work. There should be no UI code inside this class. It 10 * actual remoting work. There should be no UI code inside this class. It
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 this.plugin.width = width; 358 this.plugin.width = width;
359 this.plugin.height = height; 359 this.plugin.height = height;
360 }; 360 };
361 361
362 /** 362 /**
363 * Informs the plugin that it should scale itself. 363 * Informs the plugin that it should scale itself.
364 * 364 *
365 * @param {boolean} shouldScale If the plugin should scale itself. 365 * @param {boolean} shouldScale If the plugin should scale itself.
366 * @return {void} Nothing. 366 * @return {void} Nothing.
367 */ 367 */
368 remoting.ClientSession.prototype.toggleScaleToFit = function(shouldScale) { 368 remoting.ClientSession.prototype.setScaleToFit = function(shouldScale) {
369 if (shouldScale) { 369 if (shouldScale) {
370 if (this.plugin.desktopWidth == 0 || 370 if (this.plugin.desktopWidth == 0 ||
371 this.plugin.desktopHeight == 0) { 371 this.plugin.desktopHeight == 0) {
372 remoting.debug.log('desktop size is not known yet.'); 372 remoting.debug.log('desktop size is not known yet.');
373 return; 373 return;
374 } 374 }
375 375
376 // Make sure both width and height are multiples of two. 376 // Make sure both width and height are multiples of two.
377 var width = window.innerWidth; 377 var width = window.innerWidth;
378 var height = window.innerHeight; 378 var height = window.innerHeight;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 'video_bandwidth': this.plugin.videoBandwidth, 418 'video_bandwidth': this.plugin.videoBandwidth,
419 'capture_latency': this.plugin.videoCaptureLatency, 419 'capture_latency': this.plugin.videoCaptureLatency,
420 'encode_latency': this.plugin.videoEncodeLatency, 420 'encode_latency': this.plugin.videoEncodeLatency,
421 'decode_latency': this.plugin.videoDecodeLatency, 421 'decode_latency': this.plugin.videoDecodeLatency,
422 'render_latency': this.plugin.videoRenderLatency, 422 'render_latency': this.plugin.videoRenderLatency,
423 'roundtrip_latency': this.plugin.roundTripLatency 423 'roundtrip_latency': this.plugin.roundTripLatency
424 }; 424 };
425 }; 425 };
426 426
427 }()); 427 }());
OLDNEW
« no previous file with comments | « remoting/webapp/me2mom/choice.html ('k') | remoting/webapp/me2mom/remoting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698