diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-16 06:36:28 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-16 06:36:28 +0000 |
commit | 4873c7de675554a357717ddedc1fcaca2820de19 (patch) | |
tree | cd6446547d3b9d57f634187aecb1853c5ecbc8fb /chrome/common/webkit_param_traits.h | |
parent | 3b846396a90174835320be2ff50afe8dd4e31590 (diff) | |
download | chromium_src-4873c7de675554a357717ddedc1fcaca2820de19.zip chromium_src-4873c7de675554a357717ddedc1fcaca2820de19.tar.gz chromium_src-4873c7de675554a357717ddedc1fcaca2820de19.tar.bz2 |
Reverting 20855.
Review URL: http://codereview.chromium.org/149744
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20859 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/webkit_param_traits.h')
-rw-r--r-- | chrome/common/webkit_param_traits.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/chrome/common/webkit_param_traits.h b/chrome/common/webkit_param_traits.h index 733694a..1263285 100644 --- a/chrome/common/webkit_param_traits.h +++ b/chrome/common/webkit_param_traits.h @@ -25,10 +25,12 @@ #include "chrome/common/ipc_message_utils.h" #include "webkit/api/public/WebCache.h" +#include "webkit/api/public/WebCompositionCommand.h" #include "webkit/api/public/WebConsoleMessage.h" #include "webkit/api/public/WebFindOptions.h" #include "webkit/api/public/WebInputEvent.h" #include "webkit/api/public/WebScreenInfo.h" +#include "webkit/api/public/WebTextDirection.h" namespace IPC { @@ -95,6 +97,24 @@ struct ParamTraits<WebKit::WebScreenInfo> { }; template <> +struct ParamTraits<WebKit::WebCompositionCommand> { + typedef WebKit::WebCompositionCommand param_type; + static void Write(Message* m, const param_type& p) { + WriteParam(m, static_cast<int>(p)); + } + static bool Read(const Message* m, void** iter, param_type* r) { + int value; + if (!ReadParam(m, iter, &value)) + return false; + *r = static_cast<param_type>(value); + return true; + } + static void Log(const param_type& p, std::wstring* l) { + LogParam(static_cast<int>(p), l); + } +}; + +template <> struct ParamTraits<WebKit::WebConsoleMessage::Level> { typedef WebKit::WebConsoleMessage::Level param_type; static void Write(Message* m, const param_type& p) { @@ -264,6 +284,24 @@ struct ParamTraits<WebKit::WebCache::ResourceTypeStats> { } }; +template <> +struct ParamTraits<WebKit::WebTextDirection> { + typedef WebKit::WebTextDirection param_type; + static void Write(Message* m, const param_type& p) { + WriteParam(m, static_cast<int>(p)); + } + static bool Read(const Message* m, void** iter, param_type* r) { + int value; + if (!ReadParam(m, iter, &value)) + return false; + *r = static_cast<param_type>(value); + return true; + } + static void Log(const param_type& p, std::wstring* l) { + LogParam(static_cast<int>(p), l); + } +}; + } // namespace IPC #endif // CHROME_COMMON_WEBKIT_PARAM_TRAITS_H_ |