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 #include "ppapi/proxy/ppapi_param_traits.h" | 5 #include "ppapi/proxy/ppapi_param_traits.h" |
6 | 6 |
7 #include <string.h> // For memcpy | 7 #include <string.h> // For memcpy |
8 | 8 |
9 #include "ppapi/c/dev/pp_file_info_dev.h" | 9 #include "ppapi/c/dev/pp_file_info_dev.h" |
10 #include "ppapi/c/pp_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 ParamTraits<std::vector<PP_Point> >::Read(m, iter, &r->glyph_advances) && | 233 ParamTraits<std::vector<PP_Point> >::Read(m, iter, &r->glyph_advances) && |
234 r->glyph_indices.size() == r->glyph_advances.size(); | 234 r->glyph_indices.size() == r->glyph_advances.size(); |
235 } | 235 } |
236 | 236 |
237 // static | 237 // static |
238 void ParamTraits<pp::proxy::PPBFlash_DrawGlyphs_Params>::Log( | 238 void ParamTraits<pp::proxy::PPBFlash_DrawGlyphs_Params>::Log( |
239 const param_type& p, | 239 const param_type& p, |
240 std::string* l) { | 240 std::string* l) { |
241 } | 241 } |
242 | 242 |
| 243 // PPBFileRef_CreateInfo ------------------------------------------------------- |
| 244 |
| 245 // static |
| 246 void ParamTraits<pp::proxy::PPBFileRef_CreateInfo>::Write( |
| 247 Message* m, |
| 248 const param_type& p) { |
| 249 ParamTraits<pp::proxy::HostResource>::Write(m, p.resource); |
| 250 ParamTraits<int>::Write(m, p.file_system_type); |
| 251 ParamTraits<pp::proxy::SerializedVar>::Write(m, p.path); |
| 252 ParamTraits<pp::proxy::SerializedVar>::Write(m, p.name); |
| 253 } |
| 254 |
| 255 // static |
| 256 bool ParamTraits<pp::proxy::PPBFileRef_CreateInfo>::Read(const Message* m, |
| 257 void** iter, |
| 258 param_type* r) { |
| 259 return |
| 260 ParamTraits<pp::proxy::HostResource>::Read(m, iter, &r->resource) && |
| 261 ParamTraits<int>::Read(m, iter, &r->file_system_type) && |
| 262 ParamTraits<pp::proxy::SerializedVar>::Read(m, iter, &r->path) && |
| 263 ParamTraits<pp::proxy::SerializedVar>::Read(m, iter, &r->name); |
| 264 } |
| 265 |
| 266 // static |
| 267 void ParamTraits<pp::proxy::PPBFileRef_CreateInfo>::Log( |
| 268 const param_type& p, |
| 269 std::string* l) { |
| 270 } |
| 271 |
243 // PPBFont_DrawTextAt_Params --------------------------------------------------- | 272 // PPBFont_DrawTextAt_Params --------------------------------------------------- |
244 | 273 |
245 // static | 274 // static |
246 void ParamTraits<pp::proxy::PPBFont_DrawTextAt_Params>::Write( | 275 void ParamTraits<pp::proxy::PPBFont_DrawTextAt_Params>::Write( |
247 Message* m, | 276 Message* m, |
248 const param_type& p) { | 277 const param_type& p) { |
249 ParamTraits<pp::proxy::HostResource>::Write(m, p.font); | 278 ParamTraits<pp::proxy::HostResource>::Write(m, p.font); |
250 ParamTraits<pp::proxy::HostResource>::Write(m, p.image_data); | 279 ParamTraits<pp::proxy::HostResource>::Write(m, p.image_data); |
251 ParamTraits<PP_Bool>::Write(m, p.text_is_rtl); | 280 ParamTraits<PP_Bool>::Write(m, p.text_is_rtl); |
252 ParamTraits<PP_Bool>::Write(m, p.override_direction); | 281 ParamTraits<PP_Bool>::Write(m, p.override_direction); |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 return true; | 500 return true; |
472 } | 501 } |
473 | 502 |
474 // static | 503 // static |
475 void ParamTraits< std::vector<pp::proxy::SerializedVar> >::Log( | 504 void ParamTraits< std::vector<pp::proxy::SerializedVar> >::Log( |
476 const param_type& p, | 505 const param_type& p, |
477 std::string* l) { | 506 std::string* l) { |
478 } | 507 } |
479 | 508 |
480 } // namespace IPC | 509 } // namespace IPC |
OLD | NEW |