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 NullableString16; | |
49 | |
50 namespace base { | 48 namespace base { |
51 class DictionaryValue; | 49 class DictionaryValue; |
52 class FilePath; | 50 class FilePath; |
53 class ListValue; | 51 class ListValue; |
| 52 class NullableString16; |
54 class Time; | 53 class Time; |
55 class TimeDelta; | 54 class TimeDelta; |
56 class TimeTicks; | 55 class TimeTicks; |
57 struct FileDescriptor; | 56 struct FileDescriptor; |
58 } | 57 } |
59 | 58 |
60 namespace IPC { | 59 namespace IPC { |
61 | 60 |
62 struct ChannelHandle; | 61 struct ChannelHandle; |
63 | 62 |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 | 446 |
448 template <> | 447 template <> |
449 struct IPC_EXPORT ParamTraits<base::ListValue> { | 448 struct IPC_EXPORT ParamTraits<base::ListValue> { |
450 typedef base::ListValue param_type; | 449 typedef base::ListValue param_type; |
451 static void Write(Message* m, const param_type& p); | 450 static void Write(Message* m, const param_type& p); |
452 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 451 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
453 static void Log(const param_type& p, std::string* l); | 452 static void Log(const param_type& p, std::string* l); |
454 }; | 453 }; |
455 | 454 |
456 template <> | 455 template <> |
457 struct IPC_EXPORT ParamTraits<NullableString16> { | 456 struct IPC_EXPORT ParamTraits<base::NullableString16> { |
458 typedef NullableString16 param_type; | 457 typedef base::NullableString16 param_type; |
459 static void Write(Message* m, const param_type& p); | 458 static void Write(Message* m, const param_type& p); |
460 static bool Read(const Message* m, PickleIterator* iter, | 459 static bool Read(const Message* m, PickleIterator* iter, |
461 param_type* r); | 460 param_type* r); |
462 static void Log(const param_type& p, std::string* l); | 461 static void Log(const param_type& p, std::string* l); |
463 }; | 462 }; |
464 | 463 |
465 template <> | 464 template <> |
466 struct IPC_EXPORT ParamTraits<base::PlatformFileInfo> { | 465 struct IPC_EXPORT ParamTraits<base::PlatformFileInfo> { |
467 typedef base::PlatformFileInfo param_type; | 466 typedef base::PlatformFileInfo param_type; |
468 static void Write(Message* m, const param_type& p); | 467 static void Write(Message* m, const param_type& p); |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 template<typename TA, typename TB, typename TC, typename TD, typename TE> | 866 template<typename TA, typename TB, typename TC, typename TD, typename TE> |
868 static void WriteReplyParams(Message* reply, TA a, TB b, TC c, TD d, TE e) { | 867 static void WriteReplyParams(Message* reply, TA a, TB b, TC c, TD d, TE e) { |
869 ReplyParam p(a, b, c, d, e); | 868 ReplyParam p(a, b, c, d, e); |
870 WriteParam(reply, p); | 869 WriteParam(reply, p); |
871 } | 870 } |
872 }; | 871 }; |
873 | 872 |
874 } // namespace IPC | 873 } // namespace IPC |
875 | 874 |
876 #endif // IPC_IPC_MESSAGE_UTILS_H_ | 875 #endif // IPC_IPC_MESSAGE_UTILS_H_ |
OLD | NEW |