| Index: chrome/common/webkit_param_traits.cc
|
| diff --git a/chrome/common/webkit_param_traits.cc b/chrome/common/webkit_param_traits.cc
|
| index 12c885ac08070e5572a3aa039fe47b5b56ef0bc5..294ef5cb2304a0e1a9df3239c88c40bad1a9633f 100644
|
| --- a/chrome/common/webkit_param_traits.cc
|
| +++ b/chrome/common/webkit_param_traits.cc
|
| @@ -175,4 +175,45 @@ void ParamTraits<WebKit::WebCompositionUnderline>::Log(const param_type& p,
|
| l->append(")");
|
| }
|
|
|
| +void ParamTraits<WebKit::WebTextCheckingResult>::Write(Message* m,
|
| + const param_type& p) {
|
| + WriteParam(m, static_cast<int>(p.error()));
|
| + WriteParam(m, p.position());
|
| + WriteParam(m, p.length());
|
| +}
|
| +
|
| +bool ParamTraits<WebKit::WebTextCheckingResult>::Read(const Message* m,
|
| + void** iter,
|
| + param_type* p) {
|
| + int error = 0;
|
| + if (!ReadParam(m, iter, &error))
|
| + return false;
|
| + if (error != WebKit::WebTextCheckingResult::ErrorSpelling &&
|
| + error != WebKit::WebTextCheckingResult::ErrorGrammar)
|
| + return false;
|
| + int position = 0;
|
| + if (!ReadParam(m, iter, &position))
|
| + return false;
|
| + int length = 0;
|
| + if (!ReadParam(m, iter, &length))
|
| + return false;
|
| +
|
| + *p = WebKit::WebTextCheckingResult(
|
| + static_cast<WebKit::WebTextCheckingResult::Error>(error),
|
| + position,
|
| + length);
|
| + return true;
|
| +}
|
| +
|
| +void ParamTraits<WebKit::WebTextCheckingResult>::Log(const param_type& p,
|
| + std::string* l) {
|
| + l->append("(");
|
| + LogParam(static_cast<int>(p.error()), l);
|
| + l->append(", ");
|
| + LogParam(p.position(), l);
|
| + l->append(", ");
|
| + LogParam(p.length(), l);
|
| + l->append(")");
|
| +}
|
| +
|
| } // namespace IPC
|
|
|