summaryrefslogtreecommitdiffstats
path: root/remoting/webapp/crd/js/client_plugin.js
diff options
context:
space:
mode:
authorkelvinp <kelvinp@chromium.org>2015-04-08 20:46:58 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-09 03:47:30 +0000
commitbe79f477e4d1e66e2d80e7bcd5f9689f3fbbcefc (patch)
tree0c866c84bb52c1c01501ed6db00e689bc3762405 /remoting/webapp/crd/js/client_plugin.js
parent5a0107a25031f3ad52a5afa15acbb4fac4560d34 (diff)
downloadchromium_src-be79f477e4d1e66e2d80e7bcd5f9689f3fbbcefc.zip
chromium_src-be79f477e4d1e66e2d80e7bcd5f9689f3fbbcefc.tar.gz
chromium_src-be79f477e4d1e66e2d80e7bcd5f9689f3fbbcefc.tar.bz2
[Webapp Refactor] Clean up remoting.Clipboard.
Currently, remoting.Clipboard is exposed as a global, such that it can hook events across different files, e.g. remoting.js, client_plugin_impl.js, application.js This CL moves clean up the file by: 1. Only create an instance of the clipboard when a session is connected. This removes the startSession() method on the clipboard. 2. Hook all events (copy/paste/focus changes) from within remoting.clipboard, which eliminates the need to have a global and effectively makes all its methods private. 3. Style cleanups, use single quotes for strings, make sure private variables are post-fixed with underscores. BUG=475317 Review URL: https://codereview.chromium.org/1078563002 Cr-Commit-Position: refs/heads/master@{#324354}
Diffstat (limited to 'remoting/webapp/crd/js/client_plugin.js')
-rw-r--r--remoting/webapp/crd/js/client_plugin.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/remoting/webapp/crd/js/client_plugin.js b/remoting/webapp/crd/js/client_plugin.js
index e8b3f8d..31bb60e 100644
--- a/remoting/webapp/crd/js/client_plugin.js
+++ b/remoting/webapp/crd/js/client_plugin.js
@@ -157,8 +157,14 @@ remoting.ClientPlugin.prototype.setConnectionEventHandler =
* URL encoding the mouse cursor; the second and third parameters are
* the cursor hotspot's x- and y-coordinates, respectively.
*/
-remoting.ClientPlugin.prototype.setMouseCursorHandler =
- function(handler) {};
+remoting.ClientPlugin.prototype.setMouseCursorHandler = function(handler) {};
+
+/**
+ * @param {function(string, string):void} handler Callback for processing
+ * clipboard data injected from the host. The first parameter is the mime
+ * type and the second parameter is the actual data.
+ */
+remoting.ClientPlugin.prototype.setClipboardHandler = function(handler) {};
/**
* @param {function({rects:Array<Array<number>>}):void|null} handler Callback