From 0d8ea70525f3c0805b0a474838917d0d1b5cd6a9 Mon Sep 17 00:00:00 2001 From: "ben@chromium.org" Date: Tue, 14 Oct 2008 17:03:07 +0000 Subject: Replace View::GetBounds(CRect* bounds) const; with gfx::Rect bounds() const. http://crbug.com/2186 Review URL: http://codereview.chromium.org/7136 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3348 0039d316-1c4b-4281-b951-d872f2087c98 --- base/gfx/rect.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'base/gfx') diff --git a/base/gfx/rect.h b/base/gfx/rect.h index 2f1a498..963470a 100644 --- a/base/gfx/rect.h +++ b/base/gfx/rect.h @@ -91,6 +91,11 @@ class Rect { // point (x + width, y + height) is not. bool Contains(int point_x, int point_y) const; + // Returns true if the specified point is contained by this rectangle. + bool Contains(const gfx::Point& point) const { + return Contains(point.x(), point.y()); + } + // Returns true if this rectangle contains the specified rectangle. bool Contains(const Rect& rect) const; -- cgit v1.1