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

Unified Diff: ipc/ipc_message_utils.h

Issue 1532813002: Replace IOSurfaceManager by directly passing IOSurface Mach ports over Chrome IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Windows compile Created 5 years 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
Index: ipc/ipc_message_utils.h
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
index 97b95e986a9237ee881594416e93ebefbf99b875..774b40e5c6e278373d521848aa6f2d601cef8db4 100644
--- a/ipc/ipc_message_utils.h
+++ b/ipc/ipc_message_utils.h
@@ -28,6 +28,10 @@
#include "ipc/ipc_param_traits.h"
#include "ipc/ipc_sync_message.h"
+#if defined(OS_MACOSX)
+#include "base/mac/scoped_mach_port.h"
+#endif
+
#if defined(COMPILER_GCC)
// GCC "helpfully" tries to inline template methods in release mode. Except we
// want the majority of the template junk being expanded once in the
@@ -926,6 +930,18 @@ struct IPC_EXPORT ParamTraits<MSG> {
};
#endif // defined(OS_WIN)
+// Mac ParamTraits -------------------------------------------------------------
+
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+template <>
+struct IPC_EXPORT ParamTraits<base::mac::ScopedRefCountedMachSendRight> {
+ typedef base::mac::ScopedRefCountedMachSendRight param_type;
+ static void Write(Message* m, const param_type p);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
erikchen 2015/12/21 23:00:38 Please add a comment indicating that Read() takes
Robert Sesek 2015/12/23 15:45:13 Done.
+ static void Log(const param_type& p, std::string* l);
+};
+#endif // defined(OS_MACOSX) && !defined(OS_IOS)
+
//-----------------------------------------------------------------------------
// Generic message subclasses

Powered by Google App Engine
This is Rietveld 408576698