summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/constrained_window_impl.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-14 17:03:07 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-14 17:03:07 +0000
commit0d8ea70525f3c0805b0a474838917d0d1b5cd6a9 (patch)
tree6cbf491f10dae971bebe975e3fb623fc8a97a33b /chrome/browser/views/constrained_window_impl.cc
parent017b3cc2a4ade9e4e69f15bbd4721f149642d8a6 (diff)
downloadchromium_src-0d8ea70525f3c0805b0a474838917d0d1b5cd6a9.zip
chromium_src-0d8ea70525f3c0805b0a474838917d0d1b5cd6a9.tar.gz
chromium_src-0d8ea70525f3c0805b0a474838917d0d1b5cd6a9.tar.bz2
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
Diffstat (limited to 'chrome/browser/views/constrained_window_impl.cc')
-rw-r--r--chrome/browser/views/constrained_window_impl.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/chrome/browser/views/constrained_window_impl.cc b/chrome/browser/views/constrained_window_impl.cc
index 76e3eb1..34ce0d0 100644
--- a/chrome/browser/views/constrained_window_impl.cc
+++ b/chrome/browser/views/constrained_window_impl.cc
@@ -502,9 +502,6 @@ CPoint ConstrainedWindowNonClientView::GetSystemMenuPoint() const {
}
int ConstrainedWindowNonClientView::NonClientHitTest(const gfx::Point& point) {
- CRect bounds;
- CPoint test_point = point.ToPOINT();
-
// First see if it's within the grow box area, since that overlaps the client
// bounds.
int component = container_->client_view()->NonClientHitTest(point);
@@ -512,11 +509,11 @@ int ConstrainedWindowNonClientView::NonClientHitTest(const gfx::Point& point) {
return component;
// Then see if the point is within any of the window controls.
- close_button_->GetBounds(&bounds);
- if (bounds.PtInRect(test_point))
+ gfx::Rect button_bounds =
+ close_button_->GetBounds(APPLY_MIRRORING_TRANSFORMATION);
+ if (button_bounds.Contains(point))
return HTCLOSE;
- bounds = icon_bounds_.ToRECT();
- if (bounds.PtInRect(test_point))
+ if (icon_bounds_.Contains(point))
return HTSYSMENU;
component = GetHTComponentForFrame(point, kResizeAreaSize,
@@ -525,8 +522,7 @@ int ConstrainedWindowNonClientView::NonClientHitTest(const gfx::Point& point) {
window_delegate_->CanResize());
if (component == HTNOWHERE) {
// Finally fall back to the caption.
- GetBounds(&bounds, APPLY_MIRRORING_TRANSFORMATION);
- if (bounds.PtInRect(test_point))
+ if (bounds().Contains(point))
component = HTCAPTION;
// Otherwise, the point is outside the window's bounds.
}