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

Side by Side Diff: remoting/webapp/crd/js/desktop_remoting.js

Issue 1008003002: [Webapp Refactor] Implements Me2MeConnectFlow as an object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 9 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 | « remoting/webapp/crd/js/credentials_provider.js ('k') | remoting/webapp/crd/js/host.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 * This class implements the functionality that is specific to desktop 7 * This class implements the functionality that is specific to desktop
8 * remoting ("Chromoting" or CRD). 8 * remoting ("Chromoting" or CRD).
9 */ 9 */
10 10
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 sessionConnector.registerProtocolExtension( 202 sessionConnector.registerProtocolExtension(
203 new remoting.GnubbyAuthHandler()); 203 new remoting.GnubbyAuthHandler());
204 } 204 }
205 205
206 if (remoting.pairingRequested) { 206 if (remoting.pairingRequested) {
207 /** 207 /**
208 * @param {string} clientId 208 * @param {string} clientId
209 * @param {string} sharedSecret 209 * @param {string} sharedSecret
210 */ 210 */
211 var onPairingComplete = function(clientId, sharedSecret) { 211 var onPairingComplete = function(clientId, sharedSecret) {
212 var pairingInfo = {
213 pairingInfo: {
214 clientId: clientId,
215 sharedSecret: sharedSecret
216 }
217 };
218 var connector = remoting.app.getSessionConnector(); 212 var connector = remoting.app.getSessionConnector();
219 remoting.HostSettings.save(connector.getHostId(), pairingInfo); 213 var host = remoting.hostList.getHostForId(connector.getHostId());
214 host.options.pairingInfo.clientId = clientId;
215 host.options.pairingInfo.sharedSecret = sharedSecret;
216 host.options.save();
220 connector.updatePairingInfo(clientId, sharedSecret); 217 connector.updatePairingInfo(clientId, sharedSecret);
221 }; 218 };
222 // Use the platform name as a proxy for the local computer name. 219 // Use the platform name as a proxy for the local computer name.
223 // TODO(jamiewalch): Use a descriptive name for the local computer, for 220 // TODO(jamiewalch): Use a descriptive name for the local computer, for
224 // example, its Chrome Sync name. 221 // example, its Chrome Sync name.
225 var clientName = ''; 222 var clientName = '';
226 if (remoting.platformIsMac()) { 223 if (remoting.platformIsMac()) {
227 clientName = 'Mac'; 224 clientName = 'Mac';
228 } else if (remoting.platformIsWindows()) { 225 } else if (remoting.platformIsWindows()) {
229 clientName = 'Windows'; 226 clientName = 'Windows';
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 } else { 332 } else {
336 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_ME2ME); 333 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_ME2ME);
337 } 334 }
338 }; 335 };
339 336
340 /** 337 /**
341 * No cleanup required for desktop remoting. 338 * No cleanup required for desktop remoting.
342 */ 339 */
343 remoting.DesktopRemoting.prototype.handleExit = function() { 340 remoting.DesktopRemoting.prototype.handleExit = function() {
344 }; 341 };
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/credentials_provider.js ('k') | remoting/webapp/crd/js/host.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698