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

Side by Side Diff: remoting/webapp/session_connector_impl.js

Issue 592163002: Fix IT2Me. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback. Created 6 years, 3 months 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
« 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 * Connect set-up state machine for Me2Me and IT2Me 7 * Connect set-up state machine for Me2Me and IT2Me
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 */ 421 */
422 remoting.SessionConnectorImpl.prototype.onIT2MeHostInfo_ = function(xhr) { 422 remoting.SessionConnectorImpl.prototype.onIT2MeHostInfo_ = function(xhr) {
423 this.pendingXhr_ = null; 423 this.pendingXhr_ = null;
424 if (xhr.status == 200) { 424 if (xhr.status == 200) {
425 var host = /** @type {{data: {jabberId: string, publicKey: string}}} */ 425 var host = /** @type {{data: {jabberId: string, publicKey: string}}} */
426 jsonParseSafe(xhr.responseText); 426 jsonParseSafe(xhr.responseText);
427 if (host && host.data && host.data.jabberId && host.data.publicKey) { 427 if (host && host.data && host.data.jabberId && host.data.publicKey) {
428 this.hostJid_ = host.data.jabberId; 428 this.hostJid_ = host.data.jabberId;
429 this.hostPublicKey_ = host.data.publicKey; 429 this.hostPublicKey_ = host.data.publicKey;
430 this.hostDisplayName_ = this.hostJid_.split('/')[0]; 430 this.hostDisplayName_ = this.hostJid_.split('/')[0];
431 this.createSession_(); 431 this.connectSignaling_();
432 return; 432 return;
433 } else { 433 } else {
434 console.error('Invalid "support-hosts" response from server.'); 434 console.error('Invalid "support-hosts" response from server.');
435 } 435 }
436 } else { 436 } else {
437 this.onError_(this.translateSupportHostsError_(xhr.status)); 437 this.onError_(this.translateSupportHostsError_(xhr.status));
438 } 438 }
439 }; 439 };
440 440
441 /** 441 /**
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 * @param {function(remoting.Error):void} onError Callback on error. 603 * @param {function(remoting.Error):void} onError Callback on error.
604 * @param {function(string, string):boolean} onExtensionMessage The handler for 604 * @param {function(string, string):boolean} onExtensionMessage The handler for
605 * protocol extension messages. Returns true if a message is recognized; 605 * protocol extension messages. Returns true if a message is recognized;
606 * false otherwise. 606 * false otherwise.
607 */ 607 */
608 remoting.DefaultSessionConnectorFactory.prototype.createConnector = 608 remoting.DefaultSessionConnectorFactory.prototype.createConnector =
609 function(clientContainer, onConnected, onError, onExtensionMessage) { 609 function(clientContainer, onConnected, onError, onExtensionMessage) {
610 return new remoting.SessionConnectorImpl( 610 return new remoting.SessionConnectorImpl(
611 clientContainer, onConnected, onError, onExtensionMessage); 611 clientContainer, onConnected, onError, onExtensionMessage);
612 }; 612 };
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