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

Unified Diff: remoting/webapp/crd/js/client_plugin_impl.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/crd/js/client_plugin.js ('k') | remoting/webapp/crd/js/client_session.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/client_plugin_impl.js
diff --git a/remoting/webapp/crd/js/client_plugin_impl.js b/remoting/webapp/crd/js/client_plugin_impl.js
index c3808b4bd98d49e6853a1279ac0e467f65115e82..0e0f916f83186f40ae64cf97fe6df6d8fb8baf8f 100644
--- a/remoting/webapp/crd/js/client_plugin_impl.js
+++ b/remoting/webapp/crd/js/client_plugin_impl.js
@@ -44,23 +44,12 @@ remoting.ClientPluginImpl = function(container,
/** @private {remoting.ClientPlugin.ConnectionEventHandler} */
this.connectionEventHandler_ = null;
- /**
- * @param {string} data Remote gnubbyd data.
- * @private
- */
- this.onGnubbyAuthHandler_ = function(data) {};
- /**
- * @param {string} url
- * @param {number} hotspotX
- * @param {number} hotspotY
- * @private
- */
- this.updateMouseCursorImage_ = function(url, hotspotX, hotspotY) {};
- /**
- * @param {string} data Remote cast extension message.
- * @private
- */
- this.onCastExtensionHandler_ = function(data) {};
+ /** @private {?function(string, number, number)} */
+ this.updateMouseCursorImage_ = base.doNothing;
+ /** @private {?function(string, string)} */
+ this.updateClipboardData_ = base.doNothing;
+ /** @private {?function(string)} */
+ this.onCastExtensionHandler_ = base.doNothing;
/** @private {?function({rects:Array<Array<number>>}):void} */
this.debugRegionHandler_ = null;
@@ -168,6 +157,13 @@ remoting.ClientPluginImpl.prototype.setMouseCursorHandler = function(handler) {
};
/**
+ * @param {function(string, string):void} handler
+ */
+remoting.ClientPluginImpl.prototype.setClipboardHandler = function(handler) {
+ this.updateClipboardData_ = handler;
+};
+
+/**
* @param {?function({rects:Array<Array<number>>}):void} handler
*/
remoting.ClientPluginImpl.prototype.setDebugDirtyRegionHandler =
@@ -310,9 +306,7 @@ remoting.ClientPluginImpl.prototype.handleMessageMethod_ = function(message) {
} else if (message.method == 'injectClipboardItem') {
var mimetype = base.getStringAttr(message.data, 'mimeType');
var item = base.getStringAttr(message.data, 'item');
- if (remoting.clipboard) {
- remoting.clipboard.fromHost(mimetype, item);
- }
+ this.updateClipboardData_(mimetype, item);
} else if (message.method == 'onFirstFrameReceived') {
if (remoting.clientSession) {
« no previous file with comments | « remoting/webapp/crd/js/client_plugin.js ('k') | remoting/webapp/crd/js/client_session.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698