summaryrefslogtreecommitdiffstats
path: root/base/gfx/size.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/gfx/size.cc')
-rw-r--r--base/gfx/size.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/base/gfx/size.cc b/base/gfx/size.cc
index 76dc023..91f39c0 100644
--- a/base/gfx/size.cc
+++ b/base/gfx/size.cc
@@ -21,6 +21,19 @@ Size::Size(int width, int height) {
set_height(height);
}
+#if defined(OS_MACOSX)
+Size::Size(const CGSize& s) {
+ set_width(s.width);
+ set_height(s.height);
+}
+
+Size& Size::operator=(const CGSize& s) {
+ set_width(s.width);
+ set_height(s.height);
+ return *this;
+}
+#endif
+
#if defined(OS_WIN)
SIZE Size::ToSIZE() const {
SIZE s;