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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 remoting.ClientSession.prototype.disconnect = function(error) { | 660 remoting.ClientSession.prototype.disconnect = function(error) { |
661 var state = (error == remoting.Error.NONE) ? | 661 var state = (error == remoting.Error.NONE) ? |
662 remoting.ClientSession.State.CLOSED : | 662 remoting.ClientSession.State.CLOSED : |
663 remoting.ClientSession.State.FAILED; | 663 remoting.ClientSession.State.FAILED; |
664 | 664 |
665 // The plugin won't send a state change notification, so we explicitly log | 665 // The plugin won't send a state change notification, so we explicitly log |
666 // the fact that the connection has closed. | 666 // the fact that the connection has closed. |
667 this.logToServer.logClientSessionStateChange(state, error); | 667 this.logToServer.logClientSessionStateChange(state, error); |
668 this.error_ = error; | 668 this.error_ = error; |
669 this.setState_(state); | 669 this.setState_(state); |
670 remoting.app.onDisconnected(); | |
671 }; | 670 }; |
672 | 671 |
673 /** | 672 /** |
674 * Deletes the <embed> element from the container and disconnects. | 673 * Deletes the <embed> element from the container and disconnects. |
675 * | 674 * |
676 * @return {void} Nothing. | 675 * @return {void} Nothing. |
677 */ | 676 */ |
678 remoting.ClientSession.prototype.cleanup = function() { | 677 remoting.ClientSession.prototype.cleanup = function() { |
679 this.sendIq_( | 678 this.sendIq_( |
680 '<cli:iq ' + | 679 '<cli:iq ' + |
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1727 * @param {Object} message The parsed extension message data. | 1726 * @param {Object} message The parsed extension message data. |
1728 * @return {boolean} True if the message was recognized, false otherwise. | 1727 * @return {boolean} True if the message was recognized, false otherwise. |
1729 */ | 1728 */ |
1730 remoting.ClientSession.prototype.handleExtensionMessage = | 1729 remoting.ClientSession.prototype.handleExtensionMessage = |
1731 function(type, message) { | 1730 function(type, message) { |
1732 if (this.videoFrameRecorder_) { | 1731 if (this.videoFrameRecorder_) { |
1733 return this.videoFrameRecorder_.handleMessage(type, message); | 1732 return this.videoFrameRecorder_.handleMessage(type, message); |
1734 } | 1733 } |
1735 return false; | 1734 return false; |
1736 } | 1735 } |
OLD | NEW |