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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 * @param {boolean} pause True to pause video, false to resume. | 593 * @param {boolean} pause True to pause video, false to resume. |
594 * @return {void} Nothing. | 594 * @return {void} Nothing. |
595 */ | 595 */ |
596 remoting.ClientSession.prototype.pauseVideo = function(pause) { | 596 remoting.ClientSession.prototype.pauseVideo = function(pause) { |
597 if (this.plugin) { | 597 if (this.plugin) { |
598 this.plugin.pauseVideo(pause) | 598 this.plugin.pauseVideo(pause) |
599 } | 599 } |
600 } | 600 } |
601 | 601 |
602 /** | 602 /** |
| 603 * Requests that the host pause or resume audio. |
| 604 * |
| 605 * @param {boolean} pause True to pause audio, false to resume. |
| 606 * @return {void} Nothing. |
| 607 */ |
| 608 remoting.ClientSession.prototype.pauseAudio = function(pause) { |
| 609 if (this.plugin) { |
| 610 this.plugin.pauseAudio(pause) |
| 611 } |
| 612 } |
| 613 |
| 614 /** |
603 * This is a callback that gets called when the plugin notifies us of a change | 615 * This is a callback that gets called when the plugin notifies us of a change |
604 * in the size of the remote desktop. | 616 * in the size of the remote desktop. |
605 * | 617 * |
606 * @private | 618 * @private |
607 * @return {void} Nothing. | 619 * @return {void} Nothing. |
608 */ | 620 */ |
609 remoting.ClientSession.prototype.onDesktopSizeChanged_ = function() { | 621 remoting.ClientSession.prototype.onDesktopSizeChanged_ = function() { |
610 console.log('desktop size changed: ' + | 622 console.log('desktop size changed: ' + |
611 this.plugin.desktopWidth + 'x' + | 623 this.plugin.desktopWidth + 'x' + |
612 this.plugin.desktopHeight +' @ ' + | 624 this.plugin.desktopHeight +' @ ' + |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 var lateAdjustment = 1 + (now - expected) / timeout; | 850 var lateAdjustment = 1 + (now - expected) / timeout; |
839 if (!that.scroll_(lateAdjustment * dx, lateAdjustment * dy)) { | 851 if (!that.scroll_(lateAdjustment * dx, lateAdjustment * dy)) { |
840 that.bumpScrollTimer_ = window.setTimeout( | 852 that.bumpScrollTimer_ = window.setTimeout( |
841 function() { repeatScroll(now + timeout); }, | 853 function() { repeatScroll(now + timeout); }, |
842 timeout); | 854 timeout); |
843 } | 855 } |
844 }; | 856 }; |
845 repeatScroll(new Date().getTime()); | 857 repeatScroll(new Date().getTime()); |
846 } | 858 } |
847 }; | 859 }; |
OLD | NEW |