| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 ExtensionMsgStart, | 89 ExtensionMsgStart, |
| 90 VideoCaptureMsgStart, | 90 VideoCaptureMsgStart, |
| 91 QuotaMsgStart, | 91 QuotaMsgStart, |
| 92 IconMsgStart, | 92 IconMsgStart, |
| 93 TextInputClientMsgStart, | 93 TextInputClientMsgStart, |
| 94 ChromeUtilityMsgStart, | 94 ChromeUtilityMsgStart, |
| 95 MediaStreamMsgStart, | 95 MediaStreamMsgStart, |
| 96 LastIPCMsgStart // Must come last. | 96 LastIPCMsgStart // Must come last. |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 class DictionaryValue; | |
| 100 class FilePath; | 99 class FilePath; |
| 101 class ListValue; | |
| 102 class NullableString16; | 100 class NullableString16; |
| 103 | 101 |
| 104 namespace base { | 102 namespace base { |
| 103 class DictionaryValue; |
| 104 class ListValue; |
| 105 class Time; | 105 class Time; |
| 106 class TimeDelta; | 106 class TimeDelta; |
| 107 struct FileDescriptor; | 107 struct FileDescriptor; |
| 108 } | 108 } |
| 109 | 109 |
| 110 namespace IPC { | 110 namespace IPC { |
| 111 | 111 |
| 112 struct ChannelHandle; | 112 struct ChannelHandle; |
| 113 | 113 |
| 114 //----------------------------------------------------------------------------- | 114 //----------------------------------------------------------------------------- |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 | 375 |
| 376 return result; | 376 return result; |
| 377 } | 377 } |
| 378 static void Log(const param_type& p, std::string* l) { | 378 static void Log(const param_type& p, std::string* l) { |
| 379 l->append("<MSG>"); | 379 l->append("<MSG>"); |
| 380 } | 380 } |
| 381 }; | 381 }; |
| 382 #endif // defined(OS_WIN) | 382 #endif // defined(OS_WIN) |
| 383 | 383 |
| 384 template <> | 384 template <> |
| 385 struct ParamTraits<DictionaryValue> { | 385 struct ParamTraits<base::DictionaryValue> { |
| 386 typedef DictionaryValue param_type; | 386 typedef base::DictionaryValue param_type; |
| 387 static void Write(Message* m, const param_type& p); | 387 static void Write(Message* m, const param_type& p); |
| 388 static bool Read(const Message* m, void** iter, param_type* r); | 388 static bool Read(const Message* m, void** iter, param_type* r); |
| 389 static void Log(const param_type& p, std::string* l); | 389 static void Log(const param_type& p, std::string* l); |
| 390 }; | 390 }; |
| 391 | 391 |
| 392 template <> | 392 template <> |
| 393 struct ParamTraits<ListValue> { | 393 struct ParamTraits<base::ListValue> { |
| 394 typedef ListValue param_type; | 394 typedef base::ListValue param_type; |
| 395 static void Write(Message* m, const param_type& p); | 395 static void Write(Message* m, const param_type& p); |
| 396 static bool Read(const Message* m, void** iter, param_type* r); | 396 static bool Read(const Message* m, void** iter, param_type* r); |
| 397 static void Log(const param_type& p, std::string* l); | 397 static void Log(const param_type& p, std::string* l); |
| 398 }; | 398 }; |
| 399 | 399 |
| 400 template <> | 400 template <> |
| 401 struct ParamTraits<std::string> { | 401 struct ParamTraits<std::string> { |
| 402 typedef std::string param_type; | 402 typedef std::string param_type; |
| 403 static void Write(Message* m, const param_type& p) { | 403 static void Write(Message* m, const param_type& p) { |
| 404 m->WriteString(p); | 404 m->WriteString(p); |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1220 ReplyParam p(a, b, c, d, e); | 1220 ReplyParam p(a, b, c, d, e); |
| 1221 WriteParam(reply, p); | 1221 WriteParam(reply, p); |
| 1222 } | 1222 } |
| 1223 }; | 1223 }; |
| 1224 | 1224 |
| 1225 //----------------------------------------------------------------------------- | 1225 //----------------------------------------------------------------------------- |
| 1226 | 1226 |
| 1227 } // namespace IPC | 1227 } // namespace IPC |
| 1228 | 1228 |
| 1229 #endif // IPC_IPC_MESSAGE_UTILS_H_ | 1229 #endif // IPC_IPC_MESSAGE_UTILS_H_ |
| OLD | NEW |