OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * Session class that handles creation and teardown of a remoting session. | 7 * Session class that handles creation and teardown of a remoting session. |
8 * | 8 * |
9 * This abstracts a <embed> element and controls the plugin which does the | 9 * This abstracts a <embed> element and controls the plugin which does the |
10 * actual remoting work. There should be no UI code inside this class. It | 10 * actual remoting work. There should be no UI code inside this class. It |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 remoting.debug.log('FailedToConnect: --' + xhr.responseText + | 222 remoting.debug.log('FailedToConnect: --' + xhr.responseText + |
223 '-- (status=' + xhr.status + ')'); | 223 '-- (status=' + xhr.status + ')'); |
224 that.setState_(remoting.ClientSession.CONNECTION_FAILED); | 224 that.setState_(remoting.ClientSession.CONNECTION_FAILED); |
225 return; | 225 return; |
226 } | 226 } |
227 | 227 |
228 remoting.debug.log('Receiving Iq: --' + xhr.responseText + '--'); | 228 remoting.debug.log('Receiving Iq: --' + xhr.responseText + '--'); |
229 that.clientJid = xhr.responseText; | 229 that.clientJid = xhr.responseText; |
230 | 230 |
231 // TODO(ajwong): Remove old version support. | 231 // TODO(ajwong): Remove old version support. |
232 if (that.plugin.API_VERSION_ >= 2) { | 232 if (that.plugin.apiVersion >= 2) { |
233 that.plugin.connect(that.hostJid, that.hostPublicKey, that.clientJid, | 233 that.plugin.connect(that.hostJid, that.hostPublicKey, that.clientJid, |
234 that.accessCode); | 234 that.accessCode); |
235 } else { | 235 } else { |
236 that.plugin.connect(that.hostJid, that.clientJid, that.accessCode); | 236 that.plugin.connect(that.hostJid, that.clientJid, that.accessCode); |
237 } | 237 } |
238 that.feedIq_(); | 238 that.feedIq_(); |
239 }; | 239 }; |
240 | 240 |
241 remoting.xhr.post(this.HTTP_XMPP_PROXY_ + '/newConnection', | 241 remoting.xhr.post(this.HTTP_XMPP_PROXY_ + '/newConnection', |
242 onRegistered, parameters, {}, true); | 242 onRegistered, parameters, {}, true); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 'video_bandwidth': this.plugin.videoBandwidth, | 311 'video_bandwidth': this.plugin.videoBandwidth, |
312 'capture_latency': this.plugin.videoCaptureLatency, | 312 'capture_latency': this.plugin.videoCaptureLatency, |
313 'encode_latency': this.plugin.videoEncodeLatency, | 313 'encode_latency': this.plugin.videoEncodeLatency, |
314 'decode_latency': this.plugin.videoDecodeLatency, | 314 'decode_latency': this.plugin.videoDecodeLatency, |
315 'render_latency': this.plugin.videoRenderLatency, | 315 'render_latency': this.plugin.videoRenderLatency, |
316 'roundtrip_latency': this.plugin.roundTripLatency | 316 'roundtrip_latency': this.plugin.roundTripLatency |
317 }; | 317 }; |
318 }; | 318 }; |
319 | 319 |
320 }()); | 320 }()); |
OLD | NEW |