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 |
11 // public members, or because the same type is being used in multiple | 11 // public members, or because the same type is being used in multiple |
12 // *_messages.h headers. | 12 // *_messages.h headers. |
13 | 13 |
14 #ifndef CONTENT_CHILD_PLUGIN_PARAM_TRAITS_H_ | 14 #ifndef CONTENT_CHILD_PLUGIN_PARAM_TRAITS_H_ |
15 #define CONTENT_CHILD_PLUGIN_PARAM_TRAITS_H_ | 15 #define CONTENT_CHILD_PLUGIN_PARAM_TRAITS_H_ |
16 | 16 |
17 #include <string> | 17 #include <string> |
18 #include "content/child/npruntime_util.h" | 18 |
| 19 #include "content/child/npapi/npruntime_util.h" |
19 #include "ipc/ipc_message.h" | 20 #include "ipc/ipc_message.h" |
20 #include "ipc/ipc_param_traits.h" | 21 #include "ipc/ipc_param_traits.h" |
21 | 22 |
22 namespace content { | 23 namespace content { |
23 | 24 |
24 // Define the NPVariant_Param struct and its enum here since it needs manual | 25 // Define the NPVariant_Param struct and its enum here since it needs manual |
25 // serialization code. | 26 // serialization code. |
26 enum NPVariant_ParamEnum { | 27 enum NPVariant_ParamEnum { |
27 NPVARIANT_PARAM_VOID, | 28 NPVARIANT_PARAM_VOID, |
28 NPVARIANT_PARAM_NULL, | 29 NPVARIANT_PARAM_NULL, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 struct ParamTraits<content::NPIdentifier_Param> { | 78 struct ParamTraits<content::NPIdentifier_Param> { |
78 typedef content::NPIdentifier_Param param_type; | 79 typedef content::NPIdentifier_Param param_type; |
79 static void Write(Message* m, const param_type& p); | 80 static void Write(Message* m, const param_type& p); |
80 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 81 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
81 static void Log(const param_type& p, std::string* l); | 82 static void Log(const param_type& p, std::string* l); |
82 }; | 83 }; |
83 | 84 |
84 } // namespace IPC | 85 } // namespace IPC |
85 | 86 |
86 #endif // CONTENT_CHILD_PLUGIN_PARAM_TRAITS_H_ | 87 #endif // CONTENT_CHILD_PLUGIN_PARAM_TRAITS_H_ |
OLD | NEW |