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

Unified Diff: chrome/common/render_messages.h

Issue 39252: A tricky fix for Issue 1845.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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.h
===================================================================
--- chrome/common/render_messages.h (revision 11937)
+++ chrome/common/render_messages.h (working copy)
@@ -38,6 +38,7 @@
#include "webkit/glue/webinputevent.h"
#include "webkit/glue/webplugin.h"
#include "webkit/glue/webpreferences.h"
+#include "webkit/glue/webtextdirection.h"
#include "webkit/glue/webview_delegate.h"
#if defined(OS_POSIX)
@@ -1833,7 +1834,40 @@
}
};
+template <>
+struct ParamTraits<WebTextDirection> {
+ typedef WebTextDirection param_type;
+ static void Write(Message* m, const param_type& p) {
+ m->WriteInt(p);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ int type;
+ if (!m->ReadInt(iter, &type))
+ return false;
+ *p = static_cast<WebTextDirection>(type);
+ return true;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ std::wstring control;
+ switch (p) {
+ case WEB_TEXT_DIRECTION_DEFAULT:
+ control = L"WEB_TEXT_DIRECTION_DEFAULT";
+ break;
+ case WEB_TEXT_DIRECTION_RTL:
+ control = L"WEB_TEXT_DIRECTION_RTL";
+ break;
+ case WEB_TEXT_DIRECTION_LTR:
+ control = L"WEB_TEXT_DIRECTION_LTR";
+ break;
+ default:
+ control = L"UNKNOWN";
+ break;
+ }
+ LogParam(control, l);
+ }
+};
+
} // namespace IPC
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view_win.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698