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

Unified Diff: chrome/browser/views/frame/browser_view.cc

Issue 100054: Added Undo close window to menu. Standardized capitalization for ... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 8 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 | « chrome/app/generated_resources.grd ('k') | chrome/views/controls/menu/menu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/browser_view.cc
===================================================================
--- chrome/browser/views/frame/browser_view.cc (revision 14849)
+++ chrome/browser/views/frame/browser_view.cc (working copy)
@@ -474,9 +474,18 @@
// IDS_ZOOM) and on separators.
if (command != 0) {
bool enabled = browser_->command_updater()->IsCommandEnabled(command);
- if (enabled && command == IDC_RESTORE_TAB)
- enabled = browser_->profile()->GetTabRestoreService() &&
- !browser_->profile()->GetTabRestoreService()->entries().empty();
+ if (enabled && command == IDC_RESTORE_TAB) {
+ TabRestoreService* tab_restore_service =
+ browser_->profile()->GetTabRestoreService();
+ if (tab_restore_service && !tab_restore_service->entries().empty()) {
+ system_menu_->SetMenuLabel(command, l10n_util::GetString(
+ tab_restore_service->entries().front()->type ==
+ TabRestoreService::WINDOW ? IDS_RESTORE_WINDOW :
+ IDS_RESTORE_TAB));
+ } else {
+ enabled = false;
+ }
+ }
system_menu_->EnableMenuItemByID(command, enabled);
}
}
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/views/controls/menu/menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698