summaryrefslogtreecommitdiffstats
path: root/views/controls/table
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/controls/table
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/controls/table')
-rw-r--r--views/controls/table/table_view.cc5
-rw-r--r--views/controls/table/table_view.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/views/controls/table/table_view.cc b/views/controls/table/table_view.cc
index f8c7303..434b355 100644
--- a/views/controls/table/table_view.cc
+++ b/views/controls/table/table_view.cc
@@ -1372,6 +1372,11 @@ gfx::Size TableView::GetPreferredSize() {
return preferred_size_;
}
+void TableView::SetPreferredSize(const gfx::Size& size) {
+ preferred_size_ = size;
+ PreferredSizeChanged();
+}
+
void TableView::UpdateListViewCache0(int start, int length, bool add) {
if (is_sorted()) {
if (add)
diff --git a/views/controls/table/table_view.h b/views/controls/table/table_view.h
index 8061d27..20514c3 100644
--- a/views/controls/table/table_view.h
+++ b/views/controls/table/table_view.h
@@ -420,7 +420,7 @@ class TableView : public NativeControl,
// Sometimes we may want to size the TableView to a specific width and
// height.
virtual gfx::Size GetPreferredSize();
- void set_preferred_size(const gfx::Size& size) { preferred_size_ = size; }
+ void SetPreferredSize(const gfx::Size& size);
// Is the table sorted?
bool is_sorted() const { return !sort_descriptors_.empty(); }