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 #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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 ParamTraits<PP_Bool>::Read(m, iter, &r->small_caps) && | 553 ParamTraits<PP_Bool>::Read(m, iter, &r->small_caps) && |
554 ParamTraits<int32_t>::Read(m, iter, &r->letter_spacing) && | 554 ParamTraits<int32_t>::Read(m, iter, &r->letter_spacing) && |
555 ParamTraits<int32_t>::Read(m, iter, &r->word_spacing); | 555 ParamTraits<int32_t>::Read(m, iter, &r->word_spacing); |
556 } | 556 } |
557 | 557 |
558 // static | 558 // static |
559 void ParamTraits<ppapi::proxy::SerializedFontDescription>::Log( | 559 void ParamTraits<ppapi::proxy::SerializedFontDescription>::Log( |
560 const param_type& p, | 560 const param_type& p, |
561 std::string* l) { | 561 std::string* l) { |
562 } | 562 } |
| 563 #endif // !defined(OS_NACL) && !defined(NACL_WIN64) |
| 564 |
| 565 // ppapi::proxy::SerializedTrueTypeFontDesc ------------------------------------ |
| 566 |
| 567 // static |
| 568 void ParamTraits<ppapi::proxy::SerializedTrueTypeFontDesc>::Write( |
| 569 Message* m, |
| 570 const param_type& p) { |
| 571 ParamTraits<std::string>::Write(m, p.family); |
| 572 ParamTraits<PP_TrueTypeFontFamily_Dev>::Write(m, p.generic_family); |
| 573 ParamTraits<PP_TrueTypeFontStyle_Dev>::Write(m, p.style); |
| 574 ParamTraits<PP_TrueTypeFontWeight_Dev>::Write(m, p.weight); |
| 575 ParamTraits<PP_TrueTypeFontWidth_Dev>::Write(m, p.width); |
| 576 ParamTraits<PP_TrueTypeFontCharset_Dev>::Write(m, p.charset); |
| 577 } |
| 578 |
| 579 // static |
| 580 bool ParamTraits<ppapi::proxy::SerializedTrueTypeFontDesc>::Read( |
| 581 const Message* m, |
| 582 PickleIterator* iter, |
| 583 param_type* r) { |
| 584 return |
| 585 ParamTraits<std::string>::Read(m, iter, &r->family) && |
| 586 ParamTraits<PP_TrueTypeFontFamily_Dev>::Read(m, iter, |
| 587 &r->generic_family) && |
| 588 ParamTraits<PP_TrueTypeFontStyle_Dev>::Read(m, iter, &r->style) && |
| 589 ParamTraits<PP_TrueTypeFontWeight_Dev>::Read(m, iter, &r->weight) && |
| 590 ParamTraits<PP_TrueTypeFontWidth_Dev>::Read(m, iter, &r->width) && |
| 591 ParamTraits<PP_TrueTypeFontCharset_Dev>::Read(m, iter, &r->charset); |
| 592 } |
| 593 |
| 594 // static |
| 595 void ParamTraits<ppapi::proxy::SerializedTrueTypeFontDesc>::Log( |
| 596 const param_type& p, |
| 597 std::string* l) { |
| 598 } |
563 | 599 |
| 600 #if !defined(OS_NACL) && !defined(NACL_WIN64) |
564 // ppapi::PepperFilePath ------------------------------------------------------- | 601 // ppapi::PepperFilePath ------------------------------------------------------- |
565 | 602 |
566 // static | 603 // static |
567 void ParamTraits<ppapi::PepperFilePath>::Write(Message* m, | 604 void ParamTraits<ppapi::PepperFilePath>::Write(Message* m, |
568 const param_type& p) { | 605 const param_type& p) { |
569 WriteParam(m, static_cast<unsigned>(p.domain())); | 606 WriteParam(m, static_cast<unsigned>(p.domain())); |
570 WriteParam(m, p.path()); | 607 WriteParam(m, p.path()); |
571 } | 608 } |
572 | 609 |
573 // static | 610 // static |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 param_type* r) { | 670 param_type* r) { |
634 return ParamTraits<ListValue>::Read(m, iter, &(r->values_)); | 671 return ParamTraits<ListValue>::Read(m, iter, &(r->values_)); |
635 } | 672 } |
636 | 673 |
637 // static | 674 // static |
638 void ParamTraits<ppapi::PPB_X509Certificate_Fields>::Log(const param_type& p, | 675 void ParamTraits<ppapi::PPB_X509Certificate_Fields>::Log(const param_type& p, |
639 std::string* l) { | 676 std::string* l) { |
640 } | 677 } |
641 | 678 |
642 } // namespace IPC | 679 } // namespace IPC |
OLD | NEW |