Index: chrome/browser/ui/cocoa/browser_window_cocoa.mm |
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm |
index 49285f37996e21d02f058fb99bf42fd6799e3d38..fe6dd8a1deae07703a4f01662758d33044f81874 100644 |
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm |
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm |
@@ -76,13 +76,16 @@ void BrowserWindowCocoa::ShowInactive() { |
} |
void BrowserWindowCocoa::SetBounds(const gfx::Rect& bounds) { |
+ gfx::Rect real_bounds = [controller_ enforceMinWindowSize:bounds]; |
+ |
SetFullscreen(false); |
- NSRect cocoa_bounds = NSMakeRect(bounds.x(), 0, bounds.width(), |
- bounds.height()); |
+ NSRect cocoa_bounds = NSMakeRect(real_bounds.x(), 0, |
+ real_bounds.width(), |
+ real_bounds.height()); |
// Flip coordinates based on the primary screen. |
NSScreen* screen = [[NSScreen screens] objectAtIndex:0]; |
cocoa_bounds.origin.y = |
- [screen frame].size.height - bounds.height() - bounds.y(); |
+ [screen frame].size.height - real_bounds.height() - real_bounds.y(); |
[window() setFrame:cocoa_bounds display:YES]; |
} |