diff options
author | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-14 23:15:26 +0000 |
---|---|---|
committer | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-14 23:15:26 +0000 |
commit | 26004e2c66de0cf0dbae12e0adbda86972c817dd (patch) | |
tree | 6b36bdda63bf546dc2e396ba6ab21fe115b594bf /ppapi | |
parent | 5f31b9b4c100b95fb958cd22885aa6a60640ed2d (diff) | |
download | chromium_src-26004e2c66de0cf0dbae12e0adbda86972c817dd.zip chromium_src-26004e2c66de0cf0dbae12e0adbda86972c817dd.tar.gz chromium_src-26004e2c66de0cf0dbae12e0adbda86972c817dd.tar.bz2 |
Move the pepper clipboard host to the browser process
This moves the pepper clipboard host to the browser process. This refactor serves 2 purposes:
1) Avoids an extra hop through the renderer for clipboard operations through pepper.
2) Allows us to move the host from content/ into chrome/ where it is supposed to belong (according to brettw flash-related hosts should be in chrome/).
The host is converted to a ResourceMessageFilter so that clipboard operations are handled on the appropriate thread.
TBR=brettw
Review URL: https://codereview.chromium.org/11566038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182569 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/proxy/flash_clipboard_resource.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ppapi/proxy/flash_clipboard_resource.cc b/ppapi/proxy/flash_clipboard_resource.cc index 1ef90e2..5f06402 100644 --- a/ppapi/proxy/flash_clipboard_resource.cc +++ b/ppapi/proxy/flash_clipboard_resource.cc @@ -61,7 +61,7 @@ PP_Var ClipboardStringToPPVar(int32_t format, FlashClipboardResource::FlashClipboardResource( Connection connection, PP_Instance instance) : PluginResource(connection, instance) { - SendCreate(RENDERER, PpapiHostMsg_FlashClipboard_Create()); + SendCreate(BROWSER, PpapiHostMsg_FlashClipboard_Create()); } FlashClipboardResource::~FlashClipboardResource() { @@ -81,7 +81,7 @@ uint32_t FlashClipboardResource::RegisterCustomFormat( return format; int32_t result = SyncCall<PpapiPluginMsg_FlashClipboard_RegisterCustomFormatReply>( - RENDERER, + BROWSER, PpapiHostMsg_FlashClipboard_RegisterCustomFormat(format_name), &format); if (result != PP_OK || format == PP_FLASH_CLIPBOARD_FORMAT_INVALID) @@ -97,7 +97,7 @@ PP_Bool FlashClipboardResource::IsFormatAvailable( if (IsValidClipboardType(clipboard_type) && (FlashClipboardFormatRegistry::IsValidPredefinedFormat(format) || clipboard_formats_.IsFormatRegistered(format))) { - int32_t result = SyncCall<IPC::Message>(RENDERER, + int32_t result = SyncCall<IPC::Message>(BROWSER, PpapiHostMsg_FlashClipboard_IsFormatAvailable(clipboard_type, format)); return result == PP_OK ? PP_TRUE : PP_FALSE; } @@ -111,7 +111,7 @@ PP_Var FlashClipboardResource::ReadData( std::string value; int32_t result = SyncCall<PpapiPluginMsg_FlashClipboard_ReadDataReply>( - RENDERER, + BROWSER, PpapiHostMsg_FlashClipboard_ReadData(clipboard_type, format), &value); if (result != PP_OK) @@ -142,7 +142,7 @@ int32_t FlashClipboardResource::WriteData( data_items_vector.push_back(string); } - Post(RENDERER, + Post(BROWSER, PpapiHostMsg_FlashClipboard_WriteData( static_cast<uint32_t>(clipboard_type), formats_vector, |