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/pp_file_info.h" | 9 #include "ppapi/c/pp_file_info.h" |
10 #include "ppapi/c/pp_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 // static | 368 // static |
369 void ParamTraits<pp::proxy::SerializedFontDescription>::Log( | 369 void ParamTraits<pp::proxy::SerializedFontDescription>::Log( |
370 const param_type& p, | 370 const param_type& p, |
371 std::string* l) { | 371 std::string* l) { |
372 } | 372 } |
373 | 373 |
374 // HostResource ---------------------------------------------------------------- | 374 // HostResource ---------------------------------------------------------------- |
375 | 375 |
376 // static | 376 // static |
377 void ParamTraits<ppapi::HostResource>::Write(Message* m, | 377 void ParamTraits<ppapi::HostResource>::Write(Message* m, |
378 const param_type& p) { | 378 const param_type& p) { |
379 ParamTraits<PP_Instance>::Write(m, p.instance()); | 379 ParamTraits<PP_Instance>::Write(m, p.instance()); |
380 ParamTraits<PP_Resource>::Write(m, p.host_resource()); | 380 ParamTraits<PP_Resource>::Write(m, p.host_resource()); |
381 } | 381 } |
382 | 382 |
383 // static | 383 // static |
384 bool ParamTraits<ppapi::HostResource>::Read(const Message* m, | 384 bool ParamTraits<ppapi::HostResource>::Read(const Message* m, |
385 void** iter, | 385 void** iter, |
386 param_type* r) { | 386 param_type* r) { |
387 PP_Instance instance; | 387 PP_Instance instance; |
388 PP_Resource resource; | 388 PP_Resource resource; |
389 if (!ParamTraits<PP_Instance>::Read(m, iter, &instance) || | 389 if (!ParamTraits<PP_Instance>::Read(m, iter, &instance) || |
390 !ParamTraits<PP_Resource>::Read(m, iter, &resource)) | 390 !ParamTraits<PP_Resource>::Read(m, iter, &resource)) |
391 return false; | 391 return false; |
392 r->SetHostResource(instance, resource); | 392 r->SetHostResource(instance, resource); |
393 return true; | 393 return true; |
394 } | 394 } |
395 | 395 |
396 // static | 396 // static |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 param_type* r) { | 476 param_type* r) { |
477 return r->ReadFromMessage(m, iter); | 477 return r->ReadFromMessage(m, iter); |
478 } | 478 } |
479 | 479 |
480 // static | 480 // static |
481 void ParamTraits<pp::proxy::SerializedFlashMenu>::Log(const param_type& p, | 481 void ParamTraits<pp::proxy::SerializedFlashMenu>::Log(const param_type& p, |
482 std::string* l) { | 482 std::string* l) { |
483 } | 483 } |
484 | 484 |
485 } // namespace IPC | 485 } // namespace IPC |
OLD | NEW |