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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #endif | 48 #endif |
49 | 49 |
50 namespace base { | 50 namespace base { |
51 class DictionaryValue; | 51 class DictionaryValue; |
52 class FilePath; | 52 class FilePath; |
53 class ListValue; | 53 class ListValue; |
54 class NullableString16; | 54 class NullableString16; |
55 class Time; | 55 class Time; |
56 class TimeDelta; | 56 class TimeDelta; |
57 class TimeTicks; | 57 class TimeTicks; |
| 58 class TraceTicks; |
58 struct FileDescriptor; | 59 struct FileDescriptor; |
59 } | 60 } |
60 | 61 |
61 namespace IPC { | 62 namespace IPC { |
62 | 63 |
63 struct ChannelHandle; | 64 struct ChannelHandle; |
64 | 65 |
65 // ----------------------------------------------------------------------------- | 66 // ----------------------------------------------------------------------------- |
66 // How we send IPC message logs across channels. | 67 // How we send IPC message logs across channels. |
67 struct IPC_EXPORT LogData { | 68 struct IPC_EXPORT LogData { |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 | 497 |
497 template <> | 498 template <> |
498 struct IPC_EXPORT ParamTraits<base::TimeTicks> { | 499 struct IPC_EXPORT ParamTraits<base::TimeTicks> { |
499 typedef base::TimeTicks param_type; | 500 typedef base::TimeTicks param_type; |
500 static void Write(Message* m, const param_type& p); | 501 static void Write(Message* m, const param_type& p); |
501 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 502 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
502 static void Log(const param_type& p, std::string* l); | 503 static void Log(const param_type& p, std::string* l); |
503 }; | 504 }; |
504 | 505 |
505 template <> | 506 template <> |
| 507 struct IPC_EXPORT ParamTraits<base::TraceTicks> { |
| 508 typedef base::TraceTicks param_type; |
| 509 static void Write(Message* m, const param_type& p); |
| 510 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 511 static void Log(const param_type& p, std::string* l); |
| 512 }; |
| 513 |
| 514 template <> |
506 struct ParamTraits<base::Tuple<>> { | 515 struct ParamTraits<base::Tuple<>> { |
507 typedef base::Tuple<> param_type; | 516 typedef base::Tuple<> param_type; |
508 static void Write(Message* m, const param_type& p) { | 517 static void Write(Message* m, const param_type& p) { |
509 } | 518 } |
510 static bool Read(const Message* m, PickleIterator* iter, param_type* r) { | 519 static bool Read(const Message* m, PickleIterator* iter, param_type* r) { |
511 return true; | 520 return true; |
512 } | 521 } |
513 static void Log(const param_type& p, std::string* l) { | 522 static void Log(const param_type& p, std::string* l) { |
514 } | 523 } |
515 }; | 524 }; |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 template <typename... Ts> | 918 template <typename... Ts> |
910 static void WriteReplyParams(Message* reply, Ts... args) { | 919 static void WriteReplyParams(Message* reply, Ts... args) { |
911 ReplyParam p(args...); | 920 ReplyParam p(args...); |
912 WriteParam(reply, p); | 921 WriteParam(reply, p); |
913 } | 922 } |
914 }; | 923 }; |
915 | 924 |
916 } // namespace IPC | 925 } // namespace IPC |
917 | 926 |
918 #endif // IPC_IPC_MESSAGE_UTILS_H_ | 927 #endif // IPC_IPC_MESSAGE_UTILS_H_ |
OLD | NEW |