OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** @suppress {duplicate} */ | 7 /** @suppress {duplicate} */ |
8 var remoting = remoting || {}; | 8 var remoting = remoting || {}; |
9 | 9 |
10 /** | 10 /** |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 /** @private */ | 54 /** @private */ |
55 this.onHandshakeDoneCallback_ = onHandshakeDoneCallback; | 55 this.onHandshakeDoneCallback_ = onHandshakeDoneCallback; |
56 /** @private */ | 56 /** @private */ |
57 this.onErrorCallback_ = onErrorCallback; | 57 this.onErrorCallback_ = onErrorCallback; |
58 | 58 |
59 /** @private */ | 59 /** @private */ |
60 this.state_ = remoting.XmppLoginHandler.State.INIT; | 60 this.state_ = remoting.XmppLoginHandler.State.INIT; |
61 /** @private */ | 61 /** @private */ |
62 this.jid_ = ''; | 62 this.jid_ = ''; |
63 | 63 |
64 /** @type {remoting.XmppStreamParser} @private */ | 64 /** @private {remoting.XmppStreamParser} */ |
65 this.streamParser_ = null; | 65 this.streamParser_ = null; |
66 } | 66 } |
67 | 67 |
68 /** @return {function(string, remoting.XmppStreamParser):void} */ | 68 /** @return {function(string, remoting.XmppStreamParser):void} */ |
69 remoting.XmppLoginHandler.prototype.getHandshakeDoneCallbackForTesting = | 69 remoting.XmppLoginHandler.prototype.getHandshakeDoneCallbackForTesting = |
70 function() { | 70 function() { |
71 return this.onHandshakeDoneCallback_; | 71 return this.onHandshakeDoneCallback_; |
72 }; | 72 }; |
73 | 73 |
74 /** | 74 /** |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 * @private | 286 * @private |
287 */ | 287 */ |
288 remoting.XmppLoginHandler.prototype.onError_ = function(error, text) { | 288 remoting.XmppLoginHandler.prototype.onError_ = function(error, text) { |
289 if (this.state_ != remoting.XmppLoginHandler.State.ERROR) { | 289 if (this.state_ != remoting.XmppLoginHandler.State.ERROR) { |
290 this.onErrorCallback_(error, text); | 290 this.onErrorCallback_(error, text); |
291 this.state_ = remoting.XmppLoginHandler.State.ERROR; | 291 this.state_ = remoting.XmppLoginHandler.State.ERROR; |
292 } else { | 292 } else { |
293 console.error(text); | 293 console.error(text); |
294 } | 294 } |
295 } | 295 } |
OLD | NEW |