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

Side by Side Diff: remoting/webapp/me2mom/client_session.js

Issue 8427020: Don't send a session-terminate in disconnect() if WCS not initialised. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 * Class handling creation and teardown of a remoting client session. 7 * Class handling creation and teardown of a remoting client 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 }; 192 };
193 193
194 /** 194 /**
195 * Deletes the <embed> element from the container and disconnects. 195 * Deletes the <embed> element from the container and disconnects.
196 * 196 *
197 * @return {void} Nothing. 197 * @return {void} Nothing.
198 */ 198 */
199 remoting.ClientSession.prototype.disconnect = function() { 199 remoting.ClientSession.prototype.disconnect = function() {
200 if (remoting.wcs) { 200 if (remoting.wcs) {
201 remoting.wcs.setOnIq(function(stanza) {}); 201 remoting.wcs.setOnIq(function(stanza) {});
202 this.sendIq_(
203 '<cli:iq ' +
204 'to="' + this.hostJid + '" ' +
205 'type="set" ' +
206 'id="session-terminate" ' +
207 'xmlns:cli="jabber:client">' +
208 '<jingle ' +
209 'xmlns="urn:xmpp:jingle:1" ' +
210 'action="session-terminate" ' +
211 'initiator="' + this.clientJid + '" ' +
212 'sid="' + this.sessionId + '">' +
213 '<reason><success/></reason>' +
214 '</jingle>' +
215 '</cli:iq>');
202 } 216 }
203 this.removePlugin(); 217 this.removePlugin();
204 this.sendIq_(
205 '<cli:iq ' +
206 'to="' + this.hostJid + '" ' +
207 'type="set" ' +
208 'id="session-terminate" ' +
209 'xmlns:cli="jabber:client">' +
210 '<jingle ' +
211 'xmlns="urn:xmpp:jingle:1" ' +
212 'action="session-terminate" ' +
213 'initiator="' + this.clientJid + '" ' +
214 'sid="' + this.sessionId + '">' +
215 '<reason><success/></reason>' +
216 '</jingle>' +
217 '</cli:iq>');
218 }; 218 };
219 219
220 /** 220 /**
221 * Sends an IQ stanza via the http xmpp proxy. 221 * Sends an IQ stanza via the http xmpp proxy.
222 * 222 *
223 * @private 223 * @private
224 * @param {string} msg XML string of IQ stanza to send to server. 224 * @param {string} msg XML string of IQ stanza to send to server.
225 * @return {void} Nothing. 225 * @return {void} Nothing.
226 */ 226 */
227 remoting.ClientSession.prototype.sendIq_ = function(msg) { 227 remoting.ClientSession.prototype.sendIq_ = function(msg) {
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 return { 408 return {
409 'video_bandwidth': this.plugin.videoBandwidth, 409 'video_bandwidth': this.plugin.videoBandwidth,
410 'video_frame_rate': this.plugin.videoFramerate, 410 'video_frame_rate': this.plugin.videoFramerate,
411 'capture_latency': this.plugin.videoCaptureLatency, 411 'capture_latency': this.plugin.videoCaptureLatency,
412 'encode_latency': this.plugin.videoEncodeLatency, 412 'encode_latency': this.plugin.videoEncodeLatency,
413 'decode_latency': this.plugin.videoDecodeLatency, 413 'decode_latency': this.plugin.videoDecodeLatency,
414 'render_latency': this.plugin.videoRenderLatency, 414 'render_latency': this.plugin.videoRenderLatency,
415 'roundtrip_latency': this.plugin.roundTripLatency 415 'roundtrip_latency': this.plugin.roundTripLatency
416 }; 416 };
417 }; 417 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698