diff options
author | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-20 01:54:04 +0000 |
---|---|---|
committer | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-20 01:54:04 +0000 |
commit | d2a2a409f713ce9f28b8d40b3ed2ef9140057a38 (patch) | |
tree | 4e0f6cf3097fd7dd09e726fac7bd791409fd493b /content/common/clipboard_messages.h | |
parent | 7cb5029c99a5b3164e7b190538c245e0617b4fd9 (diff) | |
download | chromium_src-d2a2a409f713ce9f28b8d40b3ed2ef9140057a38.zip chromium_src-d2a2a409f713ce9f28b8d40b3ed2ef9140057a38.tar.gz chromium_src-d2a2a409f713ce9f28b8d40b3ed2ef9140057a38.tar.bz2 |
Implement Clipboard::ReadImage on Linux.
I split the IPC up into two parts on Linux--one that reads the image on the UI
thread, and a second part that encodes the image on the file thread before
replying. I've also switched it to send the data over shared memory instead of passing a (potentially) huge blob of data over IPC.
BUG=75237
TEST=Local testing.
Review URL: http://codereview.chromium.org/6871001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82212 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/clipboard_messages.h')
-rw-r--r-- | content/common/clipboard_messages.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/content/common/clipboard_messages.h b/content/common/clipboard_messages.h index 7fe14af..5b06d2f 100644 --- a/content/common/clipboard_messages.h +++ b/content/common/clipboard_messages.h @@ -7,6 +7,7 @@ #include <string> #include <vector> +#include "base/shared_memory.h" #include "content/common/common_param_traits.h" #include "ipc/ipc_message_macros.h" #include "ipc/ipc_param_traits.h" @@ -45,9 +46,10 @@ IPC_SYNC_MESSAGE_CONTROL1_2(ClipboardHostMsg_ReadHTML, ui::Clipboard::Buffer /* buffer */, string16 /* markup */, GURL /* url */) -IPC_SYNC_MESSAGE_CONTROL1_1(ClipboardHostMsg_ReadImage, +IPC_SYNC_MESSAGE_CONTROL1_2(ClipboardHostMsg_ReadImage, ui::Clipboard::Buffer /* buffer */, - std::string /* PNG-encoded image */) + base::SharedMemoryHandle /* PNG-encoded image */, + uint32 /* image size */) #if defined(OS_MACOSX) IPC_MESSAGE_CONTROL1(ClipboardHostMsg_FindPboardWriteStringAsync, string16 /* text */) |