summaryrefslogtreecommitdiffstats
path: root/chrome/browser/app_controller_mac.mm
diff options
context:
space:
mode:
authorsnej@chromium.org <snej@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-23 05:46:45 +0000
committersnej@chromium.org <snej@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-23 05:46:45 +0000
commitaf7c25ea78eb101d15708eafde17a1f1f5cac7b1 (patch)
tree1a4e62d8d7f0575c87faa14efed682c7f7248094 /chrome/browser/app_controller_mac.mm
parent0fdbe033a648deaccf17a0fda43e7e60c99f04d2 (diff)
downloadchromium_src-af7c25ea78eb101d15708eafde17a1f1f5cac7b1.zip
chromium_src-af7c25ea78eb101d15708eafde17a1f1f5cac7b1.tar.gz
chromium_src-af7c25ea78eb101d15708eafde17a1f1f5cac7b1.tar.bz2
Mac bookmark mgr: Enable menu cmd when no window's open.
Also fixes a related bug not mentioned in the report: app global commands like New Window etc. are disabled when the bookmark manager is active. BUG=32200 TEST=none (see bug description) Review URL: http://codereview.chromium.org/551100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36951 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_controller_mac.mm')
-rw-r--r--chrome/browser/app_controller_mac.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 6317a79..e3ed47b 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -17,6 +17,7 @@
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/browser_window.h"
#import "chrome/browser/cocoa/about_window_controller.h"
+#import "chrome/browser/cocoa/bookmark_manager_controller.h"
#import "chrome/browser/cocoa/bookmark_menu_bridge.h"
#import "chrome/browser/cocoa/browser_window_cocoa.h"
#import "chrome/browser/cocoa/browser_window_controller.h"
@@ -585,6 +586,10 @@ static bool g_is_opening_new_window = false;
initWithProfile:defaultProfile parentWindow:nil] runModalDialog];
break;
}
+ case IDC_SHOW_BOOKMARK_MANAGER:
+ UserMetrics::RecordAction("ShowBookmarkManager", defaultProfile);
+ [BookmarkManagerController showBookmarkManager:defaultProfile];
+ break;
case IDC_SHOW_HISTORY:
Browser::OpenHistoryWindow(defaultProfile);
break;
@@ -666,6 +671,7 @@ static bool g_is_opening_new_window = false;
menuState_->UpdateCommandEnabled(IDC_RESTORE_TAB, false);
menuState_->UpdateCommandEnabled(IDC_FOCUS_LOCATION, true);
menuState_->UpdateCommandEnabled(IDC_FOCUS_SEARCH, true);
+ menuState_->UpdateCommandEnabled(IDC_SHOW_BOOKMARK_MANAGER, true);
menuState_->UpdateCommandEnabled(IDC_SHOW_HISTORY, true);
menuState_->UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true);
menuState_->UpdateCommandEnabled(IDC_MANAGE_EXTENSIONS, true);