diff options
Diffstat (limited to 'views/controls')
-rw-r--r-- | views/controls/native_view_host.cc | 5 | ||||
-rw-r--r-- | views/controls/native_view_host.h | 4 | ||||
-rw-r--r-- | views/controls/table/table_view.cc | 5 | ||||
-rw-r--r-- | views/controls/table/table_view.h | 2 |
4 files changed, 12 insertions, 4 deletions
diff --git a/views/controls/native_view_host.cc b/views/controls/native_view_host.cc index 3fc5fba..0e00aee 100644 --- a/views/controls/native_view_host.cc +++ b/views/controls/native_view_host.cc @@ -27,6 +27,11 @@ gfx::Size NativeViewHost::GetPreferredSize() { return preferred_size_; } +void NativeViewHost::SetPreferredSize(const gfx::Size& size) { + preferred_size_ = size; + PreferredSizeChanged(); +} + void NativeViewHost::Layout() { if (!native_view_) return; diff --git a/views/controls/native_view_host.h b/views/controls/native_view_host.h index 99b85b6..15cf98e 100644 --- a/views/controls/native_view_host.h +++ b/views/controls/native_view_host.h @@ -19,9 +19,7 @@ class NativeViewHost : public View { NativeViewHost(); virtual ~NativeViewHost(); - void set_preferred_size(const gfx::Size& size) { preferred_size_ = size; } - - // Returns the preferred size set via set_preferred_size. + void SetPreferredSize(const gfx::Size& size); virtual gfx::Size GetPreferredSize(); // Overriden to invoke Layout. 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(); } |