diff options
author | jam <jam@chromium.org> | 2015-07-29 16:21:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-29 23:22:32 +0000 |
commit | 9c52faecd34dfd90735fe91c7ed8839853a33ca1 (patch) | |
tree | e0dfd1e051bac3f08038cfd84c1c5158ad6ca875 /mojo/converters | |
parent | e77f0e43314897c3039d798fa58991b060920361 (diff) | |
download | chromium_src-9c52faecd34dfd90735fe91c7ed8839853a33ca1.zip chromium_src-9c52faecd34dfd90735fe91c7ed8839853a33ca1.tar.gz chromium_src-9c52faecd34dfd90735fe91c7ed8839853a33ca1.tar.bz2 |
Bring up pdf_viewer app.
It'll be useful for things like component loader and OOPIF.
Review URL: https://codereview.chromium.org/1261673003
Cr-Commit-Position: refs/heads/master@{#341008}
Diffstat (limited to 'mojo/converters')
-rw-r--r-- | mojo/converters/geometry/geometry_type_converters.cc | 13 | ||||
-rw-r--r-- | mojo/converters/geometry/geometry_type_converters.h | 9 |
2 files changed, 22 insertions, 0 deletions
diff --git a/mojo/converters/geometry/geometry_type_converters.cc b/mojo/converters/geometry/geometry_type_converters.cc index fb17e03..00f4f34 100644 --- a/mojo/converters/geometry/geometry_type_converters.cc +++ b/mojo/converters/geometry/geometry_type_converters.cc @@ -102,4 +102,17 @@ gfx::Rect TypeConverter<gfx::Rect, Rect>::Convert(const Rect& input) { return gfx::Rect(input.x, input.y, input.width, input.height); } +// static +Size TypeConverter<Size, gfx::Size>::Convert(const gfx::Size& input) { + Size size; + size.width = input.width(); + size.height = input.height(); + return size; +} + +// static +gfx::Size TypeConverter<gfx::Size, Size>::Convert(const Size& input) { + return gfx::Size(input.width, input.height); +} + } // namespace mojo diff --git a/mojo/converters/geometry/geometry_type_converters.h b/mojo/converters/geometry/geometry_type_converters.h index f19939b..c184347 100644 --- a/mojo/converters/geometry/geometry_type_converters.h +++ b/mojo/converters/geometry/geometry_type_converters.h @@ -68,6 +68,15 @@ struct MOJO_GEOMETRY_EXPORT TypeConverter<gfx::Rect, Rect> { static gfx::Rect Convert(const Rect& input); }; +template <> +struct MOJO_GEOMETRY_EXPORT TypeConverter<Size, gfx::Size> { + static Size Convert(const gfx::Size& input); +}; +template <> +struct MOJO_GEOMETRY_EXPORT TypeConverter<gfx::Size, Size> { + static gfx::Size Convert(const Size& input); +}; + } // namespace mojo #endif // MOJO_CONVERTERS_GEOMETRY_GEOMETRY_TYPE_CONVERTERS_H_ |