| 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 (function() { | 10 (function() { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * @param {remoting.SignalStrategy} signalStrategy | 22 * @param {remoting.SignalStrategy} signalStrategy |
| 23 * @constructor | 23 * @constructor |
| 24 * @implements {remoting.SignalStrategy} | 24 * @implements {remoting.SignalStrategy} |
| 25 */ | 25 */ |
| 26 remoting.DnsBlackholeChecker = function(signalStrategy) { | 26 remoting.DnsBlackholeChecker = function(signalStrategy) { |
| 27 /** @private */ | 27 /** @private */ |
| 28 this.signalStrategy_ = signalStrategy; | 28 this.signalStrategy_ = signalStrategy; |
| 29 this.signalStrategy_.setStateChangedCallback( | 29 this.signalStrategy_.setStateChangedCallback( |
| 30 this.onWrappedSignalStrategyStateChanged_.bind(this)); | 30 this.onWrappedSignalStrategyStateChanged_.bind(this)); |
| 31 | 31 |
| 32 /** @type {?function(remoting.SignalStrategy.State):void} @private */ | 32 /** @private {?function(remoting.SignalStrategy.State):void} */ |
| 33 this.onStateChangedCallback_ = null; | 33 this.onStateChangedCallback_ = null; |
| 34 | 34 |
| 35 /** @private */ | 35 /** @private */ |
| 36 this.state_ = remoting.SignalStrategy.State.NOT_CONNECTED; | 36 this.state_ = remoting.SignalStrategy.State.NOT_CONNECTED; |
| 37 | 37 |
| 38 /** @private */ | 38 /** @private */ |
| 39 this.blackholeState_ = BlackholeState.PENDING; | 39 this.blackholeState_ = BlackholeState.PENDING; |
| 40 | 40 |
| 41 /** @type {?XMLHttpRequest} @private */ | 41 /** @private {?XMLHttpRequest} */ |
| 42 this.xhr_ = null; | 42 this.xhr_ = null; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 /** | 45 /** |
| 46 * @const | 46 * @const |
| 47 * @private | 47 * @private |
| 48 */ | 48 */ |
| 49 remoting.DnsBlackholeChecker.URL_TO_REQUEST_ = | 49 remoting.DnsBlackholeChecker.URL_TO_REQUEST_ = |
| 50 "https://chromoting-client.talkgadget.google.com/talkgadget/oauth/" + | 50 "https://chromoting-client.talkgadget.google.com/talkgadget/oauth/" + |
| 51 "chrome-remote-desktop-client"; | 51 "chrome-remote-desktop-client"; |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 * @private | 180 * @private |
| 181 */ | 181 */ |
| 182 remoting.DnsBlackholeChecker.prototype.setState_ = function(newState) { | 182 remoting.DnsBlackholeChecker.prototype.setState_ = function(newState) { |
| 183 if (this.state_ != newState) { | 183 if (this.state_ != newState) { |
| 184 this.state_ = newState; | 184 this.state_ = newState; |
| 185 this.onStateChangedCallback_(this.state_); | 185 this.onStateChangedCallback_(this.state_); |
| 186 } | 186 } |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 }()); | 189 }()); |
| OLD | NEW |