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

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

Issue 787033003: [Chromoting] Add ClientSession.Capability to enable Gnubby-based auth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | remoting/webapp/crd/js/desktop_remoting.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * The ClientSession class controls lifetime of the client plugin 9 * The ClientSession class controls lifetime of the client plugin
10 * object and provides the plugin with the functionality it needs to 10 * object and provides the plugin with the functionality it needs to
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 378
379 // Let the host know that we're interested in knowing whether or not it 379 // Let the host know that we're interested in knowing whether or not it
380 // rate limits desktop-resize requests. 380 // rate limits desktop-resize requests.
381 RATE_LIMIT_RESIZE_REQUESTS: 'rateLimitResizeRequests', 381 RATE_LIMIT_RESIZE_REQUESTS: 'rateLimitResizeRequests',
382 382
383 // Indicates that the client supports the video frame-recording extension. 383 // Indicates that the client supports the video frame-recording extension.
384 VIDEO_RECORDER: 'videoRecorder', 384 VIDEO_RECORDER: 'videoRecorder',
385 385
386 // Indicates that the client supports 'cast'ing the video stream to a 386 // Indicates that the client supports 'cast'ing the video stream to a
387 // cast-enabled device. 387 // cast-enabled device.
388 CAST: 'casting' 388 CAST: 'casting',
389
390 // When enabled, this capability results in the client informing the host
391 // that it supports Gnubby-based authentication.
392 GNUBBY_AUTH: 'gnubbyAuth'
389 }; 393 };
390 394
391 /** 395 /**
392 * The set of capabilities negotiated between the client and host. 396 * The set of capabilities negotiated between the client and host.
393 * @type {Array.<string>} 397 * @type {Array.<string>}
394 * @private 398 * @private
395 */ 399 */
396 remoting.ClientSession.prototype.capabilities_ = null; 400 remoting.ClientSession.prototype.capabilities_ = null;
397 401
398 /** 402 /**
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 console.error('Received unexpected gnubby message'); 1540 console.error('Received unexpected gnubby message');
1537 } 1541 }
1538 }; 1542 };
1539 1543
1540 /** 1544 /**
1541 * Create a gnubby auth handler and inform the host that gnubby auth is 1545 * Create a gnubby auth handler and inform the host that gnubby auth is
1542 * supported. 1546 * supported.
1543 * @private 1547 * @private
1544 */ 1548 */
1545 remoting.ClientSession.prototype.createGnubbyAuthHandler_ = function() { 1549 remoting.ClientSession.prototype.createGnubbyAuthHandler_ = function() {
1546 if (this.mode_ == remoting.ClientSession.Mode.ME2ME) { 1550 if (this.hasCapability_(remoting.ClientSession.Capability.GNUBBY_AUTH) &&
1551 this.mode_ == remoting.ClientSession.Mode.ME2ME) {
1547 this.gnubbyAuthHandler_ = new remoting.GnubbyAuthHandler(this); 1552 this.gnubbyAuthHandler_ = new remoting.GnubbyAuthHandler(this);
1548 // TODO(psj): Move to more generic capabilities mechanism. 1553 // TODO(psj): Move to more generic capabilities mechanism.
1549 this.sendGnubbyAuthMessage({'type': 'control', 'option': 'auth-v1'}); 1554 this.sendGnubbyAuthMessage({'type': 'control', 'option': 'auth-v1'});
1550 } 1555 }
1551 }; 1556 };
1552 1557
1553 /** 1558 /**
1554 * @return {{width: number, height: number}} The height of the window's client 1559 * @return {{width: number, height: number}} The height of the window's client
1555 * area. This differs between apps v1 and apps v2 due to the custom window 1560 * area. This differs between apps v1 and apps v2 due to the custom window
1556 * borders used by the latter. 1561 * borders used by the latter.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1661 * @param {string} data Contents of the extension message. 1666 * @param {string} data Contents of the extension message.
1662 * @return {boolean} True if the message was recognized, false otherwise. 1667 * @return {boolean} True if the message was recognized, false otherwise.
1663 */ 1668 */
1664 remoting.ClientSession.prototype.handleExtensionMessage = 1669 remoting.ClientSession.prototype.handleExtensionMessage =
1665 function(type, data) { 1670 function(type, data) {
1666 if (this.videoFrameRecorder_) { 1671 if (this.videoFrameRecorder_) {
1667 return this.videoFrameRecorder_.handleMessage(type, data); 1672 return this.videoFrameRecorder_.handleMessage(type, data);
1668 } 1673 }
1669 return false; 1674 return false;
1670 } 1675 }
OLDNEW
« no previous file with comments | « no previous file | remoting/webapp/crd/js/desktop_remoting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698