| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 if (type == 'set') { | 96 if (type == 'set') { |
| 97 var id = iqNode.getAttribute('id'); | 97 var id = iqNode.getAttribute('id'); |
| 98 iqNode.setAttribute('id', 'x' + id); | 98 iqNode.setAttribute('id', 'x' + id); |
| 99 message = (new XMLSerializer()).serializeToString(iqNode); | 99 message = (new XMLSerializer()).serializeToString(iqNode); |
| 100 } | 100 } |
| 101 | 101 |
| 102 // Send the stanza. | 102 // Send the stanza. |
| 103 remoting.wcsSandbox.sendIq(message); | 103 remoting.wcsSandbox.sendIq(message); |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 remoting.WcsAdapter.prototype.sendConnectionSetupResults = | |
| 107 function(logger) { | |
| 108 }; | |
| 109 | |
| 110 /** @param {string} jid */ | 106 /** @param {string} jid */ |
| 111 remoting.WcsAdapter.prototype.onWcsConnected_ = function(jid) { | 107 remoting.WcsAdapter.prototype.onWcsConnected_ = function(jid) { |
| 112 this.jid_ = jid; | 108 this.jid_ = jid; |
| 113 this.setState_(remoting.SignalStrategy.State.CONNECTED); | 109 this.setState_(remoting.SignalStrategy.State.CONNECTED); |
| 114 }; | 110 }; |
| 115 | 111 |
| 116 /** @param {string} stanza */ | 112 /** @param {string} stanza */ |
| 117 remoting.WcsAdapter.prototype.onIncomingStanza_ = function(stanza) { | 113 remoting.WcsAdapter.prototype.onIncomingStanza_ = function(stanza) { |
| 118 var parser = new DOMParser(); | 114 var parser = new DOMParser(); |
| 119 var parsed = parser.parseFromString(stanza, 'text/xml').firstChild; | 115 var parsed = parser.parseFromString(stanza, 'text/xml').firstChild; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 143 /** | 139 /** |
| 144 * @param {remoting.SignalStrategy.State} newState | 140 * @param {remoting.SignalStrategy.State} newState |
| 145 * @private | 141 * @private |
| 146 */ | 142 */ |
| 147 remoting.WcsAdapter.prototype.setState_ = function(newState) { | 143 remoting.WcsAdapter.prototype.setState_ = function(newState) { |
| 148 if (this.state_ != newState) { | 144 if (this.state_ != newState) { |
| 149 this.state_ = newState; | 145 this.state_ = newState; |
| 150 this.onStateChangedCallback_(this.state_); | 146 this.onStateChangedCallback_(this.state_); |
| 151 } | 147 } |
| 152 }; | 148 }; |
| OLD | NEW |