OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // This file is used to define IPC::ParamTraits<> specializations for a number | 5 // This file is used to define IPC::ParamTraits<> specializations for a number |
6 // of types so that they can be serialized over IPC. IPC::ParamTraits<> | 6 // of types so that they can be serialized over IPC. IPC::ParamTraits<> |
7 // specializations for basic types (like int and std::string) and types in the | 7 // specializations for basic types (like int and std::string) and types in the |
8 // 'base' project can be found in ipc/ipc_message_utils.h. This file contains | 8 // 'base' project can be found in ipc/ipc_message_utils.h. This file contains |
9 // specializations for types that are used by the content code, and which need | 9 // specializations for types that are used by the content code, and which need |
10 // manual serialization code. This is usually because they're not structs with | 10 // manual serialization code. This is usually because they're not structs with |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 NPIdentifier identifier; | 62 NPIdentifier identifier; |
63 }; | 63 }; |
64 | 64 |
65 } // namespace content | 65 } // namespace content |
66 | 66 |
67 namespace IPC { | 67 namespace IPC { |
68 | 68 |
69 template <> | 69 template <> |
70 struct ParamTraits<content::NPVariant_Param> { | 70 struct ParamTraits<content::NPVariant_Param> { |
71 typedef content::NPVariant_Param param_type; | 71 typedef content::NPVariant_Param param_type; |
72 static void Write(Message* m, const param_type& p); | 72 static void Write(base::Pickle* m, const param_type& p); |
73 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); | 73 static bool Read(const base::Pickle* m, |
| 74 base::PickleIterator* iter, |
| 75 param_type* r); |
74 static void Log(const param_type& p, std::string* l); | 76 static void Log(const param_type& p, std::string* l); |
75 }; | 77 }; |
76 | 78 |
77 template <> | 79 template <> |
78 struct ParamTraits<content::NPIdentifier_Param> { | 80 struct ParamTraits<content::NPIdentifier_Param> { |
79 typedef content::NPIdentifier_Param param_type; | 81 typedef content::NPIdentifier_Param param_type; |
80 static void Write(Message* m, const param_type& p); | 82 static void Write(base::Pickle* m, const param_type& p); |
81 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); | 83 static bool Read(const base::Pickle* m, |
| 84 base::PickleIterator* iter, |
| 85 param_type* r); |
82 static void Log(const param_type& p, std::string* l); | 86 static void Log(const param_type& p, std::string* l); |
83 }; | 87 }; |
84 | 88 |
85 } // namespace IPC | 89 } // namespace IPC |
86 | 90 |
87 #endif // CONTENT_CHILD_PLUGIN_PARAM_TRAITS_H_ | 91 #endif // CONTENT_CHILD_PLUGIN_PARAM_TRAITS_H_ |
OLD | NEW |