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

Unified Diff: chrome/browser/ui/cocoa/fullscreen_window.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 | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/fullscreen_window.mm
===================================================================
--- chrome/browser/ui/cocoa/fullscreen_window.mm (revision 117031)
+++ chrome/browser/ui/cocoa/fullscreen_window.mm (working copy)
@@ -4,6 +4,7 @@
#import "chrome/browser/ui/cocoa/fullscreen_window.h"
+#import "chrome/browser/ui/cocoa/browser_window_controller.h"
#import "chrome/browser/ui/cocoa/themed_window.h"
@implementation FullscreenWindow
@@ -72,10 +73,17 @@
// We need our own version, since the default one wants to flash the close
// button (and possibly other things), which results in nothing happening.
- (void)performClose:(id)sender {
- BOOL shouldClose = YES;
+ id delegate = [self delegate];
+ // Route -performClose: to -commandDispatch: on the delegate when coming from
+ // the "close tab" menu item. See comment in chrome_browser_window.mm.
+ if ([self performCloseShouldRouteToCommandDispatch:sender]) {
+ [delegate commandDispatch:sender];
+ return;
+ }
+
// If applicable, check if this window should close.
- id delegate = [self delegate];
+ BOOL shouldClose = YES;
if ([delegate respondsToSelector:@selector(windowShouldClose:)])
shouldClose = [delegate windowShouldClose:self];
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698