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

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

Issue 9187063: [Mac] Fix Cmd-W closing whole window under fullscreen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 | chrome/browser/ui/cocoa/fullscreen_window.mm » ('j') | 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
===================================================================
--- chrome/browser/ui/cocoa/browser_window_controller.mm (revision 117031)
+++ chrome/browser/ui/cocoa/browser_window_controller.mm (working copy)
@@ -975,8 +975,8 @@
}
// Called to validate menu and toolbar items when this window is key. All the
-// items we care about have been set with the |-commandDispatch:| or
-// |-commandDispatchUsingKeyModifiers:| actions and a target of FirstResponder
+// items we care about have been set with the -performClose:, -commandDispatch:
+// or -commandDispatchUsingKeyModifiers: actions and a target of FirstResponder
// in IB. If it's not one of those, let it continue up the responder chain to be
// handled elsewhere. We pull out the tag as the cross-platform constant to
// differentiate and dispatch the various commands.
@@ -987,7 +987,8 @@
- (BOOL)validateUserInterfaceItem:(id<NSValidatedUserInterfaceItem>)item {
SEL action = [item action];
BOOL enable = NO;
- if (action == @selector(commandDispatch:) ||
+ if (action == @selector(performClose:) ||
+ action == @selector(commandDispatch:) ||
action == @selector(commandDispatchUsingKeyModifiers:)) {
NSInteger tag = [item tag];
if (browser_->command_updater()->SupportsCommand(tag)) {
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/fullscreen_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698