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 7f5f04e56bfef1dc5d93516058ab3024021eb7c4..6a42b3aa763e55fc7724f21044684bc934834371 100644 |
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm |
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm |
@@ -223,7 +223,7 @@ enum { |
browser_.reset(browser); |
ownsBrowser_ = ownIt; |
NSWindow* window = [self window]; |
- windowShim_.reset(new BrowserWindowCocoa(browser, self, window)); |
+ windowShim_.reset(new BrowserWindowCocoa(browser, self)); |
// Create the bar visibility lock set; 10 is arbitrary, but should hopefully |
// be big enough to hold all locks that'll ever be needed. |
@@ -614,6 +614,8 @@ enum { |
// Called when we have been minimized. |
- (void)windowDidMiniaturize:(NSNotification *)notification { |
+ [self saveWindowPositionIfNeeded]; |
+ |
// Let the selected RenderWidgetHostView know, so that it can tell plugins. |
if (TabContents* contents = browser_->GetSelectedTabContents()) { |
if (RenderWidgetHostView* rwhv = contents->GetRenderWidgetHostView()) |
@@ -1763,6 +1765,8 @@ enum { |
// Delegate method called when window is resized. |
- (void)windowDidResize:(NSNotification*)notification { |
+ [self saveWindowPositionIfNeeded]; |
+ |
// Resize (and possibly move) the status bubble. Note that we may get called |
// when the status bubble does not exist. |
if (statusBubble_) { |
@@ -1803,6 +1807,8 @@ enum { |
// |-windowWillMove:|, which is called less frequently than |-windowDidMove| |
// instead.) |
- (void)windowDidMove:(NSNotification*)notification { |
+ [self saveWindowPositionIfNeeded]; |
+ |
NSWindow* window = [self window]; |
NSRect windowFrame = [window frame]; |
NSRect workarea = [[window screen] visibleFrame]; |