summaryrefslogtreecommitdiffstats
path: root/views/view.h
diff options
context:
space:
mode:
authorerikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-08 21:09:11 +0000
committererikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-08 21:09:11 +0000
commit7ccc52b7e9a9792bc72e4852de9ac7e3ac189235 (patch)
tree42d4ad23dc0ae33cd3d5e465b5bc2ee5b56a0029 /views/view.h
parentefc6544b43973ee7dfed1f7e56986982e42ebee0 (diff)
downloadchromium_src-7ccc52b7e9a9792bc72e4852de9ac7e3ac189235.zip
chromium_src-7ccc52b7e9a9792bc72e4852de9ac7e3ac189235.tar.gz
chromium_src-7ccc52b7e9a9792bc72e4852de9ac7e3ac189235.tar.bz2
Add PreferredSizeChanged() to View to allow subviews to notify their parents that they'd really like another layout.R=skyTEST=none
Review URL: http://codereview.chromium.org/113133 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15680 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.h')
-rw-r--r--views/view.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/views/view.h b/views/view.h
index d2d8e52..e004e03 100644
--- a/views/view.h
+++ b/views/view.h
@@ -1056,6 +1056,13 @@ class View : public AcceleratorTarget {
// invoked for that view as well as all the children recursively.
virtual void VisibilityChanged(View* starting_from, bool is_visible);
+ // Called when the preferred size of a child view changed. This gives the
+ // parent an opportunity to do a fresh layout if that makes sense.
+ virtual void ChildPreferredSizeChanged(View* child) {}
+
+ // Simply calls ChildPreferredSizeChanged on the parent if there is one.
+ virtual void PreferredSizeChanged();
+
// Views must invoke this when the tooltip text they are to display changes.
void TooltipTextChanged();