diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 23:07:51 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 23:07:51 +0000 |
commit | 4dc69e7976ea44a8570feed29c2a233f23a9d074 (patch) | |
tree | b962c98a66cfa284bd3d6453b1c66cf2338475c9 /third_party | |
parent | 3f8c5dfb8851026b8072a8da5779eca0a8e71116 (diff) | |
download | chromium_src-4dc69e7976ea44a8570feed29c2a233f23a9d074.zip chromium_src-4dc69e7976ea44a8570feed29c2a233f23a9d074.tar.gz chromium_src-4dc69e7976ea44a8570feed29c2a233f23a9d074.tar.bz2 |
Committing change from Gene Gutnik <gene@chromium.org>. 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
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/npapi/bindings/npapi_extensions.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 -------------------------------------------------------------------*/ |