Chromium Code Reviews| 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 |