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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 * @return {remoting.ClientSession.State} The session state enum value. | 160 * @return {remoting.ClientSession.State} The session state enum value. |
161 */ | 161 */ |
162 remoting.ClientSession.State.fromString = function(state) { | 162 remoting.ClientSession.State.fromString = function(state) { |
163 if (!remoting.ClientSession.State.hasOwnProperty(state)) { | 163 if (!remoting.ClientSession.State.hasOwnProperty(state)) { |
164 throw "Invalid ClientSession.State: " + state; | 164 throw "Invalid ClientSession.State: " + state; |
165 } | 165 } |
166 return remoting.ClientSession.State[state]; | 166 return remoting.ClientSession.State[state]; |
167 }; | 167 }; |
168 | 168 |
169 /** | 169 /** |
170 @constructor | |
171 @param {remoting.ClientSession.State} current | 170 @param {remoting.ClientSession.State} current |
172 @param {remoting.ClientSession.State} previous | 171 @param {remoting.ClientSession.State} previous |
| 172 @constructor |
173 */ | 173 */ |
174 remoting.ClientSession.StateEvent = function(current, previous) { | 174 remoting.ClientSession.StateEvent = function(current, previous) { |
175 /** @type {remoting.ClientSession.State} */ | 175 /** @type {remoting.ClientSession.State} */ |
176 this.previous = previous | 176 this.previous = previous |
177 | 177 |
178 /** @type {remoting.ClientSession.State} */ | 178 /** @type {remoting.ClientSession.State} */ |
179 this.current = current; | 179 this.current = current; |
180 }; | 180 }; |
181 | 181 |
182 /** @enum {number} */ | 182 /** @enum {number} */ |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 * @param {Object} message The parsed extension message data. | 840 * @param {Object} message The parsed extension message data. |
841 * @return {boolean} True if the message was recognized, false otherwise. | 841 * @return {boolean} True if the message was recognized, false otherwise. |
842 */ | 842 */ |
843 remoting.ClientSession.prototype.handleExtensionMessage = | 843 remoting.ClientSession.prototype.handleExtensionMessage = |
844 function(type, message) { | 844 function(type, message) { |
845 if (this.uiHandler_.handleExtensionMessage(type, message)) { | 845 if (this.uiHandler_.handleExtensionMessage(type, message)) { |
846 return true; | 846 return true; |
847 } | 847 } |
848 return false; | 848 return false; |
849 }; | 849 }; |
OLD | NEW |