diff options
| author | jeremya@chromium.org <jeremya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-01 07:23:20 +0000 |
|---|---|---|
| committer | jeremya@chromium.org <jeremya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-01 07:23:20 +0000 |
| commit | f8c3aead7e7812724f1c21bb697464aca0edd89b (patch) | |
| tree | 3ff4e4f79bffde7294991cb71c28ba7d3ef21c8e /chrome/browser | |
| parent | 6bba4d94f16790cdd0a0ef66b8d5d5c87ae51c2b (diff) | |
| download | chromium_src-f8c3aead7e7812724f1c21bb697464aca0edd89b.zip chromium_src-f8c3aead7e7812724f1c21bb697464aca0edd89b.tar.gz chromium_src-f8c3aead7e7812724f1c21bb697464aca0edd89b.tar.bz2 | |
Allow platform apps to specify a maximum size for the shell container.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/9452008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124380 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
| -rw-r--r-- | chrome/browser/ui/views/extensions/shell_window_views.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/chrome/browser/ui/views/extensions/shell_window_views.cc b/chrome/browser/ui/views/extensions/shell_window_views.cc index a53733f..524a37e 100644 --- a/chrome/browser/ui/views/extensions/shell_window_views.cc +++ b/chrome/browser/ui/views/extensions/shell_window_views.cc @@ -40,13 +40,16 @@ class ShellWindowFrameView : public views::NonClientFrameView { virtual void ResetWindowControls() OVERRIDE {} virtual void UpdateWindowIcon() OVERRIDE {} virtual gfx::Size GetMinimumSize() OVERRIDE; + virtual gfx::Size GetMaximumSize() OVERRIDE; void set_min_size(gfx::Size size) { min_size_ = size; } + void set_max_size(gfx::Size size) { max_size_ = size; } private: DISALLOW_COPY_AND_ASSIGN(ShellWindowFrameView); gfx::Size min_size_; + gfx::Size max_size_; }; ShellWindowFrameView::ShellWindowFrameView(): min_size_() { @@ -100,6 +103,9 @@ gfx::Size ShellWindowFrameView::GetMinimumSize() { return min_size_; } +gfx::Size ShellWindowFrameView::GetMaximumSize() { + return max_size_; +} ShellWindowViews::ShellWindowViews(ExtensionHost* host) : ShellWindow(host) { @@ -150,9 +156,12 @@ views::View* ShellWindowViews::GetContentsView() { views::NonClientFrameView* ShellWindowViews::CreateNonClientFrameView() { ShellWindowFrameView* frame_view = new ShellWindowFrameView(); - gfx::Size size(host_->extension()->launch_min_width(), - host_->extension()->launch_min_height()); - frame_view->set_min_size(size); + gfx::Size min_size(host_->extension()->launch_min_width(), + host_->extension()->launch_min_height()); + gfx::Size max_size(host_->extension()->launch_max_width(), + host_->extension()->launch_max_height()); + frame_view->set_min_size(min_size); + frame_view->set_max_size(max_size); return frame_view; } |
