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

Unified Diff: chrome/browser/ui/app_list/app_context_menu.cc

Issue 836673003: Fixed "Open in a Tab" option for apps in Chrome App Launcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed to DCHECK_EQ Created 5 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/app_context_menu.cc
diff --git a/chrome/browser/ui/app_list/app_context_menu.cc b/chrome/browser/ui/app_list/app_context_menu.cc
index 43d3717688f34e56669e452f8c5a071241a65478..66bc14b3b49fb341fa2a5fec7e77b249a7d00a23 100644
--- a/chrome/browser/ui/app_list/app_context_menu.cc
+++ b/chrome/browser/ui/app_list/app_context_menu.cc
@@ -181,6 +181,15 @@ bool AppContextMenu::IsItemForCommandIdDynamic(int command_id) const {
}
base::string16 AppContextMenu::GetLabelForCommandId(int command_id) const {
+ // If streamlined hosted apps are enabled, then we do not need to consider
+ // the case when command_id == TOGGLE_PIN (see AppContextMenu::GetMenuModel).
+ if (extensions::util::IsStreamlinedHostedAppsEnabled()) {
+ DCHECK_EQ(LAUNCH_NEW, command_id);
+ return IsCommandIdChecked(USE_LAUNCH_TYPE_REGULAR) ?
+ l10n_util::GetStringUTF16(IDS_APP_LIST_CONTEXT_MENU_NEW_TAB) :
+ l10n_util::GetStringUTF16(IDS_APP_LIST_CONTEXT_MENU_NEW_WINDOW);
+ }
+
if (command_id == TOGGLE_PIN) {
return controller_->IsAppPinned(app_id_) ?
l10n_util::GetStringUTF16(IDS_APP_LIST_CONTEXT_MENU_UNPIN) :
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698