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

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

Issue 7003063: Enforce different min size for popups than tabbed browsers on MacOSX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address prev round of feedback Created 9 years, 6 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/app/nibs/BrowserWindow.xib ('k') | chrome/browser/ui/cocoa/browser_window_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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];
}
« no previous file with comments | « chrome/app/nibs/BrowserWindow.xib ('k') | chrome/browser/ui/cocoa/browser_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698