| 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 "base/values.h" | 5 #include "base/values.h" |
| 6 #include "chrome/common/edit_command.h" | 6 #include "chrome/common/edit_command.h" |
| 7 #include "chrome/common/extensions/extension_extent.h" | 7 #include "chrome/common/extensions/extension_extent.h" |
| 8 #include "chrome/common/extensions/url_pattern.h" | 8 #include "chrome/common/extensions/url_pattern.h" |
| 9 #include "chrome/common/gpu_param_traits.h" | 9 #include "chrome/common/gpu_param_traits.h" |
| 10 #include "chrome/common/render_messages_params.h" | 10 #include "chrome/common/render_messages_params.h" |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 ReadParam(m, iter, &p->file_contents); | 765 ReadParam(m, iter, &p->file_contents); |
| 766 } | 766 } |
| 767 | 767 |
| 768 void ParamTraits<WebDropData>::Log(const param_type& p, std::string* l) { | 768 void ParamTraits<WebDropData>::Log(const param_type& p, std::string* l) { |
| 769 l->append("<WebDropData>"); | 769 l->append("<WebDropData>"); |
| 770 } | 770 } |
| 771 | 771 |
| 772 void ParamTraits<WebMenuItem>::Write(Message* m, const param_type& p) { | 772 void ParamTraits<WebMenuItem>::Write(Message* m, const param_type& p) { |
| 773 WriteParam(m, p.label); | 773 WriteParam(m, p.label); |
| 774 WriteParam(m, p.type); | 774 WriteParam(m, p.type); |
| 775 WriteParam(m, p.action); |
| 776 WriteParam(m, p.rtl); |
| 777 WriteParam(m, p.directional_override); |
| 775 WriteParam(m, p.enabled); | 778 WriteParam(m, p.enabled); |
| 776 WriteParam(m, p.checked); | 779 WriteParam(m, p.checked); |
| 777 WriteParam(m, p.action); | |
| 778 WriteParam(m, p.submenu); | 780 WriteParam(m, p.submenu); |
| 779 } | 781 } |
| 780 | 782 |
| 781 bool ParamTraits<WebMenuItem>::Read(const Message* m, | 783 bool ParamTraits<WebMenuItem>::Read(const Message* m, |
| 782 void** iter, | 784 void** iter, |
| 783 param_type* p) { | 785 param_type* p) { |
| 784 return | 786 return |
| 785 ReadParam(m, iter, &p->label) && | 787 ReadParam(m, iter, &p->label) && |
| 786 ReadParam(m, iter, &p->type) && | 788 ReadParam(m, iter, &p->type) && |
| 789 ReadParam(m, iter, &p->action) && |
| 790 ReadParam(m, iter, &p->rtl) && |
| 791 ReadParam(m, iter, &p->directional_override) && |
| 787 ReadParam(m, iter, &p->enabled) && | 792 ReadParam(m, iter, &p->enabled) && |
| 788 ReadParam(m, iter, &p->checked) && | 793 ReadParam(m, iter, &p->checked) && |
| 789 ReadParam(m, iter, &p->action) && | |
| 790 ReadParam(m, iter, &p->submenu); | 794 ReadParam(m, iter, &p->submenu); |
| 791 } | 795 } |
| 792 | 796 |
| 793 void ParamTraits<WebMenuItem>::Log(const param_type& p, std::string* l) { | 797 void ParamTraits<WebMenuItem>::Log(const param_type& p, std::string* l) { |
| 794 l->append("("); | 798 l->append("("); |
| 795 LogParam(p.label, l); | 799 LogParam(p.label, l); |
| 796 l->append(", "); | 800 l->append(", "); |
| 797 LogParam(p.type, l); | 801 LogParam(p.type, l); |
| 798 l->append(", "); | 802 l->append(", "); |
| 803 LogParam(p.action, l); |
| 804 l->append(", "); |
| 805 LogParam(p.rtl, l); |
| 806 l->append(", "); |
| 807 LogParam(p.directional_override, l); |
| 808 l->append(", "); |
| 799 LogParam(p.enabled, l); | 809 LogParam(p.enabled, l); |
| 800 l->append(", "); | 810 l->append(", "); |
| 801 LogParam(p.checked, l); | 811 LogParam(p.checked, l); |
| 802 l->append(", "); | 812 l->append(", "); |
| 803 LogParam(p.action, l); | |
| 804 l->append(", "); | |
| 805 LogParam(p.submenu, l); | 813 LogParam(p.submenu, l); |
| 806 l->append(")"); | 814 l->append(")"); |
| 807 } | 815 } |
| 808 | 816 |
| 809 void ParamTraits<URLPattern>::Write(Message* m, const param_type& p) { | 817 void ParamTraits<URLPattern>::Write(Message* m, const param_type& p) { |
| 810 WriteParam(m, p.valid_schemes()); | 818 WriteParam(m, p.valid_schemes()); |
| 811 WriteParam(m, p.GetAsString()); | 819 WriteParam(m, p.GetAsString()); |
| 812 } | 820 } |
| 813 | 821 |
| 814 bool ParamTraits<URLPattern>::Read(const Message* m, void** iter, | 822 bool ParamTraits<URLPattern>::Read(const Message* m, void** iter, |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1160 l->append("("); | 1168 l->append("("); |
| 1161 LogParam(p.pending_bytes, l); | 1169 LogParam(p.pending_bytes, l); |
| 1162 l->append(", "); | 1170 l->append(", "); |
| 1163 LogParam(p.hardware_delay_bytes, l); | 1171 LogParam(p.hardware_delay_bytes, l); |
| 1164 l->append(", "); | 1172 l->append(", "); |
| 1165 LogParam(p.timestamp, l); | 1173 LogParam(p.timestamp, l); |
| 1166 l->append(")"); | 1174 l->append(")"); |
| 1167 } | 1175 } |
| 1168 | 1176 |
| 1169 } // namespace IPC | 1177 } // namespace IPC |
| OLD | NEW |