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

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

Issue 8772065: The chromoting client logs a session-close initiated by the client itself. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add an explanatory comment. Created 9 years 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 this.plugin = null; 195 this.plugin = null;
196 } 196 }
197 }; 197 };
198 198
199 /** 199 /**
200 * Deletes the <embed> element from the container and disconnects. 200 * Deletes the <embed> element from the container and disconnects.
201 * 201 *
202 * @return {void} Nothing. 202 * @return {void} Nothing.
203 */ 203 */
204 remoting.ClientSession.prototype.disconnect = function() { 204 remoting.ClientSession.prototype.disconnect = function() {
205 // The plugin won't send a state change notification, so we explicitly log
206 // the fact that the connection has closed.
207 this.logToServer.logClientSessionStateChange(
208 remoting.ClientSession.State.CLOSED,
209 remoting.ClientSession.ConnectionError.NONE);
205 if (remoting.wcs) { 210 if (remoting.wcs) {
206 remoting.wcs.setOnIq(function(stanza) {}); 211 remoting.wcs.setOnIq(function(stanza) {});
207 this.sendIq_( 212 this.sendIq_(
208 '<cli:iq ' + 213 '<cli:iq ' +
209 'to="' + this.hostJid + '" ' + 214 'to="' + this.hostJid + '" ' +
210 'type="set" ' + 215 'type="set" ' +
211 'id="session-terminate" ' + 216 'id="session-terminate" ' +
212 'xmlns:cli="jabber:client">' + 217 'xmlns:cli="jabber:client">' +
213 '<jingle ' + 218 '<jingle ' +
214 'xmlns="urn:xmpp:jingle:1" ' + 219 'xmlns="urn:xmpp:jingle:1" ' +
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 return { 416 return {
412 'video_bandwidth': this.plugin.videoBandwidth, 417 'video_bandwidth': this.plugin.videoBandwidth,
413 'video_frame_rate': this.plugin.videoFrameRate, 418 'video_frame_rate': this.plugin.videoFrameRate,
414 'capture_latency': this.plugin.videoCaptureLatency, 419 'capture_latency': this.plugin.videoCaptureLatency,
415 'encode_latency': this.plugin.videoEncodeLatency, 420 'encode_latency': this.plugin.videoEncodeLatency,
416 'decode_latency': this.plugin.videoDecodeLatency, 421 'decode_latency': this.plugin.videoDecodeLatency,
417 'render_latency': this.plugin.videoRenderLatency, 422 'render_latency': this.plugin.videoRenderLatency,
418 'roundtrip_latency': this.plugin.roundTripLatency 423 'roundtrip_latency': this.plugin.roundTripLatency
419 }; 424 };
420 }; 425 };
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