Index: chrome/browser/cocoa/browser_window_controller.mm |
diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm |
index 3c8df3b1e7c822462157d18e83c01e3ff3a05f06..42d35dd65aeef5025134fb3c409ac7817d2f3fcf 100644 |
--- a/chrome/browser/cocoa/browser_window_controller.mm |
+++ b/chrome/browser/cocoa/browser_window_controller.mm |
@@ -579,6 +579,15 @@ willPositionSheet:(NSWindow*)sheet |
case IDC_FULLSCREEN: |
enable &= [self supportsFullscreen]; |
break; |
+ default: |
+ // Special handling for the contents of the Text Encoding submenu. On |
+ // Mac OS, instead of enabling/disabling the top-level menu item, we |
+ // enable/disable the submenu's contents (per Apple's HIG). |
+ EncodingMenuController encoding_controller; |
TVL
2009/11/03 18:26:28
how expensive is constructing one of these, should
|
+ if (encoding_controller.DoesCommandBelongToEncodingMenu(tag)) { |
+ enable &= browser_->command_updater()->IsCommandEnabled( |
+ IDC_ENCODING_MENU) ? YES : NO; |
+ } |
} |
// If the item is toggleable, find its toggle state and |