| Index: chrome/common/webkit_param_traits.h
|
| ===================================================================
|
| --- chrome/common/webkit_param_traits.h (revision 57932)
|
| +++ chrome/common/webkit_param_traits.h (working copy)
|
| @@ -62,39 +62,13 @@
|
| };
|
|
|
| template <>
|
| -struct ParamTraits<WebKit::WebConsoleMessage::Level> {
|
| - typedef WebKit::WebConsoleMessage::Level 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::string* l) {
|
| - LogParam(static_cast<int>(p), l);
|
| - }
|
| +struct SimilarTypeTraits<WebKit::WebConsoleMessage::Level> {
|
| + typedef int Type;
|
| };
|
|
|
| template <>
|
| -struct ParamTraits<WebKit::WebPopupType> {
|
| - typedef WebKit::WebPopupType 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::string* l) {
|
| - LogParam(static_cast<int>(p), l);
|
| - }
|
| +struct SimilarTypeTraits<WebKit::WebPopupType> {
|
| + typedef int Type;
|
| };
|
|
|
| template <>
|
| @@ -230,38 +204,13 @@
|
| };
|
|
|
| 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::string* l) {
|
| - LogParam(static_cast<int>(p), l);
|
| - }
|
| +struct SimilarTypeTraits<WebKit::WebTextDirection> {
|
| + typedef int Type;
|
| };
|
|
|
| template <>
|
| -struct ParamTraits<WebKit::WebDragOperation> {
|
| - typedef WebKit::WebDragOperation param_type;
|
| - static void Write(Message* m, const param_type& p) {
|
| - m->WriteInt(p);
|
| - }
|
| - static bool Read(const Message* m, void** iter, param_type* r) {
|
| - int temp;
|
| - bool res = m->ReadInt(iter, &temp);
|
| - *r = static_cast<param_type>(temp);
|
| - return res;
|
| - }
|
| - static void Log(const param_type& p, std::string* l) {
|
| - l->append(StringPrintf("%d", p));
|
| - }
|
| +struct SimilarTypeTraits<WebKit::WebDragOperation> {
|
| + typedef int Type;
|
| };
|
|
|
| template <>
|
| @@ -273,17 +222,8 @@
|
| };
|
|
|
| template <>
|
| - struct ParamTraits<WebKit::WebContextMenuData::MediaType> {
|
| - typedef WebKit::WebContextMenuData::MediaType param_type;
|
| - static void Write(Message* m, const param_type& p) {
|
| - m->WriteInt(p);
|
| - }
|
| - static bool Read(const Message* m, void** iter, param_type* r) {
|
| - int temp;
|
| - bool res = m->ReadInt(iter, &temp);
|
| - *r = static_cast<param_type>(temp);
|
| - return res;
|
| - }
|
| +struct SimilarTypeTraits<WebKit::WebContextMenuData::MediaType> {
|
| + typedef int Type;
|
| };
|
|
|
| template <>
|
|
|