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

Unified Diff: mojo/services/public/cpp/geometry/geometry_type_converters.h

Issue 294833002: Mojo: more idiomatic C++ bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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: mojo/services/public/cpp/geometry/geometry_type_converters.h
diff --git a/mojo/services/public/cpp/geometry/geometry_type_converters.h b/mojo/services/public/cpp/geometry/geometry_type_converters.h
index e99d9f5e80c65b476c0636df2c557d6daa63fe99..3c09f6707be6ea75f424fab450ffd6a80f945866 100644
--- a/mojo/services/public/cpp/geometry/geometry_type_converters.h
+++ b/mojo/services/public/cpp/geometry/geometry_type_converters.h
@@ -12,30 +12,24 @@
namespace mojo {
template<>
-class MOJO_GEOMETRY_EXPORT TypeConverter<Point, gfx::Point> {
+class MOJO_GEOMETRY_EXPORT TypeConverter<PointPtr, gfx::Point> {
public:
- static Point ConvertFrom(const gfx::Point& input, Buffer* buf);
- static gfx::Point ConvertTo(const Point& input);
-
- MOJO_ALLOW_IMPLICIT_TYPE_CONVERSION();
+ static PointPtr ConvertFrom(const gfx::Point& input);
+ static gfx::Point ConvertTo(const PointPtr& input);
};
template<>
-class MOJO_GEOMETRY_EXPORT TypeConverter<Size, gfx::Size> {
+class MOJO_GEOMETRY_EXPORT TypeConverter<SizePtr, gfx::Size> {
public:
- static Size ConvertFrom(const gfx::Size& input, Buffer* buf);
- static gfx::Size ConvertTo(const Size& input);
-
- MOJO_ALLOW_IMPLICIT_TYPE_CONVERSION();
+ static SizePtr ConvertFrom(const gfx::Size& input);
+ static gfx::Size ConvertTo(const SizePtr& input);
};
template<>
-class MOJO_GEOMETRY_EXPORT TypeConverter<Rect, gfx::Rect> {
+class MOJO_GEOMETRY_EXPORT TypeConverter<RectPtr, gfx::Rect> {
public:
- static Rect ConvertFrom(const gfx::Rect& input, Buffer* buf);
- static gfx::Rect ConvertTo(const Rect& input);
-
- MOJO_ALLOW_IMPLICIT_TYPE_CONVERSION();
+ static RectPtr ConvertFrom(const gfx::Rect& input);
+ static gfx::Rect ConvertTo(const RectPtr& input);
};
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698