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

Unified Diff: ui/views/view.cc

Issue 10795013: Rename bounds accessors to be intuitive and consistent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 | « ui/views/view.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index d200d03aeed93b2d6edcee1cc1873257d2eb3d84..2bd368deeb7c1dc2f5bc29cd26d2466a676b07a6 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -349,7 +349,7 @@ gfx::Rect View::GetVisibleBounds() const {
return vis_bounds;
}
-gfx::Rect View::GetScreenBounds() const {
+gfx::Rect View::GetBoundsInScreen() const {
gfx::Point origin;
View::ConvertPointToScreen(this, &origin);
return gfx::Rect(origin, size());
@@ -622,7 +622,7 @@ void View::ConvertPointToView(const View* source,
// API defines NULL |source| as returning the point in screen coordinates.
if (!source) {
*point = point->Subtract(
- root->GetWidget()->GetClientAreaScreenBounds().origin());
+ root->GetWidget()->GetClientAreaBoundsInScreen().origin());
}
}
@@ -651,7 +651,7 @@ void View::ConvertPointToScreen(const View* src, gfx::Point* p) {
const Widget* widget = src->GetWidget();
if (widget) {
ConvertPointToWidget(src, p);
- gfx::Rect r = widget->GetClientAreaScreenBounds();
+ gfx::Rect r = widget->GetClientAreaBoundsInScreen();
p->SetPoint(p->x() + r.x(), p->y() + r.y());
}
}
@@ -664,7 +664,7 @@ void View::ConvertPointFromScreen(const View* dst, gfx::Point* p) {
const views::Widget* widget = dst->GetWidget();
if (!widget)
return;
- const gfx::Rect r = widget->GetClientAreaScreenBounds();
+ const gfx::Rect r = widget->GetClientAreaBoundsInScreen();
p->Offset(-r.x(), -r.y());
views::View::ConvertPointFromWidget(dst, p);
}
« no previous file with comments | « ui/views/view.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698