Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(702)

Unified Diff: ppapi/proxy/ppb_image_data_proxy.cc

Issue 11094060: Exclude host-side code from the NaCl IRT proxy build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/ppb_graphics_3d_proxy.cc ('k') | ppapi/proxy/ppb_instance_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_image_data_proxy.cc
===================================================================
--- ppapi/proxy/ppb_image_data_proxy.cc (revision 167150)
+++ ppapi/proxy/ppb_image_data_proxy.cc (working copy)
@@ -492,10 +492,11 @@
bool PPB_ImageData_Proxy::OnMessageReceived(const IPC::Message& msg) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(PPB_ImageData_Proxy, msg)
+#if !defined(OS_NACL)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBImageData_Create, OnHostMsgCreate)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBImageData_CreateNaCl,
OnHostMsgCreateNaCl)
-
+#endif
IPC_MESSAGE_HANDLER(PpapiMsg_PPBImageData_NotifyUnusedImageData,
OnPluginMsgNotifyUnusedImageData)
@@ -504,6 +505,7 @@
return handled;
}
+#if !defined(OS_NACL)
void PPB_ImageData_Proxy::OnHostMsgCreate(PP_Instance instance,
int32_t format,
const PP_Size& size,
@@ -511,11 +513,6 @@
HostResource* result,
std::string* image_data_desc,
ImageHandle* result_image_handle) {
-#if defined(OS_NACL)
- // This message should never be received in untrusted code. To minimize the
- // size of the IRT, we just don't handle it.
- return;
-#else
*result_image_handle = ImageData::NullHandle();
thunk::EnterResourceCreation enter(instance);
@@ -547,7 +544,6 @@
*result_image_handle = ImageData::HandleFromInt(handle);
#endif // defined(OS_WIN)
}
-#endif // defined(OS_NACL)
}
void PPB_ImageData_Proxy::OnHostMsgCreateNaCl(
@@ -558,11 +554,6 @@
HostResource* result,
std::string* image_data_desc,
ppapi::proxy::SerializedHandle* result_image_handle) {
-#if defined(OS_NACL)
- // This message should never be received in untrusted code. To minimize the
- // size of the IRT, we just don't handle it.
- return;
-#else
result_image_handle->set_null_shmem();
HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
if (!dispatcher)
@@ -604,8 +595,8 @@
result_image_handle->set_shmem(
dispatcher->ShareHandleWithRemote(platform_file, false),
byte_count);
-#endif // defined(OS_NACL)
}
+#endif // !defined(OS_NACL)
void PPB_ImageData_Proxy::OnPluginMsgNotifyUnusedImageData(
const HostResource& old_image_data) {
« no previous file with comments | « ppapi/proxy/ppb_graphics_3d_proxy.cc ('k') | ppapi/proxy/ppb_instance_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698