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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_utils.mm

Issue 9695014: Revert 121302 - Preserve minimized windows on shutdown [Mac]. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/browser_window_utils.h" 5 #import "chrome/browser/ui/cocoa/browser_window_utils.h"
6 6
7 #include <Carbon/Carbon.h> 7 #include <Carbon/Carbon.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 return; 193 return;
194 194
195 // Select previous active window if this is the current active window. 195 // Select previous active window if this is the current active window.
196 // Otherwise, OSX will always give focus to a Panel window after this one 196 // Otherwise, OSX will always give focus to a Panel window after this one
197 // is closed because Panels have a higher priority NSWindowLevel. 197 // is closed because Panels have a higher priority NSWindowLevel.
198 BrowserList::const_reverse_iterator iter = BrowserList::begin_last_active(); 198 BrowserList::const_reverse_iterator iter = BrowserList::begin_last_active();
199 BrowserList::const_reverse_iterator end = BrowserList::end_last_active(); 199 BrowserList::const_reverse_iterator end = BrowserList::end_last_active();
200 for (; iter != end; ++iter) { 200 for (; iter != end; ++iter) {
201 Browser* browser = *iter; 201 Browser* browser = *iter;
202 if (browser != closedBrowser && 202 if (browser != closedBrowser &&
203 !browser->window()->IsMinimized() &&
204 [browser->window()->GetNativeHandle() canBecomeKeyWindow]) { 203 [browser->window()->GetNativeHandle() canBecomeKeyWindow]) {
205 browser->window()->Activate(); 204 browser->window()->Activate();
206 return; 205 return;
207 } 206 }
208 } 207 }
209 } 208 }
210 @end 209 @end
OLDNEW
« 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