summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authortmdiep@chromium.org <tmdiep@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-18 22:44:41 +0000
committertmdiep@chromium.org <tmdiep@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-18 22:44:41 +0000
commit79f005f0376f73bd053545c045b3d2f9eafda11e (patch)
tree9b5218c695b98b57237856d9add8c66ecc6a83c5 /apps
parentcf5e989ddd7831b0d50e4b076b68ff8306b7c899 (diff)
downloadchromium_src-79f005f0376f73bd053545c045b3d2f9eafda11e.zip
chromium_src-79f005f0376f73bd053545c045b3d2f9eafda11e.tar.gz
chromium_src-79f005f0376f73bd053545c045b3d2f9eafda11e.tar.bz2
Set size constraints before native app window creation
This patch is a quick fix for the regression described in the bug. The window style, which disables maximize of fixed sized windows, is only set at window creation. Views uses InitParams and a delegate (which will be NativeAppWindowViews) for the initial state of a window. The constraints are taken from the delegate. BUG=351688 TEST=See bug for steps to reproduce and test. Review URL: https://codereview.chromium.org/198503002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257793 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps')
-rw-r--r--apps/ui/views/native_app_window_views.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/ui/views/native_app_window_views.cc b/apps/ui/views/native_app_window_views.cc
index dd70d1a..97e2cbb 100644
--- a/apps/ui/views/native_app_window_views.cc
+++ b/apps/ui/views/native_app_window_views.cc
@@ -37,6 +37,10 @@ void NativeAppWindowViews::Init(AppWindow* app_window,
frameless_ = create_params.frame == AppWindow::FRAME_NONE;
transparent_background_ = create_params.transparent_background;
resizable_ = create_params.resizable;
+ size_constraints_.set_minimum_size(
+ create_params.GetContentMinimumSize(gfx::Insets()));
+ size_constraints_.set_maximum_size(
+ create_params.GetContentMaximumSize(gfx::Insets()));
Observe(app_window_->web_contents());
window_ = new views::Widget;