Index: base/gfx/rect.cc |
diff --git a/base/gfx/rect.cc b/base/gfx/rect.cc |
index b7e2942fc94d0fa49dde9c059fa19e1ef8413dc8..0f9708c834f25612d773c3aba7b014aae5b50566 100644 |
--- a/base/gfx/rect.cc |
+++ b/base/gfx/rect.cc |
@@ -8,6 +8,8 @@ |
#include <windows.h> |
#elif defined(OS_MACOSX) |
#include <CoreGraphics/CGGeometry.h> |
+#elif defined(OS_LINUX) |
+#include <gdk/gdk.h> |
#endif |
#include "base/logging.h" |
@@ -68,6 +70,19 @@ Rect& Rect::operator=(const CGRect& r) { |
set_height(r.size.height); |
return *this; |
} |
+#elif defined(OS_LINUX) |
+Rect::Rect(const GdkRectangle& r) |
+ : origin_(r.x, r.y) { |
+ set_width(r.width); |
+ set_height(r.height); |
+} |
+ |
+Rect& Rect::operator=(const GdkRectangle& r) { |
+ origin_.SetPoint(r.x, r.y); |
+ set_width(r.width); |
+ set_height(r.height); |
+ return *this; |
+} |
#endif |
void Rect::set_width(int width) { |