| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 this.connectionSetupResults_ = []; | 175 this.connectionSetupResults_ = []; |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 /** @return {remoting.SignalStrategy.State} Current state */ | 178 /** @return {remoting.SignalStrategy.State} Current state */ |
| 179 remoting.FallbackSignalStrategy.prototype.getState = function() { | 179 remoting.FallbackSignalStrategy.prototype.getState = function() { |
| 180 return (this.externalState_ === null) | 180 return (this.externalState_ === null) |
| 181 ? remoting.SignalStrategy.State.NOT_CONNECTED | 181 ? remoting.SignalStrategy.State.NOT_CONNECTED |
| 182 : this.externalState_; | 182 : this.externalState_; |
| 183 }; | 183 }; |
| 184 | 184 |
| 185 /** @return {remoting.Error} Error when in FAILED state. */ | 185 /** @return {!remoting.Error} Error when in FAILED state. */ |
| 186 remoting.FallbackSignalStrategy.prototype.getError = function() { | 186 remoting.FallbackSignalStrategy.prototype.getError = function() { |
| 187 base.debug.assert(this.state_ == this.State.SECONDARY_FAILED); | 187 base.debug.assert(this.state_ == this.State.SECONDARY_FAILED); |
| 188 base.debug.assert( | 188 base.debug.assert( |
| 189 this.secondary_.getState() == remoting.SignalStrategy.State.FAILED); | 189 this.secondary_.getState() == remoting.SignalStrategy.State.FAILED); |
| 190 return this.secondary_.getError(); | 190 return this.secondary_.getError(); |
| 191 }; | 191 }; |
| 192 | 192 |
| 193 /** @return {string} Current JID when in CONNECTED state. */ | 193 /** @return {string} Current JID when in CONNECTED state. */ |
| 194 remoting.FallbackSignalStrategy.prototype.getJid = function() { | 194 remoting.FallbackSignalStrategy.prototype.getJid = function() { |
| 195 return this.getConnectedSignalStrategy_().getJid(); | 195 return this.getConnectedSignalStrategy_().getJid(); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 console.log('FallbackSignalStrategy progress: ' + strategy.getType() + ' ' + | 348 console.log('FallbackSignalStrategy progress: ' + strategy.getType() + ' ' + |
| 349 progress); | 349 progress); |
| 350 this.connectionSetupResults_.push({ | 350 this.connectionSetupResults_.push({ |
| 351 'strategyType': strategy.getType(), | 351 'strategyType': strategy.getType(), |
| 352 'progress': progress | 352 'progress': progress |
| 353 }); | 353 }); |
| 354 if (this.logToServer_) { | 354 if (this.logToServer_) { |
| 355 this.sendConnectionSetupResultsInternal_(); | 355 this.sendConnectionSetupResultsInternal_(); |
| 356 } | 356 } |
| 357 }; | 357 }; |
| OLD | NEW |