Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 329004: Mac: enable History, Downloads, and Open Location... with no windows open. (Closed)
Patch Set: Merged ToT. Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/browser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_controller_mac.mm
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index faf678960584b259f746d3f22288963b2e27f051..d9c408267e7392c8705e74d7b93b4556c2d3666b 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...
}
« no previous file with comments | « no previous file | chrome/browser/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698