OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef IPC_IPC_MESSAGE_UTILS_H_ | 5 #ifndef IPC_IPC_MESSAGE_UTILS_H_ |
6 #define IPC_IPC_MESSAGE_UTILS_H_ | 6 #define IPC_IPC_MESSAGE_UTILS_H_ |
7 | 7 |
8 #include <limits.h> | 8 #include <limits.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
985 }; | 985 }; |
986 | 986 |
987 // IPC types ParamTraits ------------------------------------------------------- | 987 // IPC types ParamTraits ------------------------------------------------------- |
988 | 988 |
989 // A ChannelHandle is basically a platform-inspecific wrapper around the | 989 // A ChannelHandle is basically a platform-inspecific wrapper around the |
990 // fact that IPC endpoints are handled specially on POSIX. See above comments | 990 // fact that IPC endpoints are handled specially on POSIX. See above comments |
991 // on FileDescriptor for more background. | 991 // on FileDescriptor for more background. |
992 template<> | 992 template<> |
993 struct IPC_EXPORT ParamTraits<IPC::ChannelHandle> { | 993 struct IPC_EXPORT ParamTraits<IPC::ChannelHandle> { |
994 typedef ChannelHandle param_type; | 994 typedef ChannelHandle param_type; |
| 995 static void GetSize(base::PickleSizer* sizer, const param_type& p); |
995 static void Write(base::Pickle* m, const param_type& p); | 996 static void Write(base::Pickle* m, const param_type& p); |
996 static bool Read(const base::Pickle* m, | 997 static bool Read(const base::Pickle* m, |
997 base::PickleIterator* iter, | 998 base::PickleIterator* iter, |
998 param_type* r); | 999 param_type* r); |
999 static void Log(const param_type& p, std::string* l); | 1000 static void Log(const param_type& p, std::string* l); |
1000 }; | 1001 }; |
1001 | 1002 |
1002 template <> | 1003 template <> |
1003 struct IPC_EXPORT ParamTraits<LogData> { | 1004 struct IPC_EXPORT ParamTraits<LogData> { |
1004 typedef LogData param_type; | 1005 typedef LogData param_type; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1101 template <class ReplyParamType> | 1102 template <class ReplyParamType> |
1102 inline void LogReplyParamsToMessage(const ReplyParamType& reply_params, | 1103 inline void LogReplyParamsToMessage(const ReplyParamType& reply_params, |
1103 const Message* msg) {} | 1104 const Message* msg) {} |
1104 | 1105 |
1105 inline void ConnectMessageAndReply(const Message* msg, Message* reply) {} | 1106 inline void ConnectMessageAndReply(const Message* msg, Message* reply) {} |
1106 #endif | 1107 #endif |
1107 | 1108 |
1108 } // namespace IPC | 1109 } // namespace IPC |
1109 | 1110 |
1110 #endif // IPC_IPC_MESSAGE_UTILS_H_ | 1111 #endif // IPC_IPC_MESSAGE_UTILS_H_ |
OLD | NEW |