| 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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 remoting.ClientSession.prototype.removePlugin = function() { | 600 remoting.ClientSession.prototype.removePlugin = function() { |
| 601 if (this.plugin_) { | 601 if (this.plugin_) { |
| 602 this.plugin_.element().removeEventListener( | 602 this.plugin_.element().removeEventListener( |
| 603 'focus', this.callPluginGotFocus_, false); | 603 'focus', this.callPluginGotFocus_, false); |
| 604 this.plugin_.element().removeEventListener( | 604 this.plugin_.element().removeEventListener( |
| 605 'blur', this.callPluginLostFocus_, false); | 605 'blur', this.callPluginLostFocus_, false); |
| 606 this.plugin_.dispose(); | 606 this.plugin_.dispose(); |
| 607 this.plugin_ = null; | 607 this.plugin_ = null; |
| 608 } | 608 } |
| 609 | 609 |
| 610 // Leave full-screen mode, and stop listening for related events. | 610 // Stop listening for full-screen events. |
| 611 var listener = this.callOnFullScreenChanged_; | 611 remoting.fullscreen.removeListener(this.callOnFullScreenChanged_); |
| 612 remoting.fullscreen.activate( | |
| 613 false, | |
| 614 function() { | |
| 615 remoting.fullscreen.removeListener(listener); | |
| 616 }); | |
| 617 this.updateClientSessionUi_(null); | 612 this.updateClientSessionUi_(null); |
| 618 | 613 |
| 619 this.container_.removeEventListener('mousemove', | 614 this.container_.removeEventListener('mousemove', |
| 620 this.updateMouseCursorPosition_, | 615 this.updateMouseCursorPosition_, |
| 621 true); | 616 true); |
| 622 }; | 617 }; |
| 623 | 618 |
| 624 /** | 619 /** |
| 625 * @param {remoting.ClientSession} clientSession The active session, or null if | 620 * @param {remoting.ClientSession} clientSession The active session, or null if |
| 626 * there is no connection. | 621 * there is no connection. |
| (...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1721 * @param {Object} message The parsed extension message data. | 1716 * @param {Object} message The parsed extension message data. |
| 1722 * @return {boolean} True if the message was recognized, false otherwise. | 1717 * @return {boolean} True if the message was recognized, false otherwise. |
| 1723 */ | 1718 */ |
| 1724 remoting.ClientSession.prototype.handleExtensionMessage = | 1719 remoting.ClientSession.prototype.handleExtensionMessage = |
| 1725 function(type, message) { | 1720 function(type, message) { |
| 1726 if (this.videoFrameRecorder_) { | 1721 if (this.videoFrameRecorder_) { |
| 1727 return this.videoFrameRecorder_.handleMessage(type, message); | 1722 return this.videoFrameRecorder_.handleMessage(type, message); |
| 1728 } | 1723 } |
| 1729 return false; | 1724 return false; |
| 1730 } | 1725 } |
| OLD | NEW |