| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_COMMON_IPC_MESSAGE_UTILS_H_ | 5 #ifndef CHROME_COMMON_IPC_MESSAGE_UTILS_H_ |
| 6 #define CHROME_COMMON_IPC_MESSAGE_UTILS_H_ | 6 #define CHROME_COMMON_IPC_MESSAGE_UTILS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 LogParam(p.b, l); | 936 LogParam(p.b, l); |
| 937 l->append(L", "); | 937 l->append(L", "); |
| 938 LogParam(p.c, l); | 938 LogParam(p.c, l); |
| 939 l->append(L", "); | 939 l->append(L", "); |
| 940 LogParam(p.d, l); | 940 LogParam(p.d, l); |
| 941 l->append(L", "); | 941 l->append(L", "); |
| 942 LogParam(p.e, l); | 942 LogParam(p.e, l); |
| 943 } | 943 } |
| 944 }; | 944 }; |
| 945 | 945 |
| 946 template <class A, class B, class C, class D, class E, class F> |
| 947 struct ParamTraits< Tuple6<A, B, C, D, E, F> > { |
| 948 typedef Tuple6<A, B, C, D, E, F> param_type; |
| 949 static void Write(Message* m, const param_type& p) { |
| 950 WriteParam(m, p.a); |
| 951 WriteParam(m, p.b); |
| 952 WriteParam(m, p.c); |
| 953 WriteParam(m, p.d); |
| 954 WriteParam(m, p.e); |
| 955 WriteParam(m, p.f); |
| 956 } |
| 957 static bool Read(const Message* m, void** iter, param_type* r) { |
| 958 return (ReadParam(m, iter, &r->a) && |
| 959 ReadParam(m, iter, &r->b) && |
| 960 ReadParam(m, iter, &r->c) && |
| 961 ReadParam(m, iter, &r->d) && |
| 962 ReadParam(m, iter, &r->e) && |
| 963 ReadParam(m, iter, &r->f)); |
| 964 } |
| 965 static void Log(const param_type& p, std::wstring* l) { |
| 966 LogParam(p.a, l); |
| 967 l->append(L", "); |
| 968 LogParam(p.b, l); |
| 969 l->append(L", "); |
| 970 LogParam(p.c, l); |
| 971 l->append(L", "); |
| 972 LogParam(p.d, l); |
| 973 l->append(L", "); |
| 974 LogParam(p.e, l); |
| 975 l->append(L", "); |
| 976 LogParam(p.f, l); |
| 977 } |
| 978 }; |
| 979 |
| 946 template <> | 980 template <> |
| 947 struct ParamTraits<webkit_glue::WebApplicationInfo> { | 981 struct ParamTraits<webkit_glue::WebApplicationInfo> { |
| 948 typedef webkit_glue::WebApplicationInfo param_type; | 982 typedef webkit_glue::WebApplicationInfo param_type; |
| 949 static void Write(Message* m, const param_type& p); | 983 static void Write(Message* m, const param_type& p); |
| 950 static bool Read(const Message* m, void** iter, param_type* r); | 984 static bool Read(const Message* m, void** iter, param_type* r); |
| 951 static void Log(const param_type& p, std::wstring* l); | 985 static void Log(const param_type& p, std::wstring* l); |
| 952 }; | 986 }; |
| 953 | 987 |
| 954 | 988 |
| 955 //----------------------------------------------------------------------------- | 989 //----------------------------------------------------------------------------- |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 l->append(L"<FindInPageRequest>"); | 1246 l->append(L"<FindInPageRequest>"); |
| 1213 } | 1247 } |
| 1214 }; | 1248 }; |
| 1215 | 1249 |
| 1216 //----------------------------------------------------------------------------- | 1250 //----------------------------------------------------------------------------- |
| 1217 | 1251 |
| 1218 } // namespace IPC | 1252 } // namespace IPC |
| 1219 | 1253 |
| 1220 #endif // CHROME_COMMON_IPC_MESSAGE_UTILS_H_ | 1254 #endif // CHROME_COMMON_IPC_MESSAGE_UTILS_H_ |
| 1221 | 1255 |
| OLD | NEW |