| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }()); |
| OLD | NEW |