| Index: chrome/browser/ui/cocoa/browser_window_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| index cfef089d9a43841faaeb5a07c3909ac0366000c7..f5fbb11846ea3ad926fa0b7da65079955152aeaa 100644
|
| --- a/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| @@ -1000,9 +1000,12 @@ enum {
|
| enable = browser_->command_updater()->IsCommandEnabled(tag);
|
| switch (tag) {
|
| case IDC_CLOSE_TAB:
|
| - // Disable "close tab" if we're not the key window or if there's only
|
| - // one tab.
|
| - enable &= [[self window] isKeyWindow];
|
| + // Disable "close tab" if the receiving window is not tabbed.
|
| + // We simply check whether the item has a keyboard shortcut set here;
|
| + // app_controller_mac.mm actually determines whether the item should
|
| + // be enabled.
|
| + if ([static_cast<NSObject*>(item) isKindOfClass:[NSMenuItem class]])
|
| + enable &= !![[static_cast<NSMenuItem*>(item) keyEquivalent] length];
|
| break;
|
| case IDC_FULLSCREEN: {
|
| enable &= [self supportsFullscreen];
|
|
|