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 893520378ddffe401029fd69e0dadbdf576d30f9..39acde8a126640f709c022d65a4746a5a49763ac 100644 |
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm |
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm |
@@ -28,6 +28,7 @@ |
#include "chrome/browser/themes/theme_service.h" |
#include "chrome/browser/themes/theme_service_factory.h" |
#include "chrome/browser/ui/bookmarks/bookmark_editor.h" |
+#include "chrome/browser/ui/bookmarks/bookmark_utils.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/browser_command_controller.h" |
#include "chrome/browser/ui/browser_commands.h" |
@@ -1127,6 +1128,17 @@ enum { |
currentProfile:original_profile]; |
break; |
} |
+ case IDC_BOOKMARK_PAGE: { |
+ // Extensions have the ability to hide the bookmark page menu item. |
+ // This only affects the bookmark page menu item under the main menu. |
+ // The bookmark page menu item under the wrench menu has its |
+ // visibility controlled by WrenchMenuModel. |
+ bool shouldHide = |
+ !chrome::ShouldShowBookmarkPageMenuItem(browser_->profile()); |
+ NSMenuItem* menuItem = static_cast<NSMenuItem*>(item); |
Robert Sesek
2014/02/24 14:06:07
Use base::mac::ObjCCast
erikchen
2014/02/26 01:08:19
Done.
|
+ menuItem.hidden = shouldHide; |
Robert Sesek
2014/02/24 14:06:07
There's a strong preference in this file for calli
erikchen
2014/02/26 01:08:19
Done.
|
+ 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 |