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

Unified Diff: base/gfx/rect.cc

Issue 7244: Linux build fixes for webframe_imple.cc (Closed)
Patch Set: Linux build fixes for webframe_imple.cc Created 12 years, 2 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
« no previous file with comments | « base/gfx/rect.h ('k') | webkit/glue/webframe_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « base/gfx/rect.h ('k') | webkit/glue/webframe_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698