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

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

Issue 1078563002: [Webapp Refactor] Clean up remoting.Clipboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove remoting.ClientSession.sendClipboardItem for real 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
« no previous file with comments | « remoting/webapp/crd/js/client_plugin_impl.js ('k') | remoting/webapp/crd/js/clipboard.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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 * errors should not be logged because the JID will be refreshed and the 560 * errors should not be logged because the JID will be refreshed and the
561 * connection retried. 561 * connection retried.
562 * 562 *
563 * @param {boolean} enable True to log host-offline errors; false to suppress. 563 * @param {boolean} enable True to log host-offline errors; false to suppress.
564 */ 564 */
565 remoting.ClientSession.prototype.logHostOfflineErrors = function(enable) { 565 remoting.ClientSession.prototype.logHostOfflineErrors = function(enable) {
566 this.logHostOfflineErrors_ = enable; 566 this.logHostOfflineErrors_ = enable;
567 }; 567 };
568 568
569 /** 569 /**
570 * Sends a clipboard item to the host.
571 *
572 * @param {string} mimeType The MIME type of the clipboard item.
573 * @param {string} item The clipboard item.
574 */
575 remoting.ClientSession.prototype.sendClipboardItem = function(mimeType, item) {
576 if (!this.plugin_)
577 return;
578 this.plugin_.sendClipboardItem(mimeType, item);
579 };
580
581 /**
582 * Sends an extension message to the host. 570 * Sends an extension message to the host.
583 * 571 *
584 * @param {string} type The message type. 572 * @param {string} type The message type.
585 * @param {string} message The message payload. 573 * @param {string} message The message payload.
586 */ 574 */
587 remoting.ClientSession.prototype.sendClientMessage = function(type, message) { 575 remoting.ClientSession.prototype.sendClientMessage = function(type, message) {
588 if (!this.plugin_) 576 if (!this.plugin_)
589 return; 577 return;
590 this.plugin_.sendClientMessage(type, message); 578 this.plugin_.sendClientMessage(type, message);
591 }; 579 };
(...skipping 21 matching lines...) Expand all
613 'https://docs.google.com/feeds/', 601 'https://docs.google.com/feeds/',
614 'https://www.googleapis.com/auth/drive' 602 'https://www.googleapis.com/auth/drive'
615 ]; 603 ];
616 remoting.identity.getNewToken(googleDriveScopes). 604 remoting.identity.getNewToken(googleDriveScopes).
617 then(sendToken). 605 then(sendToken).
618 catch(remoting.Error.handler(sendError)); 606 catch(remoting.Error.handler(sendError));
619 window.setTimeout(this.sendGoogleDriveAccessToken_.bind(this), 607 window.setTimeout(this.sendGoogleDriveAccessToken_.bind(this),
620 remoting.ACCESS_TOKEN_RESEND_INTERVAL_MS); 608 remoting.ACCESS_TOKEN_RESEND_INTERVAL_MS);
621 }; 609 };
622 610
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/client_plugin_impl.js ('k') | remoting/webapp/crd/js/clipboard.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698