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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 chrome.socket.create("tcp", {}, this.onSocketCreated_.bind(this)); | 143 chrome.socket.create("tcp", {}, this.onSocketCreated_.bind(this)); |
144 this.setState_(remoting.SignalStrategy.State.CONNECTING); | 144 this.setState_(remoting.SignalStrategy.State.CONNECTING); |
145 }; | 145 }; |
146 | 146 |
147 /** @param {string} message */ | 147 /** @param {string} message */ |
148 remoting.XmppConnection.prototype.sendMessage = function(message) { | 148 remoting.XmppConnection.prototype.sendMessage = function(message) { |
149 base.debug.assert(this.state_ == remoting.SignalStrategy.State.CONNECTED); | 149 base.debug.assert(this.state_ == remoting.SignalStrategy.State.CONNECTED); |
150 this.sendString_(message); | 150 this.sendString_(message); |
151 }; | 151 }; |
152 | 152 |
| 153 /** |
| 154 * @param {remoting.LogToServer} logToServer The LogToServer instance for the |
| 155 * connection. |
| 156 */ |
| 157 remoting.XmppConnection.prototype.sendConnectionSetupResults = |
| 158 function(logToServer) { |
| 159 }; |
| 160 |
153 /** @return {remoting.SignalStrategy.State} Current state */ | 161 /** @return {remoting.SignalStrategy.State} Current state */ |
154 remoting.XmppConnection.prototype.getState = function() { | 162 remoting.XmppConnection.prototype.getState = function() { |
155 return this.state_; | 163 return this.state_; |
156 }; | 164 }; |
157 | 165 |
158 /** @return {remoting.Error} Error when in FAILED state. */ | 166 /** @return {remoting.Error} Error when in FAILED state. */ |
159 remoting.XmppConnection.prototype.getError = function() { | 167 remoting.XmppConnection.prototype.getError = function() { |
160 return this.error_; | 168 return this.error_; |
161 }; | 169 }; |
162 | 170 |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 /** | 468 /** |
461 * @param {remoting.SignalStrategy.State} newState | 469 * @param {remoting.SignalStrategy.State} newState |
462 * @private | 470 * @private |
463 */ | 471 */ |
464 remoting.XmppConnection.prototype.setState_ = function(newState) { | 472 remoting.XmppConnection.prototype.setState_ = function(newState) { |
465 if (this.state_ != newState) { | 473 if (this.state_ != newState) { |
466 this.state_ = newState; | 474 this.state_ = newState; |
467 this.onStateChangedCallback_(this.state_); | 475 this.onStateChangedCallback_(this.state_); |
468 } | 476 } |
469 }; | 477 }; |
OLD | NEW |