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

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

Issue 1370753003: Fix incorrect window size on session restore. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c4205301f799e87d52ba2ceacf4e8451191d9afc..0737f659e610951d71d40d8854da0f39e812e702 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -606,8 +606,10 @@ using content::WebContents;
- (void)windowDidBecomeMain:(NSNotification*)notification {
if (chrome::GetLastActiveBrowser() != browser_) {
BrowserList::SetLastActive(browser_.get());
- [self saveWindowPositionIfNeeded];
}
+ // Always saveWindowPositionIfNeeded when becoming main, not just
+ // when |browser_| is not the last active browser. See crbug.com/536280 .
+ [self saveWindowPositionIfNeeded];
NSView* rootView = [[[self window] contentView] superview];
[rootView cr_recursivelyInvokeBlock:^(id view) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698