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

Unified Diff: mojo/services/native_viewport/geometry_conversions.h

Issue 209453003: Add support for mojo::TypeConverter to control how convenient conversion should be. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/native_viewport/geometry_conversions.h
diff --git a/mojo/services/native_viewport/geometry_conversions.h b/mojo/services/native_viewport/geometry_conversions.h
index d459598fa48917b85d4c88880b8e67e780669251..2fee0c73b63c6755f2509fb19470c4dcdb976c90 100644
--- a/mojo/services/native_viewport/geometry_conversions.h
+++ b/mojo/services/native_viewport/geometry_conversions.h
@@ -22,6 +22,8 @@ public:
static gfx::Point ConvertTo(const Point& input) {
return gfx::Point(input.x(), input.y());
}
+
+ MOJO_ALLOW_DIRECT_TYPE_CONVERSION();
};
template<>
@@ -36,6 +38,8 @@ public:
static gfx::Size ConvertTo(const Size& input) {
return gfx::Size(input.width(), input.height());
}
+
+ MOJO_ALLOW_DIRECT_TYPE_CONVERSION();
};
template<>
@@ -51,6 +55,8 @@ class TypeConverter<Rect, gfx::Rect> {
return gfx::Rect(input.position().x(), input.position().y(),
input.size().width(), input.size().height());
}
+
+ MOJO_ALLOW_DIRECT_TYPE_CONVERSION();
};
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698