Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 * Provides view port management utilities below for a desktop remoting session. | 7 * Provides view port management utilities below for a desktop remoting session. |
| 8 * - Enabling bump scrolling | 8 * - Enabling bump scrolling |
| 9 * - Resizing the viewport to fit the host desktop | 9 * - Resizing the viewport to fit the host desktop |
| 10 * - Resizing the host desktop to fit the client viewport. | 10 * - Resizing the host desktop to fit the client viewport. |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 334 remoting.fullscreen.isActive(), this.hostOptions_.shrinkToFit); | 334 remoting.fullscreen.isActive(), this.hostOptions_.shrinkToFit); |
| 335 | 335 |
| 336 // Resize the plugin if necessary. | 336 // Resize the plugin if necessary. |
| 337 console.log('plugin dimensions:' + newSize.width + 'x' + newSize.height); | 337 console.log('plugin dimensions:' + newSize.width + 'x' + newSize.height); |
| 338 this.pluginElement_.style.width = newSize.width + 'px'; | 338 this.pluginElement_.style.width = newSize.width + 'px'; |
| 339 this.pluginElement_.style.height = newSize.height + 'px'; | 339 this.pluginElement_.style.height = newSize.height + 'px'; |
| 340 | 340 |
| 341 // When we receive the first plugin dimensions from the host, we know that | 341 // When we receive the first plugin dimensions from the host, we know that |
| 342 // remote host has started. | 342 // remote host has started. |
| 343 remoting.app.onVideoStreamingStarted(); | 343 remoting.app.onVideoStreamingStarted(); |
| 344 | |
| 345 remoting.clientSession.logToServer.logTotalTimeForInitialConnection(); | |
|
Jamie
2015/02/25 21:12:35
I would prefer that we don't introduce a dependenc
anandc
2015/02/26 20:21:49
The user perceives a connection has been completed
| |
| 346 | |
| 344 }; | 347 }; |
| 345 | 348 |
| 346 /** | 349 /** |
| 347 * Helper function accepting client and host dimensions, and returning a chosen | 350 * Helper function accepting client and host dimensions, and returning a chosen |
| 348 * size for the plugin element, in DIPs. | 351 * size for the plugin element, in DIPs. |
| 349 * | 352 * |
| 350 * @param {{width: number, height: number}} clientSizeDips Available client | 353 * @param {{width: number, height: number}} clientSizeDips Available client |
| 351 * dimensions, in DIPs. | 354 * dimensions, in DIPs. |
| 352 * @param {number} clientPixelRatio Number of physical pixels per client DIP. | 355 * @param {number} clientPixelRatio Number of physical pixels per client DIP. |
| 353 * @param {{width: number, height: number}} desktopSize Size of the host desktop | 356 * @param {{width: number, height: number}} desktopSize Size of the host desktop |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 476 return { width: pluginWidth, height: pluginHeight }; | 479 return { width: pluginWidth, height: pluginHeight }; |
| 477 }; | 480 }; |
| 478 | 481 |
| 479 /** @private */ | 482 /** @private */ |
| 480 remoting.DesktopViewport.prototype.resetScroll_ = function() { | 483 remoting.DesktopViewport.prototype.resetScroll_ = function() { |
| 481 this.pluginContainer_.style.marginTop = '0px'; | 484 this.pluginContainer_.style.marginTop = '0px'; |
| 482 this.pluginContainer_.style.marginLeft = '0px'; | 485 this.pluginContainer_.style.marginLeft = '0px'; |
| 483 }; | 486 }; |
| 484 | 487 |
| 485 }()); | 488 }()); |
| OLD | NEW |