From 4dc69e7976ea44a8570feed29c2a233f23a9d074 Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Fri, 5 Mar 2010 23:07:51 +0000 Subject: Committing change from Gene Gutnik . Original change at http://codereview.chromium.org/667011. Add function to Pepper API to copy text from plugin to clipboard. This functionality is necessary for good user experience, since plugin may have a custom copy button, menu, shortcut for copy functionality. This is a simple text copy interface first, and later we might need more complex format (HTML maybe) as well as cut/paste functionality. BUG=none TEST=Call CopyClipboard from plugin. Try to paste in the text editor. Verify that paste inserts the same characters. Review URL: http://codereview.chromium.org/669187 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40791 0039d316-1c4b-4281-b951-d872f2087c98 --- third_party/npapi/bindings/npapi_extensions.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'third_party') diff --git a/third_party/npapi/bindings/npapi_extensions.h b/third_party/npapi/bindings/npapi_extensions.h index 011628e..2e18a6a 100644 --- a/third_party/npapi/bindings/npapi_extensions.h +++ b/third_party/npapi/bindings/npapi_extensions.h @@ -116,10 +116,17 @@ typedef NPDevice* (*NPAcquireDevicePtr)( NPP instance, NPDeviceID device); +/* Copy UTF-8 string into clipboard */ +typedef void (*NPCopyTextToClipboardPtr)( + NPP instance, + const char* content); + /* Pepper extensions */ struct NPExtensions { /* Device interface acquisition */ NPAcquireDevicePtr acquireDevice; + /* Clipboard functionality */ + NPCopyTextToClipboardPtr copyTextToClipboard; }; /* Events -------------------------------------------------------------------*/ -- cgit v1.1