| 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 14 matching lines...) Expand all Loading... |
| 25 /** | 25 /** |
| 26 * Interval that determines how often the web-app should send a new access token | 26 * Interval that determines how often the web-app should send a new access token |
| 27 * to the host. | 27 * to the host. |
| 28 * | 28 * |
| 29 * @const | 29 * @const |
| 30 * @type {number} | 30 * @type {number} |
| 31 */ | 31 */ |
| 32 remoting.ACCESS_TOKEN_RESEND_INTERVAL_MS = 15 * 60 * 1000; | 32 remoting.ACCESS_TOKEN_RESEND_INTERVAL_MS = 15 * 60 * 1000; |
| 33 | 33 |
| 34 /** | 34 /** |
| 35 * True if Cast capability is supported. | |
| 36 * | |
| 37 * @type {boolean} | |
| 38 */ | |
| 39 remoting.enableCast = false; | |
| 40 | |
| 41 /** | |
| 42 * True to enable mouse lock. | 35 * True to enable mouse lock. |
| 43 * This is currently disabled because the current client plugin does not | 36 * This is currently disabled because the current client plugin does not |
| 44 * properly handle mouse lock and delegated large cursors at the same time. | 37 * properly handle mouse lock and delegated large cursors at the same time. |
| 45 * This should be re-enabled (by removing this flag) once a version of | 38 * This should be re-enabled (by removing this flag) once a version of |
| 46 * the plugin that supports both has reached Chrome Stable channel. | 39 * the plugin that supports both has reached Chrome Stable channel. |
| 47 * (crbug.com/429322). | 40 * (crbug.com/429322). |
| 48 * | 41 * |
| 49 * @type {boolean} | 42 * @type {boolean} |
| 50 */ | 43 */ |
| 51 remoting.enableMouseLock = false; | 44 remoting.enableMouseLock = false; |
| (...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1670 console.error('Received unexpected cast message'); | 1663 console.error('Received unexpected cast message'); |
| 1671 } | 1664 } |
| 1672 }; | 1665 }; |
| 1673 | 1666 |
| 1674 /** | 1667 /** |
| 1675 * Create a CastExtensionHandler and inform the host that cast extension | 1668 * Create a CastExtensionHandler and inform the host that cast extension |
| 1676 * is supported. | 1669 * is supported. |
| 1677 * @private | 1670 * @private |
| 1678 */ | 1671 */ |
| 1679 remoting.ClientSession.prototype.createCastExtensionHandler_ = function() { | 1672 remoting.ClientSession.prototype.createCastExtensionHandler_ = function() { |
| 1680 if (remoting.enableCast && this.mode_ == remoting.ClientSession.Mode.ME2ME) { | 1673 var capabilities = remoting.app.getRequiredCapabilities(); |
| 1674 if (capabilities.indexOf(remoting.ClientSession.Capability.CAST) != -1 && |
| 1675 this.mode_ == remoting.ClientSession.Mode.ME2ME) { |
| 1681 this.castExtensionHandler_ = new remoting.CastExtensionHandler(this); | 1676 this.castExtensionHandler_ = new remoting.CastExtensionHandler(this); |
| 1682 } | 1677 } |
| 1683 }; | 1678 }; |
| 1684 | 1679 |
| 1685 /** | 1680 /** |
| 1686 * Returns true if the ClientSession can record video frames to a file. | 1681 * Returns true if the ClientSession can record video frames to a file. |
| 1687 * @return {boolean} | 1682 * @return {boolean} |
| 1688 */ | 1683 */ |
| 1689 remoting.ClientSession.prototype.canRecordVideo = function() { | 1684 remoting.ClientSession.prototype.canRecordVideo = function() { |
| 1690 return !!this.videoFrameRecorder_; | 1685 return !!this.videoFrameRecorder_; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1716 * @param {Object} message The parsed extension message data. | 1711 * @param {Object} message The parsed extension message data. |
| 1717 * @return {boolean} True if the message was recognized, false otherwise. | 1712 * @return {boolean} True if the message was recognized, false otherwise. |
| 1718 */ | 1713 */ |
| 1719 remoting.ClientSession.prototype.handleExtensionMessage = | 1714 remoting.ClientSession.prototype.handleExtensionMessage = |
| 1720 function(type, message) { | 1715 function(type, message) { |
| 1721 if (this.videoFrameRecorder_) { | 1716 if (this.videoFrameRecorder_) { |
| 1722 return this.videoFrameRecorder_.handleMessage(type, message); | 1717 return this.videoFrameRecorder_.handleMessage(type, message); |
| 1723 } | 1718 } |
| 1724 return false; | 1719 return false; |
| 1725 } | 1720 } |
| OLD | NEW |