| 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 <algorithm> | 8 #include <algorithm> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #else | 38 #else |
| 39 #define IPC_MSG_NOINLINE __attribute__((noinline)); | 39 #define IPC_MSG_NOINLINE __attribute__((noinline)); |
| 40 #endif | 40 #endif |
| 41 #elif defined(COMPILER_MSVC) | 41 #elif defined(COMPILER_MSVC) |
| 42 // MSVC++ doesn't do this. | 42 // MSVC++ doesn't do this. |
| 43 #define IPC_MSG_NOINLINE | 43 #define IPC_MSG_NOINLINE |
| 44 #else | 44 #else |
| 45 #error "Please add the noinline property for your new compiler here." | 45 #error "Please add the noinline property for your new compiler here." |
| 46 #endif | 46 #endif |
| 47 | 47 |
| 48 class FilePath; | |
| 49 class NullableString16; | 48 class NullableString16; |
| 50 | 49 |
| 51 namespace base { | 50 namespace base { |
| 52 class DictionaryValue; | 51 class DictionaryValue; |
| 52 class FilePath; |
| 53 class ListValue; | 53 class ListValue; |
| 54 class Time; | 54 class Time; |
| 55 class TimeDelta; | 55 class TimeDelta; |
| 56 class TimeTicks; | 56 class TimeTicks; |
| 57 struct FileDescriptor; | 57 struct FileDescriptor; |
| 58 } | 58 } |
| 59 | 59 |
| 60 namespace IPC { | 60 namespace IPC { |
| 61 | 61 |
| 62 struct ChannelHandle; | 62 struct ChannelHandle; |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 template<> | 431 template<> |
| 432 struct IPC_EXPORT ParamTraits<base::FileDescriptor> { | 432 struct IPC_EXPORT ParamTraits<base::FileDescriptor> { |
| 433 typedef base::FileDescriptor param_type; | 433 typedef base::FileDescriptor param_type; |
| 434 static void Write(Message* m, const param_type& p); | 434 static void Write(Message* m, const param_type& p); |
| 435 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 435 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 436 static void Log(const param_type& p, std::string* l); | 436 static void Log(const param_type& p, std::string* l); |
| 437 }; | 437 }; |
| 438 #endif // defined(OS_POSIX) | 438 #endif // defined(OS_POSIX) |
| 439 | 439 |
| 440 template <> | 440 template <> |
| 441 struct IPC_EXPORT ParamTraits<FilePath> { | 441 struct IPC_EXPORT ParamTraits<base::FilePath> { |
| 442 typedef FilePath param_type; | 442 typedef base::FilePath param_type; |
| 443 static void Write(Message* m, const param_type& p); | 443 static void Write(Message* m, const param_type& p); |
| 444 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 444 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 445 static void Log(const param_type& p, std::string* l); | 445 static void Log(const param_type& p, std::string* l); |
| 446 }; | 446 }; |
| 447 | 447 |
| 448 template <> | 448 template <> |
| 449 struct IPC_EXPORT ParamTraits<base::ListValue> { | 449 struct IPC_EXPORT ParamTraits<base::ListValue> { |
| 450 typedef base::ListValue param_type; | 450 typedef base::ListValue param_type; |
| 451 static void Write(Message* m, const param_type& p); | 451 static void Write(Message* m, const param_type& p); |
| 452 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 452 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 860 template<typename TA, typename TB, typename TC, typename TD, typename TE> | 860 template<typename TA, typename TB, typename TC, typename TD, typename TE> |
| 861 static void WriteReplyParams(Message* reply, TA a, TB b, TC c, TD d, TE e) { | 861 static void WriteReplyParams(Message* reply, TA a, TB b, TC c, TD d, TE e) { |
| 862 ReplyParam p(a, b, c, d, e); | 862 ReplyParam p(a, b, c, d, e); |
| 863 WriteParam(reply, p); | 863 WriteParam(reply, p); |
| 864 } | 864 } |
| 865 }; | 865 }; |
| 866 | 866 |
| 867 } // namespace IPC | 867 } // namespace IPC |
| 868 | 868 |
| 869 #endif // IPC_IPC_MESSAGE_UTILS_H_ | 869 #endif // IPC_IPC_MESSAGE_UTILS_H_ |
| OLD | NEW |