Index: chrome/browser/ui/panels/panel_manager.cc |
diff --git a/chrome/browser/ui/panels/panel_manager.cc b/chrome/browser/ui/panels/panel_manager.cc |
index b7669b3d4f05e7406ad9799f97d8a08ce83b648d..36ef7482b451015dd5f10c288714da8a75d22f3d 100644 |
--- a/chrome/browser/ui/panels/panel_manager.cc |
+++ b/chrome/browser/ui/panels/panel_manager.cc |
@@ -105,10 +105,13 @@ Panel* PanelManager::CreatePanel(Browser* browser) { |
int width = browser->override_bounds().width(); |
int height = browser->override_bounds().height(); |
- if (width == 0 && height == 0) { |
+ // Auto resizable is enabled only if no initial size is provided. |
+ bool auto_resize = (width == 0 && height == 0); |
+ |
+ if (width == 0) |
width = kPanelDefaultWidth; |
+ if (height == 0) |
height = kPanelDefaultHeight; |
- } |
int max_panel_width = GetMaxPanelWidth(); |
int max_panel_height = GetMaxPanelHeight(); |
@@ -127,8 +130,11 @@ Panel* PanelManager::CreatePanel(Browser* browser) { |
int x = GetRightMostAvailablePosition() - width; |
// Now create the panel with the computed bounds. |
- Panel* panel = new Panel(browser, gfx::Rect(x, y, width, height)); |
- panel->SetMaxSize(gfx::Size(max_panel_width, max_panel_height)); |
+ Panel* panel = new Panel(browser, |
+ gfx::Rect(x, y, width, height), |
+ gfx::Size(kPanelMinWidth, kPanelMinHeight), |
+ gfx::Size(max_panel_width, max_panel_height), |
+ auto_resize); |
panels_.push_back(panel); |
content::NotificationService::current()->Notify( |