summaryrefslogtreecommitdiffstats
path: root/views/view.h
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-17 17:54:16 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-17 17:54:16 +0000
commit24db2eb971522174e9db9fef5f9a8b58a43854f9 (patch)
tree7c30d8bbb744171e6678ffe1203e9ccb951125a3 /views/view.h
parentd5a75354cdb7c8dc8aa0ec567b8b03df415bfd58 (diff)
downloadchromium_src-24db2eb971522174e9db9fef5f9a8b58a43854f9.zip
chromium_src-24db2eb971522174e9db9fef5f9a8b58a43854f9.tar.gz
chromium_src-24db2eb971522174e9db9fef5f9a8b58a43854f9.tar.bz2
Converts a couple of by value return types to const ref returns
types. Also expands on the documentation of GetViewForPoint. BUG=none TEST=none Review URL: http://codereview.chromium.org/149723 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20969 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.h')
-rw-r--r--views/view.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/views/view.h b/views/view.h
index b4c459c..ba892c1 100644
--- a/views/view.h
+++ b/views/view.h
@@ -137,11 +137,10 @@ class View : public AcceleratorTarget {
// This is the function subclasses should use whenever they need to obtain
// the bounds of one of their child views (for example, when implementing
// View::Layout()).
- // TODO(beng): Convert |bounds_| to a gfx::Rect.
- gfx::Rect bounds() const { return bounds_; }
+ const gfx::Rect& bounds() const { return bounds_; }
// Get the size of the View.
- gfx::Size size() const { return bounds_.size(); }
+ const gfx::Size& size() const { return bounds_.size(); }
// Return the bounds of the View, relative to the parent. If
// |settings| is IGNORE_MIRRORING_TRANSFORMATION, the function returns the
@@ -422,7 +421,7 @@ class View : public AcceleratorTarget {
// Get the number of child Views.
int GetChildViewCount() const;
- // Get the child View at the specified point.
+ // Returns the deepest descendant that contains the specified point.
virtual View* GetViewForPoint(const gfx::Point& point);
// Get the Widget that hosts this View, if any.