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 PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ | 5 #ifndef PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ |
6 #define PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ | 6 #define PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 class SerializedVar; | 42 class SerializedVar; |
43 | 43 |
44 } // namespace proxy | 44 } // namespace proxy |
45 } // namespace ppapi | 45 } // namespace ppapi |
46 | 46 |
47 namespace IPC { | 47 namespace IPC { |
48 | 48 |
49 template<> | 49 template<> |
50 struct PPAPI_PROXY_EXPORT ParamTraits<PP_Bool> { | 50 struct PPAPI_PROXY_EXPORT ParamTraits<PP_Bool> { |
51 typedef PP_Bool param_type; | 51 typedef PP_Bool param_type; |
| 52 static void GetSize(base::PickleSizer* s, const param_type& p); |
52 static void Write(base::Pickle* m, const param_type& p); | 53 static void Write(base::Pickle* m, const param_type& p); |
53 static bool Read(const base::Pickle* m, | 54 static bool Read(const base::Pickle* m, |
54 base::PickleIterator* iter, | 55 base::PickleIterator* iter, |
55 param_type* r); | 56 param_type* r); |
56 static void Log(const param_type& p, std::string* l); | 57 static void Log(const param_type& p, std::string* l); |
57 }; | 58 }; |
58 | 59 |
59 template <> | 60 template <> |
60 struct PPAPI_PROXY_EXPORT ParamTraits<PP_NetAddress_Private> { | 61 struct PPAPI_PROXY_EXPORT ParamTraits<PP_NetAddress_Private> { |
61 typedef PP_NetAddress_Private param_type; | 62 typedef PP_NetAddress_Private param_type; |
| 63 static void GetSize(base::PickleSizer* s, const param_type& p); |
62 static void Write(base::Pickle* m, const param_type& p); | 64 static void Write(base::Pickle* m, const param_type& p); |
63 static bool Read(const base::Pickle* m, | 65 static bool Read(const base::Pickle* m, |
64 base::PickleIterator* iter, | 66 base::PickleIterator* iter, |
65 param_type* p); | 67 param_type* p); |
66 static void Log(const param_type& p, std::string* l); | 68 static void Log(const param_type& p, std::string* l); |
67 }; | 69 }; |
68 | 70 |
69 template <> | 71 template <> |
70 struct PPAPI_PROXY_EXPORT ParamTraits<PP_KeyInformation> { | 72 struct PPAPI_PROXY_EXPORT ParamTraits<PP_KeyInformation> { |
71 typedef PP_KeyInformation param_type; | 73 typedef PP_KeyInformation param_type; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 static void Write(base::Pickle* m, const param_type& p); | 137 static void Write(base::Pickle* m, const param_type& p); |
136 static bool Read(const base::Pickle* m, | 138 static bool Read(const base::Pickle* m, |
137 base::PickleIterator* iter, | 139 base::PickleIterator* iter, |
138 param_type* r); | 140 param_type* r); |
139 static void Log(const param_type& p, std::string* l); | 141 static void Log(const param_type& p, std::string* l); |
140 }; | 142 }; |
141 | 143 |
142 template<> | 144 template<> |
143 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::HostResource> { | 145 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::HostResource> { |
144 typedef ppapi::HostResource param_type; | 146 typedef ppapi::HostResource param_type; |
| 147 static void GetSize(base::PickleSizer* s, const param_type& p); |
145 static void Write(base::Pickle* m, const param_type& p); | 148 static void Write(base::Pickle* m, const param_type& p); |
146 static bool Read(const base::Pickle* m, | 149 static bool Read(const base::Pickle* m, |
147 base::PickleIterator* iter, | 150 base::PickleIterator* iter, |
148 param_type* r); | 151 param_type* r); |
149 static void Log(const param_type& p, std::string* l); | 152 static void Log(const param_type& p, std::string* l); |
150 }; | 153 }; |
151 | 154 |
152 template<> | 155 template<> |
153 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedVar> { | 156 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedVar> { |
154 typedef ppapi::proxy::SerializedVar param_type; | 157 typedef ppapi::proxy::SerializedVar param_type; |
(...skipping 11 matching lines...) Expand all Loading... |
166 static void Write(base::Pickle* m, const param_type& p); | 169 static void Write(base::Pickle* m, const param_type& p); |
167 static bool Read(const base::Pickle* m, | 170 static bool Read(const base::Pickle* m, |
168 base::PickleIterator* iter, | 171 base::PickleIterator* iter, |
169 param_type* r); | 172 param_type* r); |
170 static void Log(const param_type& p, std::string* l); | 173 static void Log(const param_type& p, std::string* l); |
171 }; | 174 }; |
172 | 175 |
173 template<> | 176 template<> |
174 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::PpapiPermissions> { | 177 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::PpapiPermissions> { |
175 typedef ppapi::PpapiPermissions param_type; | 178 typedef ppapi::PpapiPermissions param_type; |
| 179 static void GetSize(base::PickleSizer* s, const param_type& p); |
176 static void Write(base::Pickle* m, const param_type& p); | 180 static void Write(base::Pickle* m, const param_type& p); |
177 static bool Read(const base::Pickle* m, | 181 static bool Read(const base::Pickle* m, |
178 base::PickleIterator* iter, | 182 base::PickleIterator* iter, |
179 param_type* r); | 183 param_type* r); |
180 static void Log(const param_type& p, std::string* l); | 184 static void Log(const param_type& p, std::string* l); |
181 }; | 185 }; |
182 | 186 |
183 #if !defined(OS_NACL) && !defined(NACL_WIN64) | 187 #if !defined(OS_NACL) && !defined(NACL_WIN64) |
184 template <> | 188 template <> |
185 struct ParamTraits<ppapi::PepperFilePath> { | 189 struct ParamTraits<ppapi::PepperFilePath> { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 static void Write(base::Pickle* m, const param_type& p); | 222 static void Write(base::Pickle* m, const param_type& p); |
219 static bool Read(const base::Pickle* m, | 223 static bool Read(const base::Pickle* m, |
220 base::PickleIterator* iter, | 224 base::PickleIterator* iter, |
221 param_type* r); | 225 param_type* r); |
222 static void Log(const param_type& p, std::string* l); | 226 static void Log(const param_type& p, std::string* l); |
223 }; | 227 }; |
224 | 228 |
225 template<> | 229 template<> |
226 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::CompositorLayerData::Transform> { | 230 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::CompositorLayerData::Transform> { |
227 typedef ppapi::CompositorLayerData::Transform param_type; | 231 typedef ppapi::CompositorLayerData::Transform param_type; |
| 232 static void GetSize(base::PickleSizer* s, const param_type& p); |
228 static void Write(base::Pickle* m, const param_type& p); | 233 static void Write(base::Pickle* m, const param_type& p); |
229 static bool Read(const base::Pickle* m, | 234 static bool Read(const base::Pickle* m, |
230 base::PickleIterator* iter, | 235 base::PickleIterator* iter, |
231 param_type* r); | 236 param_type* r); |
232 static void Log(const param_type& p, std::string* l); | 237 static void Log(const param_type& p, std::string* l); |
233 }; | 238 }; |
234 | 239 |
235 } // namespace IPC | 240 } // namespace IPC |
236 | 241 |
237 #endif // PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ | 242 #endif // PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ |
OLD | NEW |