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

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

Issue 9230011: Better fix for Lion dictionary popover cmd-W bug. (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
Index: chrome/browser/ui/cocoa/chrome_browser_window.mm
===================================================================
--- chrome/browser/ui/cocoa/chrome_browser_window.mm (revision 117895)
+++ chrome/browser/ui/cocoa/chrome_browser_window.mm (working copy)
@@ -5,8 +5,6 @@
#import "chrome/browser/ui/cocoa/chrome_browser_window.h"
#include "base/logging.h"
-#include "chrome/app/chrome_command_ids.h"
-#import "chrome/browser/ui/cocoa/browser_window_controller.h"
#import "chrome/browser/ui/cocoa/themed_window.h"
#include "ui/base/theme_provider.h"
@@ -51,25 +49,4 @@
return [delegate themePatternPhase];
}
-- (BOOL)performCloseShouldRouteToCommandDispatch:(id)sender {
- return [[self delegate] respondsToSelector:@selector(commandDispatch:)] &&
- [sender isKindOfClass:[NSMenuItem class]] &&
- [sender tag] == IDC_CLOSE_TAB;
-}
-
-- (void)performClose:(id)sender {
- // Route -performClose: to -commandDispatch: on the delegate when coming from
- // the "close tab" menu item. This is done here, rather than simply connecting
- // the menu item to -commandDispatch: in IB because certain parts of AppKit,
- // such as the Lion dictionary pop up, expect Cmd-W to send -performClose:.
- // See http://crbug.com/104931 for details.
- if ([self performCloseShouldRouteToCommandDispatch:sender]) {
- id delegate = [self delegate];
- [delegate commandDispatch:sender];
- return;
- }
-
- [super performClose:sender];
-}
-
@end
« no previous file with comments | « chrome/browser/ui/cocoa/chrome_browser_window.h ('k') | chrome/browser/ui/cocoa/chrome_browser_window_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698