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

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

Issue 9692016: Revert 120593 - Ensure the previously active browser window gets the focus after a browser window i… (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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/browser_window_utils.mm
===================================================================
--- chrome/browser/ui/cocoa/browser_window_utils.mm (revision 126246)
+++ chrome/browser/ui/cocoa/browser_window_utils.mm (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,8 +10,6 @@
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/global_keyboard_shortcuts_mac.h"
#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_list.h"
-#include "chrome/browser/ui/browser_window.h"
#import "chrome/browser/ui/cocoa/chrome_event_processing_window.h"
#import "chrome/browser/ui/cocoa/nsmenuitem_additions.h"
#import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
@@ -188,22 +186,4 @@
SetFrontProcessWithOptions(&psn, kSetFrontProcessFrontWindowOnly);
}
-+ (void)selectPreviousActiveBrowserWindow:(Browser*)closedBrowser {
- if (![NSApp isActive] || closedBrowser != BrowserList::GetLastActive())
- return;
-
- // Select previous active window if this is the current active window.
- // Otherwise, OSX will always give focus to a Panel window after this one
- // is closed because Panels have a higher priority NSWindowLevel.
- BrowserList::const_reverse_iterator iter = BrowserList::begin_last_active();
- BrowserList::const_reverse_iterator end = BrowserList::end_last_active();
- for (; iter != end; ++iter) {
- Browser* browser = *iter;
- if (browser != closedBrowser &&
- [browser->window()->GetNativeHandle() canBecomeKeyWindow]) {
- browser->window()->Activate();
- return;
- }
- }
-}
@end
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_utils.h ('k') | chrome/browser/ui/cocoa/tabs/tab_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698