diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 19:32:22 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 19:32:22 +0000 |
commit | 91a5b3e9f6fbdf10c2a031138ba902ebf612eadc (patch) | |
tree | 8be509fdea281740e0dcf153cf4a8f4ed8a9f547 /chrome/browser/app_controller_mac.mm | |
parent | 6828ad30f070ab8f9db629461c7eb68e3eeb51fd (diff) | |
download | chromium_src-91a5b3e9f6fbdf10c2a031138ba902ebf612eadc.zip chromium_src-91a5b3e9f6fbdf10c2a031138ba902ebf612eadc.tar.gz chromium_src-91a5b3e9f6fbdf10c2a031138ba902ebf612eadc.tar.bz2 |
Mac: enable History, Downloads, and Open Location... with no windows open.
BUG=25620
TEST=Close all windows, try History->History (Cmd-Y); close window, try Window->Downloads (Shift-Cmd-J); close window, try Open Location... (Cmd-L).
Review URL: http://codereview.chromium.org/329004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30615 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_controller_mac.mm')
-rw-r--r-- | chrome/browser/app_controller_mac.mm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index faf6789..d9c4082 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -495,6 +495,7 @@ static bool g_is_opening_new_window = false; switch (tag) { case IDC_NEW_TAB: case IDC_NEW_WINDOW: + case IDC_FOCUS_LOCATION: g_is_opening_new_window = true; Browser::OpenEmptyWindow(defaultProfile); g_is_opening_new_window = false; @@ -518,6 +519,12 @@ static bool g_is_opening_new_window = false; [controller runModalDialog]; break; } + case IDC_SHOW_HISTORY: + Browser::OpenHistoryWindow(defaultProfile); + break; + case IDC_SHOW_DOWNLOADS: + Browser::OpenDownloadsWindow(defaultProfile); + break; case IDC_HELP_PAGE: Browser::OpenHelpWindow(defaultProfile); break; @@ -552,6 +559,9 @@ static bool g_is_opening_new_window = false; menuState_->UpdateCommandEnabled(IDC_OPEN_FILE, true); menuState_->UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, true); menuState_->UpdateCommandEnabled(IDC_RESTORE_TAB, false); + menuState_->UpdateCommandEnabled(IDC_FOCUS_LOCATION, true); + menuState_->UpdateCommandEnabled(IDC_SHOW_HISTORY, true); + menuState_->UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true); menuState_->UpdateCommandEnabled(IDC_HELP_PAGE, true); // TODO(pinkerton): ...more to come... } |