Chromium Code Reviews| 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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 604 remoting.ClientSession.prototype.removePlugin = function() { | 604 remoting.ClientSession.prototype.removePlugin = function() { |
| 605 if (this.plugin_) { | 605 if (this.plugin_) { |
| 606 this.plugin_.element().removeEventListener( | 606 this.plugin_.element().removeEventListener( |
| 607 'focus', this.callPluginGotFocus_, false); | 607 'focus', this.callPluginGotFocus_, false); |
| 608 this.plugin_.element().removeEventListener( | 608 this.plugin_.element().removeEventListener( |
| 609 'blur', this.callPluginLostFocus_, false); | 609 'blur', this.callPluginLostFocus_, false); |
| 610 this.plugin_.dispose(); | 610 this.plugin_.dispose(); |
| 611 this.plugin_ = null; | 611 this.plugin_ = null; |
| 612 } | 612 } |
| 613 | 613 |
| 614 // Leave full-screen mode, and stop listening for related events. | 614 // Stop listening for full-screen events. |
| 615 var listener = this.callOnFullScreenChanged_; | 615 remoting.fullscreen.removeListener(this.callOnFullScreenChanged_); |
|
kelvinp
2015/01/23 23:39:58
Rant: It is weird that sometimes the clientSession
Jamie
2015/01/24 00:46:35
We are going to have to disentangle full-screen fr
| |
| 616 remoting.fullscreen.activate( | |
| 617 false, | |
| 618 function() { | |
| 619 remoting.fullscreen.removeListener(listener); | |
| 620 }); | |
| 621 this.updateClientSessionUi_(null); | 616 this.updateClientSessionUi_(null); |
| 622 | 617 |
| 623 this.container_.removeEventListener('mousemove', | 618 this.container_.removeEventListener('mousemove', |
| 624 this.updateMouseCursorPosition_, | 619 this.updateMouseCursorPosition_, |
| 625 true); | 620 true); |
| 626 }; | 621 }; |
| 627 | 622 |
| 628 /** | 623 /** |
| 629 * @param {remoting.ClientSession} clientSession The active session, or null if | 624 * @param {remoting.ClientSession} clientSession The active session, or null if |
| 630 * there is no connection. | 625 * there is no connection. |
| (...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1726 * @param {Object} message The parsed extension message data. | 1721 * @param {Object} message The parsed extension message data. |
| 1727 * @return {boolean} True if the message was recognized, false otherwise. | 1722 * @return {boolean} True if the message was recognized, false otherwise. |
| 1728 */ | 1723 */ |
| 1729 remoting.ClientSession.prototype.handleExtensionMessage = | 1724 remoting.ClientSession.prototype.handleExtensionMessage = |
| 1730 function(type, message) { | 1725 function(type, message) { |
| 1731 if (this.videoFrameRecorder_) { | 1726 if (this.videoFrameRecorder_) { |
| 1732 return this.videoFrameRecorder_.handleMessage(type, message); | 1727 return this.videoFrameRecorder_.handleMessage(type, message); |
| 1733 } | 1728 } |
| 1734 return false; | 1729 return false; |
| 1735 } | 1730 } |
| OLD | NEW |