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

Unified Diff: ppapi/proxy/serialized_structs.h

Issue 10796064: PPAPI/NaCl: Make nacl_ipc_adapter handle ImageData creation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sketch of idea for extracting handles generally Created 8 years, 5 months 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/resource_creation_proxy.cc ('k') | ppapi/thunk/ppb_image_data_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/serialized_structs.h
diff --git a/ppapi/proxy/serialized_structs.h b/ppapi/proxy/serialized_structs.h
index f1d90f21a2b936837a4217b6fc25c03b18da50de..b60e765bed8d76bbbe6a9ff46c6451dbedb780bc 100644
--- a/ppapi/proxy/serialized_structs.h
+++ b/ppapi/proxy/serialized_structs.h
@@ -109,6 +109,22 @@ struct PPPVideoCapture_Buffer {
base::SharedMemoryHandle handle;
};
+// When we share handles to NaCl, we need to know the size. So they should
+// always be provided to the plugin in this struct, so the size is always
+// available.
+struct SerializedSharedMemoryHandle {
+ base::SharedMemoryHandle handle;
+ uint32_t size;
+};
+
+// On Windows, we can't differentiate SharedMemoryHandle from
+// PlatformFileForTransit, since both are just typedefs to HANDLE. We use this
+// type so we can differentiate the two, since when passing the handle to NaCl,
+// we need to know which it is.
+struct SerializedFileDescriptor {
+ IPC::PlatformFileForTransit descriptor;
+};
+
#if defined(OS_WIN)
typedef HANDLE ImageHandle;
#elif defined(OS_MACOSX) || defined(OS_ANDROID)
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.cc ('k') | ppapi/thunk/ppb_image_data_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698