Chromium Code Reviews| Index: chrome/common/render_messages.cc |
| diff --git a/chrome/common/render_messages.cc b/chrome/common/render_messages.cc |
| index be6b6dc91ffbfeb2b8957bbd87d28927d78a833e..47fb63afb87225afc4bd1dcdde27d67e53d0c2d2 100644 |
| --- a/chrome/common/render_messages.cc |
| +++ b/chrome/common/render_messages.cc |
| @@ -9,6 +9,7 @@ |
| #include "chrome/common/gpu_param_traits.h" |
| #include "chrome/common/render_messages_params.h" |
| #include "chrome/common/resource_response.h" |
| +#include "chrome/common/text_checking_result.h" |
| #include "chrome/common/thumbnail_score.h" |
| #include "chrome/common/web_apps.h" |
| #include "ipc/ipc_channel_handle.h" |
| @@ -1166,4 +1167,31 @@ void ParamTraits<AudioBuffersState>::Log(const param_type& p, std::string* l) { |
| l->append(")"); |
| } |
| +void ParamTraits<TextCheckingResult>::Write(Message* m, const param_type& p) { |
| + WriteParam(m, static_cast<int>(p.type)); |
| + WriteParam(m, p.location); |
| + WriteParam(m, p.length); |
| +} |
| + |
| +bool ParamTraits<TextCheckingResult>::Read(const Message* m, |
| + void** iter, |
| + param_type* p) { |
|
Hironori Bono
2011/02/09 05:43:51
nit: align parameters if possible.
gmorrita
2011/02/10 02:15:21
Done.
Note that the traits class is now for WebKi
|
| + int type; |
| + if (!ReadParam(m, iter, &type)) |
| + return false; |
| + p->type = static_cast<TextCheckingResult::Type>(type); |
| + return ReadParam(m, iter, &p->location) && |
| + ReadParam(m, iter, &p->length); |
| +} |
| + |
| +void ParamTraits<TextCheckingResult>::Log(const param_type& p, std::string* l) { |
| + l->append("("); |
| + LogParam(static_cast<int>(p.type), l); |
| + l->append(", "); |
| + LogParam(p.location, l); |
| + l->append(", "); |
| + LogParam(p.length, l); |
| + l->append(")"); |
| +} |
| + |
| } // namespace IPC |