Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4368)

Unified Diff: chrome/common/render_messages.cc

Issue 6392045: Integrating Mac OS Grammar checker into Chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated the patch to catch up WebKit side changes. Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698