| 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 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 namespace base { | 35 namespace base { |
| 36 class DictionaryValue; | 36 class DictionaryValue; |
| 37 class FilePath; | 37 class FilePath; |
| 38 class ListValue; | 38 class ListValue; |
| 39 class NullableString16; | 39 class NullableString16; |
| 40 class Time; | 40 class Time; |
| 41 class TimeDelta; | 41 class TimeDelta; |
| 42 class TimeTicks; | 42 class TimeTicks; |
| 43 struct FileDescriptor; | 43 struct FileDescriptor; |
| 44 struct Nonce; |
| 44 | 45 |
| 45 #if (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_WIN) | 46 #if (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_WIN) |
| 46 class SharedMemoryHandle; | 47 class SharedMemoryHandle; |
| 47 #endif // (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_WIN) | 48 #endif // (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_WIN) |
| 48 } | 49 } |
| 49 | 50 |
| 50 namespace IPC { | 51 namespace IPC { |
| 51 | 52 |
| 52 struct ChannelHandle; | 53 struct ChannelHandle; |
| 53 | 54 |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 typedef base::TimeTicks param_type; | 661 typedef base::TimeTicks param_type; |
| 661 static void GetSize(base::PickleSizer* sizer, const param_type& p); | 662 static void GetSize(base::PickleSizer* sizer, const param_type& p); |
| 662 static void Write(base::Pickle* m, const param_type& p); | 663 static void Write(base::Pickle* m, const param_type& p); |
| 663 static bool Read(const base::Pickle* m, | 664 static bool Read(const base::Pickle* m, |
| 664 base::PickleIterator* iter, | 665 base::PickleIterator* iter, |
| 665 param_type* r); | 666 param_type* r); |
| 666 static void Log(const param_type& p, std::string* l); | 667 static void Log(const param_type& p, std::string* l); |
| 667 }; | 668 }; |
| 668 | 669 |
| 669 template <> | 670 template <> |
| 671 struct IPC_EXPORT ParamTraits<base::Nonce> { |
| 672 typedef base::Nonce param_type; |
| 673 static void GetSize(base::PickleSizer* sizer, const param_type& p); |
| 674 static void Write(base::Pickle* m, const param_type& p); |
| 675 static bool Read(const base::Pickle* m, |
| 676 base::PickleIterator* iter, |
| 677 param_type* r); |
| 678 static void Log(const param_type& p, std::string* l); |
| 679 }; |
| 680 |
| 681 template <> |
| 670 struct ParamTraits<std::tuple<>> { | 682 struct ParamTraits<std::tuple<>> { |
| 671 typedef std::tuple<> param_type; | 683 typedef std::tuple<> param_type; |
| 672 static void GetSize(base::PickleSizer* sizer, const param_type& p) {} | 684 static void GetSize(base::PickleSizer* sizer, const param_type& p) {} |
| 673 static void Write(base::Pickle* m, const param_type& p) {} | 685 static void Write(base::Pickle* m, const param_type& p) {} |
| 674 static bool Read(const base::Pickle* m, | 686 static bool Read(const base::Pickle* m, |
| 675 base::PickleIterator* iter, | 687 base::PickleIterator* iter, |
| 676 param_type* r) { | 688 param_type* r) { |
| 677 return true; | 689 return true; |
| 678 } | 690 } |
| 679 static void Log(const param_type& p, std::string* l) { | 691 static void Log(const param_type& p, std::string* l) { |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1140 template <class ReplyParamType> | 1152 template <class ReplyParamType> |
| 1141 inline void LogReplyParamsToMessage(const ReplyParamType& reply_params, | 1153 inline void LogReplyParamsToMessage(const ReplyParamType& reply_params, |
| 1142 const Message* msg) {} | 1154 const Message* msg) {} |
| 1143 | 1155 |
| 1144 inline void ConnectMessageAndReply(const Message* msg, Message* reply) {} | 1156 inline void ConnectMessageAndReply(const Message* msg, Message* reply) {} |
| 1145 #endif | 1157 #endif |
| 1146 | 1158 |
| 1147 } // namespace IPC | 1159 } // namespace IPC |
| 1148 | 1160 |
| 1149 #endif // IPC_IPC_MESSAGE_UTILS_H_ | 1161 #endif // IPC_IPC_MESSAGE_UTILS_H_ |
| OLD | NEW |