OLD | NEW |
---|---|
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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
537 * errors should not be logged because the JID will be refreshed and the | 537 * errors should not be logged because the JID will be refreshed and the |
538 * connection retried. | 538 * connection retried. |
539 * | 539 * |
540 * @param {boolean} enable True to log host-offline errors; false to suppress. | 540 * @param {boolean} enable True to log host-offline errors; false to suppress. |
541 */ | 541 */ |
542 remoting.ClientSession.prototype.logHostOfflineErrors = function(enable) { | 542 remoting.ClientSession.prototype.logHostOfflineErrors = function(enable) { |
543 this.logHostOfflineErrors_ = enable; | 543 this.logHostOfflineErrors_ = enable; |
544 }; | 544 }; |
545 | 545 |
546 /** | 546 /** |
547 * Request pairing with the host for PIN-less authentication. | |
548 * | |
549 * @param {string} clientName The human-readable name of the client. | |
550 * @param {function(string, string):void} onDone Callback to receive the | |
551 * client id and shared secret when they are available. | |
552 */ | |
553 remoting.ClientSession.prototype.requestPairing = function(clientName, onDone) { | |
kelvinp
2015/04/02 23:28:09
No longer needed and pairing request will be route
| |
554 if (this.plugin_) { | |
555 this.plugin_.requestPairing(clientName, onDone); | |
556 } | |
557 }; | |
558 | |
559 /** | |
560 * Sends a clipboard item to the host. | 547 * Sends a clipboard item to the host. |
561 * | 548 * |
562 * @param {string} mimeType The MIME type of the clipboard item. | 549 * @param {string} mimeType The MIME type of the clipboard item. |
563 * @param {string} item The clipboard item. | 550 * @param {string} item The clipboard item. |
564 */ | 551 */ |
565 remoting.ClientSession.prototype.sendClipboardItem = function(mimeType, item) { | 552 remoting.ClientSession.prototype.sendClipboardItem = function(mimeType, item) { |
566 if (!this.plugin_) | 553 if (!this.plugin_) |
567 return; | 554 return; |
568 this.plugin_.sendClipboardItem(mimeType, item); | 555 this.plugin_.sendClipboardItem(mimeType, item); |
569 }; | 556 }; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
603 'https://docs.google.com/feeds/', | 590 'https://docs.google.com/feeds/', |
604 'https://www.googleapis.com/auth/drive' | 591 'https://www.googleapis.com/auth/drive' |
605 ]; | 592 ]; |
606 remoting.identity.getNewToken(googleDriveScopes). | 593 remoting.identity.getNewToken(googleDriveScopes). |
607 then(sendToken). | 594 then(sendToken). |
608 catch(remoting.Error.handler(sendError)); | 595 catch(remoting.Error.handler(sendError)); |
609 window.setTimeout(this.sendGoogleDriveAccessToken_.bind(this), | 596 window.setTimeout(this.sendGoogleDriveAccessToken_.bind(this), |
610 remoting.ACCESS_TOKEN_RESEND_INTERVAL_MS); | 597 remoting.ACCESS_TOKEN_RESEND_INTERVAL_MS); |
611 }; | 598 }; |
612 | 599 |
OLD | NEW |