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

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

Issue 1054273002: [Webapp Refactor] Implements remoting.Activity. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698