| 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 static void Write(Message* m, const param_type& p); | 468 static void Write(Message* m, const param_type& p); |
| 469 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 469 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 470 static void Log(const param_type& p, std::string* l); | 470 static void Log(const param_type& p, std::string* l); |
| 471 }; | 471 }; |
| 472 | 472 |
| 473 template <> | 473 template <> |
| 474 struct SimilarTypeTraits<base::PlatformFileError> { | 474 struct SimilarTypeTraits<base::PlatformFileError> { |
| 475 typedef int Type; | 475 typedef int Type; |
| 476 }; | 476 }; |
| 477 | 477 |
| 478 #if defined(OS_WIN) |
| 479 template <> |
| 480 struct SimilarTypeTraits<HWND> { |
| 481 typedef HANDLE Type; |
| 482 }; |
| 483 #endif // defined(OS_WIN) |
| 484 |
| 478 template <> | 485 template <> |
| 479 struct IPC_EXPORT ParamTraits<base::Time> { | 486 struct IPC_EXPORT ParamTraits<base::Time> { |
| 480 typedef base::Time param_type; | 487 typedef base::Time param_type; |
| 481 static void Write(Message* m, const param_type& p); | 488 static void Write(Message* m, const param_type& p); |
| 482 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 489 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 483 static void Log(const param_type& p, std::string* l); | 490 static void Log(const param_type& p, std::string* l); |
| 484 }; | 491 }; |
| 485 | 492 |
| 486 template <> | 493 template <> |
| 487 struct IPC_EXPORT ParamTraits<base::TimeDelta> { | 494 struct IPC_EXPORT ParamTraits<base::TimeDelta> { |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 860 template<typename TA, typename TB, typename TC, typename TD, typename TE> | 867 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) { | 868 static void WriteReplyParams(Message* reply, TA a, TB b, TC c, TD d, TE e) { |
| 862 ReplyParam p(a, b, c, d, e); | 869 ReplyParam p(a, b, c, d, e); |
| 863 WriteParam(reply, p); | 870 WriteParam(reply, p); |
| 864 } | 871 } |
| 865 }; | 872 }; |
| 866 | 873 |
| 867 } // namespace IPC | 874 } // namespace IPC |
| 868 | 875 |
| 869 #endif // IPC_IPC_MESSAGE_UTILS_H_ | 876 #endif // IPC_IPC_MESSAGE_UTILS_H_ |
| OLD | NEW |