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
diff --git a/views/view.h b/views/view.h
index d2d8e52..e004e039 100644
--- a/views/view.h
+++ b/views/view.h
@@ -1056,6 +1056,13 @@
// 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();