summaryrefslogtreecommitdiffstats
path: root/chrome/views/accessibility
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/views/accessibility
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/views/accessibility')
-rw-r--r--chrome/views/accessibility/view_accessibility.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/chrome/views/accessibility/view_accessibility.cc b/chrome/views/accessibility/view_accessibility.cc
index 2790bb1..259eb5c 100644
--- a/chrome/views/accessibility/view_accessibility.cc
+++ b/chrome/views/accessibility/view_accessibility.cc
@@ -446,7 +446,7 @@ STDMETHODIMP ViewAccessibility::accLocation(LONG* x_left, LONG* y_top,
return E_INVALIDARG;
}
- CRect view_bounds(0, 0, 0, 0);
+ gfx::Rect view_bounds;
// Retrieving the parent View to be used for converting from view-to-screen
// coordinates.
ChromeViews::View* parent = view_->GetParent();
@@ -458,25 +458,26 @@ STDMETHODIMP ViewAccessibility::accLocation(LONG* x_left, LONG* y_top,
if (var_id.lVal == CHILDID_SELF) {
// Retrieve active View's bounds.
- view_->GetBounds(&view_bounds);
+ view_bounds = view_->bounds();
} else {
// Check to see if child is out-of-bounds.
if (!IsValidChild((var_id.lVal - 1), view_)) {
return E_INVALIDARG;
}
// Retrieve child bounds.
- view_->GetChildViewAt(var_id.lVal - 1)->GetBounds(&view_bounds);
+ view_bounds = view_->GetChildViewAt(var_id.lVal - 1)->bounds();
// Parent View is current View.
parent = view_;
}
- if (!view_bounds.IsRectNull()) {
- *width = view_bounds.Width();
- *height = view_bounds.Height();
+ if (!view_bounds.IsEmpty()) {
+ *width = view_bounds.width();
+ *height = view_bounds.height();
- ChromeViews::View::ConvertPointToScreen(parent, &view_bounds.TopLeft());
- *x_left = view_bounds.left;
- *y_top = view_bounds.top;
+ CPoint topleft = view_bounds.origin().ToPOINT();
+ ChromeViews::View::ConvertPointToScreen(parent, &topleft);
+ *x_left = topleft.x;
+ *y_top = topleft.y;
} else {
return E_FAIL;
}