OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/common/render_messages.h" | 5 #include "chrome/common/render_messages.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/common/edit_command.h" | 8 #include "chrome/common/edit_command.h" |
9 #include "chrome/common/extensions/extension_extent.h" | 9 #include "chrome/common/extensions/extension_extent.h" |
10 #include "chrome/common/extensions/url_pattern.h" | 10 #include "chrome/common/extensions/url_pattern.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 } | 87 } |
88 }; | 88 }; |
89 | 89 |
90 | 90 |
91 void ParamTraits<webkit_glue::FormField>::Write(Message* m, | 91 void ParamTraits<webkit_glue::FormField>::Write(Message* m, |
92 const param_type& p) { | 92 const param_type& p) { |
93 WriteParam(m, p.label()); | 93 WriteParam(m, p.label()); |
94 WriteParam(m, p.name()); | 94 WriteParam(m, p.name()); |
95 WriteParam(m, p.value()); | 95 WriteParam(m, p.value()); |
96 WriteParam(m, p.form_control_type()); | 96 WriteParam(m, p.form_control_type()); |
97 WriteParam(m, p.size()); | 97 WriteParam(m, p.max_length()); |
98 WriteParam(m, p.option_strings()); | 98 WriteParam(m, p.option_strings()); |
99 } | 99 } |
100 | 100 |
101 bool ParamTraits<webkit_glue::FormField>::Read(const Message* m, void** iter, | 101 bool ParamTraits<webkit_glue::FormField>::Read(const Message* m, void** iter, |
102 param_type* p) { | 102 param_type* p) { |
103 string16 label, name, value, form_control_type; | 103 string16 label, name, value, form_control_type; |
104 int size = 0; | 104 int max_length = 0; |
105 std::vector<string16> options; | 105 std::vector<string16> options; |
106 bool result = ReadParam(m, iter, &label); | 106 bool result = ReadParam(m, iter, &label); |
107 result = result && ReadParam(m, iter, &name); | 107 result = result && ReadParam(m, iter, &name); |
108 result = result && ReadParam(m, iter, &value); | 108 result = result && ReadParam(m, iter, &value); |
109 result = result && ReadParam(m, iter, &form_control_type); | 109 result = result && ReadParam(m, iter, &form_control_type); |
110 result = result && ReadParam(m, iter, &size); | 110 result = result && ReadParam(m, iter, &max_length); |
111 result = result && ReadParam(m, iter, &options); | 111 result = result && ReadParam(m, iter, &options); |
112 if (!result) | 112 if (!result) |
113 return false; | 113 return false; |
114 | 114 |
115 p->set_label(label); | 115 p->set_label(label); |
116 p->set_name(name); | 116 p->set_name(name); |
117 p->set_value(value); | 117 p->set_value(value); |
118 p->set_form_control_type(form_control_type); | 118 p->set_form_control_type(form_control_type); |
119 p->set_size(size); | 119 p->set_max_length(max_length); |
120 p->set_option_strings(options); | 120 p->set_option_strings(options); |
121 return true; | 121 return true; |
122 } | 122 } |
123 | 123 |
124 void ParamTraits<webkit_glue::FormField>::Log(const param_type& p, | 124 void ParamTraits<webkit_glue::FormField>::Log(const param_type& p, |
125 std::string* l) { | 125 std::string* l) { |
126 l->append("<FormField>"); | 126 l->append("<FormField>"); |
127 } | 127 } |
128 | 128 |
129 #if defined(OS_MACOSX) | 129 #if defined(OS_MACOSX) |
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 void ParamTraits<speech_input::SpeechInputResultItem>::Log(const param_type& p, | 1246 void ParamTraits<speech_input::SpeechInputResultItem>::Log(const param_type& p, |
1247 std::string* l) { | 1247 std::string* l) { |
1248 l->append("("); | 1248 l->append("("); |
1249 LogParam(p.utterance, l); | 1249 LogParam(p.utterance, l); |
1250 l->append(":"); | 1250 l->append(":"); |
1251 LogParam(p.confidence, l); | 1251 LogParam(p.confidence, l); |
1252 l->append(")"); | 1252 l->append(")"); |
1253 } | 1253 } |
1254 | 1254 |
1255 } // namespace IPC | 1255 } // namespace IPC |
OLD | NEW |