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

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

Issue 9310075: Ensure the previously active browser window gets the focus after a browser window is closed on OSX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: separate return to its own line Created 8 years, 10 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.h
diff --git a/chrome/browser/ui/cocoa/browser_window_utils.h b/chrome/browser/ui/cocoa/browser_window_utils.h
index 1b67ed985e2df0645e3b6971f4c542a2afe16c53..c4d154efe36a5980513656611e676ef2403f075a 100644
--- a/chrome/browser/ui/cocoa/browser_window_utils.h
+++ b/chrome/browser/ui/cocoa/browser_window_utils.h
@@ -39,6 +39,15 @@ struct NativeWebKeyboardEvent;
withTabStrip:(NSView*)tabStripView;
+ (void)activateWindowForController:(NSWindowController*)controller;
+
+// Some browser windows (Panels) use a different NSWindowLevel, causing the
+// system to prefer them over other windows when selecting the next window
+// to give focus to after a browser window is closed.
+// This method selects the previous active browser window instead.
+// |closedBrowser| is the browser that is being closed. Used to ensure it
+// is excluded from the selection process.
+// Does nothing if no previous active window is found.
++ (void)selectPreviousActiveBrowserWindow:(Browser*)closedBrowser;
@end
#endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698