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

Side by Side Diff: remoting/webapp/base/js/xmpp_connection.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 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 }); 123 });
124 }; 124 };
125 125
126 /** @param {string} message */ 126 /** @param {string} message */
127 remoting.XmppConnection.prototype.sendMessage = function(message) { 127 remoting.XmppConnection.prototype.sendMessage = function(message) {
128 console.assert(this.state_ == remoting.SignalStrategy.State.CONNECTED, 128 console.assert(this.state_ == remoting.SignalStrategy.State.CONNECTED,
129 'sendMessage() called in state ' + this.state_ + '.'); 129 'sendMessage() called in state ' + this.state_ + '.');
130 this.sendString_(message); 130 this.sendString_(message);
131 }; 131 };
132 132
133 remoting.XmppConnection.prototype.sendConnectionSetupResults =
134 function(logger) {
135 };
136
137 /** @return {remoting.SignalStrategy.State} Current state */ 133 /** @return {remoting.SignalStrategy.State} Current state */
138 remoting.XmppConnection.prototype.getState = function() { 134 remoting.XmppConnection.prototype.getState = function() {
139 return this.state_; 135 return this.state_;
140 }; 136 };
141 137
142 /** @return {!remoting.Error} Error when in FAILED state. */ 138 /** @return {!remoting.Error} Error when in FAILED state. */
143 remoting.XmppConnection.prototype.getError = function() { 139 remoting.XmppConnection.prototype.getError = function() {
144 return this.error_; 140 return this.error_;
145 }; 141 };
146 142
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 /** 335 /**
340 * @param {remoting.SignalStrategy.State} newState 336 * @param {remoting.SignalStrategy.State} newState
341 * @private 337 * @private
342 */ 338 */
343 remoting.XmppConnection.prototype.setState_ = function(newState) { 339 remoting.XmppConnection.prototype.setState_ = function(newState) {
344 if (this.state_ != newState) { 340 if (this.state_ != newState) {
345 this.state_ = newState; 341 this.state_ = newState;
346 this.onStateChangedCallback_(this.state_); 342 this.onStateChangedCallback_(this.state_);
347 } 343 }
348 }; 344 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698