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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 new base.EventHook( | 54 new base.EventHook( |
| 55 this.hostDesktop_, remoting.HostDesktop.Events.sizeChanged, | 55 this.hostDesktop_, remoting.HostDesktop.Events.sizeChanged, |
| 56 this.onDesktopSizeChanged_.bind(this)), | 56 this.onDesktopSizeChanged_.bind(this)), |
| 57 // TODO(kelvinp): Move window shape related logic into | 57 // TODO(kelvinp): Move window shape related logic into |
| 58 // remoting.AppConnectedView. | 58 // remoting.AppConnectedView. |
| 59 new base.EventHook( | 59 new base.EventHook( |
| 60 this.hostDesktop_, remoting.HostDesktop.Events.shapeChanged, | 60 this.hostDesktop_, remoting.HostDesktop.Events.shapeChanged, |
| 61 remoting.windowShape.setDesktopRects.bind(remoting.windowShape))); | 61 remoting.windowShape.setDesktopRects.bind(remoting.windowShape))); |
| 62 | 62 |
| 63 if (this.hostOptions_.resizeToClient) { | 63 if (this.hostOptions_.resizeToClient) { |
| 64 // TODO(kelvinp): This call is required in app remoting to set the host | |
| 65 // desktop size. Moves this to remoting.AppConnectedView later. | |
|
Jamie
2015/03/18 01:03:56
s/Moves/Move/
kelvinp
2015/03/18 18:44:22
Done.
| |
| 64 this.resizeHostDesktop_(); | 66 this.resizeHostDesktop_(); |
| 65 } else { | 67 } else { |
| 66 this.onDesktopSizeChanged_(); | 68 this.onDesktopSizeChanged_(); |
| 67 } | 69 } |
| 68 }; | 70 }; |
| 69 | 71 |
| 70 remoting.DesktopViewport.prototype.dispose = function() { | 72 remoting.DesktopViewport.prototype.dispose = function() { |
| 71 base.dispose(this.eventHooks_); | 73 base.dispose(this.eventHooks_); |
| 72 this.eventHooks_ = null; | 74 this.eventHooks_ = null; |
| 73 base.dispose(this.bumpScroller_); | 75 base.dispose(this.bumpScroller_); |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 483 return { width: pluginWidth, height: pluginHeight }; | 485 return { width: pluginWidth, height: pluginHeight }; |
| 484 }; | 486 }; |
| 485 | 487 |
| 486 /** @private */ | 488 /** @private */ |
| 487 remoting.DesktopViewport.prototype.resetScroll_ = function() { | 489 remoting.DesktopViewport.prototype.resetScroll_ = function() { |
| 488 this.pluginContainer_.style.marginTop = '0px'; | 490 this.pluginContainer_.style.marginTop = '0px'; |
| 489 this.pluginContainer_.style.marginLeft = '0px'; | 491 this.pluginContainer_.style.marginLeft = '0px'; |
| 490 }; | 492 }; |
| 491 | 493 |
| 492 }()); | 494 }()); |
| OLD | NEW |