Index: content/common/common_param_traits.cc |
diff --git a/content/common/common_param_traits.cc b/content/common/common_param_traits.cc |
index 1e0ffd04e3d7eb26d59911878f63de0e7cf7530c..5e310036c4681abc26004ea0ce2b17b105b39896 100644 |
--- a/content/common/common_param_traits.cc |
+++ b/content/common/common_param_traits.cc |
@@ -9,6 +9,7 @@ |
#include "net/base/upload_data.h" |
#include "net/http/http_response_headers.h" |
#include "third_party/skia/include/core/SkBitmap.h" |
+#include "ui/base/range/range.h" |
#include "ui/gfx/rect.h" |
namespace { |
@@ -501,6 +502,24 @@ void ParamTraits<gfx::Rect>::Log(const gfx::Rect& p, std::string* l) { |
p.width(), p.height())); |
} |
+void ParamTraits<ui::Range>::Write(Message* m, const ui::Range& r) { |
+ m->WriteSize(r.start()); |
+ m->WriteSize(r.end()); |
+} |
+ |
+bool ParamTraits<ui::Range>::Read(const Message* m, void** iter, ui::Range* r) { |
+ size_t start, end; |
+ if (!m->ReadSize(iter, &start) || !m->ReadSize(iter, &end)) |
+ return false; |
+ r->set_start(start); |
+ r->set_end(end); |
+ return true; |
+} |
+ |
+void ParamTraits<ui::Range>::Log(const ui::Range& r, std::string* l) { |
+ l->append(base::StringPrintf("(%"PRIuS", %"PRIuS")", r.start(), r.end())); |
+} |
+ |
void ParamTraits<SkBitmap>::Write(Message* m, const SkBitmap& p) { |
size_t fixed_size = sizeof(SkBitmap_Data); |
SkBitmap_Data bmp_data; |