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

Unified Diff: content/public/common/common_param_traits.h

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RenderText fixup Created 8 years, 2 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: content/public/common/common_param_traits.h
diff --git a/content/public/common/common_param_traits.h b/content/public/common/common_param_traits.h
index 8128a9e7526007ca47cb8727d33b103e9ae0b3a5..ce5a668ce36b8d71b7ed779ada1601138f314b5f 100644
--- a/content/public/common/common_param_traits.h
+++ b/content/public/common/common_param_traits.h
@@ -33,6 +33,7 @@ class Point;
class Rect;
class RectF;
class Size;
+class Vector2d;
} // namespace gfx
namespace net {
@@ -82,6 +83,14 @@ struct CONTENT_EXPORT ParamTraits<gfx::Size> {
};
template <>
+struct CONTENT_EXPORT ParamTraits<gfx::Vector2d> {
+ typedef gfx::Vector2d param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static void Log(const param_type& p, std::string* l);
+};
+
+template <>
struct CONTENT_EXPORT ParamTraits<gfx::Rect> {
typedef gfx::Rect param_type;
static void Write(Message* m, const param_type& p);

Powered by Google App Engine
This is Rietveld 408576698