OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 * Class handling creation and teardown of a remoting client session. | 7 * Class handling creation and teardown of a remoting client session. |
8 * | 8 * |
9 * The ClientSession class controls lifetime of the client plugin | 9 * The ClientSession class controls lifetime of the client plugin |
10 * object and provides the plugin with the functionality it needs to | 10 * object and provides the plugin with the functionality it needs to |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 /** | 548 /** |
549 * This is a callback that gets called when the plugin notifies us of a change | 549 * This is a callback that gets called when the plugin notifies us of a change |
550 * in the size of the remote desktop. | 550 * in the size of the remote desktop. |
551 * | 551 * |
552 * @private | 552 * @private |
553 * @return {void} Nothing. | 553 * @return {void} Nothing. |
554 */ | 554 */ |
555 remoting.ClientSession.prototype.onDesktopSizeChanged_ = function() { | 555 remoting.ClientSession.prototype.onDesktopSizeChanged_ = function() { |
556 console.log('desktop size changed: ' + | 556 console.log('desktop size changed: ' + |
557 this.plugin.desktopWidth + 'x' + | 557 this.plugin.desktopWidth + 'x' + |
558 this.plugin.desktopHeight); | 558 this.plugin.desktopHeight +' @ ' + |
| 559 this.plugin.desktopXDpi + 'x' + |
| 560 this.plugin.desktopYDpi + ' DPI'); |
559 this.updateDimensions(); | 561 this.updateDimensions(); |
560 }; | 562 }; |
561 | 563 |
562 /** | 564 /** |
563 * Refreshes the plugin's dimensions, taking into account the sizes of the | 565 * Refreshes the plugin's dimensions, taking into account the sizes of the |
564 * remote desktop and client window, and the current scale-to-fit setting. | 566 * remote desktop and client window, and the current scale-to-fit setting. |
565 * | 567 * |
566 * @return {void} Nothing. | 568 * @return {void} Nothing. |
567 */ | 569 */ |
568 remoting.ClientSession.prototype.updateDimensions = function() { | 570 remoting.ClientSession.prototype.updateDimensions = function() { |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 var lateAdjustment = 1 + (now - expected) / timeout; | 772 var lateAdjustment = 1 + (now - expected) / timeout; |
771 if (!that.scroll_(lateAdjustment * dx, lateAdjustment * dy)) { | 773 if (!that.scroll_(lateAdjustment * dx, lateAdjustment * dy)) { |
772 that.bumpScrollTimer_ = window.setTimeout( | 774 that.bumpScrollTimer_ = window.setTimeout( |
773 function() { repeatScroll(now + timeout); }, | 775 function() { repeatScroll(now + timeout); }, |
774 timeout); | 776 timeout); |
775 } | 777 } |
776 }; | 778 }; |
777 repeatScroll(new Date().getTime()); | 779 repeatScroll(new Date().getTime()); |
778 } | 780 } |
779 }; | 781 }; |
OLD | NEW |