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

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

Issue 8568031: Call plugin.onIq() only when onIq is not null. (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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 this.clientJid = remoting.wcs.getJid(); 265 this.clientJid = remoting.wcs.getJid();
266 if (this.clientJid == '') { 266 if (this.clientJid == '') {
267 remoting.debug.log('Tried to connect without a full JID.'); 267 remoting.debug.log('Tried to connect without a full JID.');
268 } 268 }
269 remoting.debug.setJids(this.clientJid, this.hostJid); 269 remoting.debug.setJids(this.clientJid, this.hostJid);
270 /** @type {remoting.ClientSession} */ 270 /** @type {remoting.ClientSession} */
271 var that = this; 271 var that = this;
272 /** @param {string} stanza The IQ stanza received. */ 272 /** @param {string} stanza The IQ stanza received. */
273 var onIq = function(stanza) { 273 var onIq = function(stanza) {
274 remoting.debug.logIq(false, stanza); 274 remoting.debug.logIq(false, stanza);
275 that.plugin.onIq(stanza); 275 if (that.plugin.onIq)
Wez 2011/11/19 00:59:14 Do we want to log something different if there is
garykac 2011/11/19 01:12:49 +1 We shouldn't be logging the stanza if we didn't
Sergey Ulanov 2011/11/19 01:30:53 This function handles incoming messages, not outgo
Sergey Ulanov 2011/11/19 01:30:53 We don't send anything here, it's for incoming mes
276 that.plugin.onIq(stanza);
276 } 277 }
277 remoting.wcs.setOnIq(onIq); 278 remoting.wcs.setOnIq(onIq);
278 that.plugin.connect(this.hostJid, this.hostPublicKey, this.clientJid, 279 that.plugin.connect(this.hostJid, this.hostPublicKey, this.clientJid,
279 this.accessCode); 280 this.accessCode);
280 }; 281 };
281 282
282 /** 283 /**
283 * Callback that the plugin invokes to indicate that the connection 284 * Callback that the plugin invokes to indicate that the connection
284 * status has changed. 285 * status has changed.
285 */ 286 */
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 return { 409 return {
409 'video_bandwidth': this.plugin.videoBandwidth, 410 'video_bandwidth': this.plugin.videoBandwidth,
410 'video_frame_rate': this.plugin.videoFrameRate, 411 'video_frame_rate': this.plugin.videoFrameRate,
411 'capture_latency': this.plugin.videoCaptureLatency, 412 'capture_latency': this.plugin.videoCaptureLatency,
412 'encode_latency': this.plugin.videoEncodeLatency, 413 'encode_latency': this.plugin.videoEncodeLatency,
413 'decode_latency': this.plugin.videoDecodeLatency, 414 'decode_latency': this.plugin.videoDecodeLatency,
414 'render_latency': this.plugin.videoRenderLatency, 415 'render_latency': this.plugin.videoRenderLatency,
415 'roundtrip_latency': this.plugin.roundTripLatency 416 'roundtrip_latency': this.plugin.roundTripLatency
416 }; 417 };
417 }; 418 };
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