Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: chrome/browser/ui/panels/docked_panel_strip.cc

Issue 9517010: Change panels to be able to turn off autoresize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix assert at the end of RenderWidget::Resize which fixes the tests on OSX. Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/panels/detached_panel_strip.cc ('k') | chrome/browser/ui/panels/overflow_panel_strip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/docked_panel_strip.cc
diff --git a/chrome/browser/ui/panels/docked_panel_strip.cc b/chrome/browser/ui/panels/docked_panel_strip.cc
index d4cd227cac19fd76788d5eb3f63be9239b8b3f14..4fa17f36da1860a14012d4f5790479b7200904c8 100644
--- a/chrome/browser/ui/panels/docked_panel_strip.cc
+++ b/chrome/browser/ui/panels/docked_panel_strip.cc
@@ -136,7 +136,7 @@ void DockedPanelStrip::AddPanel(Panel* panel) {
} else {
// Initialize the newly created panel. Does not bump any panels from strip.
- if (height == 0 && width == 0) {
+ if (height == 0 && width == 0 && panel_manager_->auto_sizing_enabled()) {
// Auto resizable is enabled only if no initial size is provided.
panel->SetAutoResizable(true);
} else {
@@ -458,7 +458,8 @@ void DockedPanelStrip::DecrementMinimizedPanels() {
}
void DockedPanelStrip::ResizePanelWindow(
- Panel* panel, const gfx::Size& preferred_window_size) {
+ Panel* panel,
+ const gfx::Size& preferred_window_size) {
// The panel width:
// * cannot grow or shrink to go beyond [min_width, max_width]
int new_width = preferred_window_size.width();
« no previous file with comments | « chrome/browser/ui/panels/detached_panel_strip.cc ('k') | chrome/browser/ui/panels/overflow_panel_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698