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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 2742813003: [Mac] Lay out the browser window when adding the download shelf. (Closed)
Patch Set: Put a stray word away. Created 3 years, 9 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
Index: chrome/browser/ui/cocoa/browser_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
index bed90c3614d77c7d11dae9570dc14107f75765a1..652497078f183971beb29c8b338a7f3a6ee799ef 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -244,11 +244,11 @@ bool IsTabDetachingInFullscreenEnabled() {
[[window contentView] setWantsLayer:YES];
windowShim_.reset(new BrowserWindowCocoa(browser, self));
- // Set different minimum sizes on tabbed windows vs non-tabbed, e.g. popups.
// This has to happen before -enforceMinWindowSize: is called further down.
- NSSize minSize = [self isTabbedWindow] ?
- NSMakeSize(400, 272) : NSMakeSize(100, 122);
- [[self window] setMinSize:minSize];
+ [[self window]
+ setMinSize:(browser->is_type_tabbed() ? kMinCocoaTabbedWindowSize
+ : kMinCocoaPopupWindowSize)
+ .ToCGSize()];
// Lion will attempt to automagically save and restore the UI. This
// functionality appears to be leaky (or at least interacts badly with our
@@ -1361,6 +1361,7 @@ bool IsTabDetachingInFullscreenEnabled() {
downloadShelfController_.reset([[DownloadShelfController alloc]
initWithBrowser:browser_.get() resizeDelegate:self]);
[self.chromeContentView addSubview:[downloadShelfController_ view]];
+ [self layoutSubviews];
}
}
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.h ('k') | chrome/browser/ui/cocoa/browser_window_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698