diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-14 21:15:23 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-14 21:15:23 +0000 |
commit | 99304a704db0fbb0f65dea844da7422a21763d58 (patch) | |
tree | 3a58c46272d7a36e690df2040c47d028118d82b1 /base/gfx/rect.cc | |
parent | 96b667d273c25e55150785848942c51f1a98851b (diff) | |
download | chromium_src-99304a704db0fbb0f65dea844da7422a21763d58.zip chromium_src-99304a704db0fbb0f65dea844da7422a21763d58.tar.gz chromium_src-99304a704db0fbb0f65dea844da7422a21763d58.tar.bz2 |
get webframe_impl.cc to compile on linux
Includes changes from http://codereview.chromium.org/7244 by icefox (Torchmobile Inc.)
Review URL: http://codereview.chromium.org/7319
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3366 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/gfx/rect.cc')
-rw-r--r-- | base/gfx/rect.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/base/gfx/rect.cc b/base/gfx/rect.cc index b7e2942..0f9708c 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) { |