Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: remoting/webapp/base/js/dns_blackhole_checker.js

Issue 1285213006: Send connection setup results using XHRs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 'getJid() called in state ' + this.state_ + '.'); 106 'getJid() called in state ' + this.state_ + '.');
107 return this.signalStrategy_.getJid(); 107 return this.signalStrategy_.getJid();
108 }; 108 };
109 109
110 remoting.DnsBlackholeChecker.prototype.dispose = function() { 110 remoting.DnsBlackholeChecker.prototype.dispose = function() {
111 this.xhr_ = null; 111 this.xhr_ = null;
112 base.dispose(this.signalStrategy_); 112 base.dispose(this.signalStrategy_);
113 this.setState_(remoting.SignalStrategy.State.CLOSED); 113 this.setState_(remoting.SignalStrategy.State.CLOSED);
114 }; 114 };
115 115
116 remoting.DnsBlackholeChecker.prototype.sendConnectionSetupResults = function(
117 logger) {
118 this.signalStrategy_.sendConnectionSetupResults(logger);
119 };
120
121 /** @param {string} message */ 116 /** @param {string} message */
122 remoting.DnsBlackholeChecker.prototype.sendMessage = function(message) { 117 remoting.DnsBlackholeChecker.prototype.sendMessage = function(message) {
123 console.assert(this.state_ == remoting.SignalStrategy.State.CONNECTED, 118 console.assert(this.state_ == remoting.SignalStrategy.State.CONNECTED,
124 'sendMessage() called in state ' + this.state_ + '.'); 119 'sendMessage() called in state ' + this.state_ + '.');
125 this.signalStrategy_.sendMessage(message); 120 this.signalStrategy_.sendMessage(message);
126 }; 121 };
127 122
128 /** @param {remoting.SignalStrategy.State} state */ 123 /** @param {remoting.SignalStrategy.State} state */
129 remoting.DnsBlackholeChecker.prototype.onWrappedSignalStrategyStateChanged_ = 124 remoting.DnsBlackholeChecker.prototype.onWrappedSignalStrategyStateChanged_ =
130 function(state) { 125 function(state) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 * @private 174 * @private
180 */ 175 */
181 remoting.DnsBlackholeChecker.prototype.setState_ = function(newState) { 176 remoting.DnsBlackholeChecker.prototype.setState_ = function(newState) {
182 if (this.state_ != newState) { 177 if (this.state_ != newState) {
183 this.state_ = newState; 178 this.state_ = newState;
184 this.onStateChangedCallback_(this.state_); 179 this.onStateChangedCallback_(this.state_);
185 } 180 }
186 }; 181 };
187 182
188 }()); 183 }());
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698