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

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

Issue 907473002: Polish UI of bookmark app creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback Created 5 years, 10 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/browser/resources/ntp4/apps_page.js ('k') | chrome/browser/ui/ash/launcher/launcher_context_menu.cc » ('j') | 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 8634f4c9ce0975be3ce18f857615583b69a66258..43d805e1ca78601cc97d5751b6089affe7aa2bbb 100644
--- a/chrome/browser/ui/app_list/app_context_menu.cc
+++ b/chrome/browser/ui/app_list/app_context_menu.cc
@@ -118,9 +118,8 @@ ui::MenuModel* AppContextMenu::GetMenuModel() {
// When bookmark apps are enabled, hosted apps can only toggle between
// USE_LAUNCH_TYPE_WINDOW and USE_LAUNCH_TYPE_REGULAR.
if (extensions::util::IsNewBookmarkAppsEnabled()) {
- menu_model_->AddCheckItemWithStringId(
- USE_LAUNCH_TYPE_REGULAR,
- IDS_APP_CONTEXT_MENU_OPEN_TAB);
+ menu_model_->AddCheckItemWithStringId(USE_LAUNCH_TYPE_WINDOW,
+ IDS_APP_CONTEXT_MENU_OPEN_WINDOW);
} else {
menu_model_->AddCheckItemWithStringId(
USE_LAUNCH_TYPE_REGULAR,
@@ -195,9 +194,9 @@ base::string16 AppContextMenu::GetLabelForCommandId(int command_id) const {
// USE_LAUNCH_TYPE_REGULAR is checked, as USE_LAUNCH_TYPE_PINNED (i.e. open
// as pinned tab) and fullscreen-by-default windows do not exist.
if (extensions::util::IsNewBookmarkAppsEnabled()) {
- 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);
+ return IsCommandIdChecked(USE_LAUNCH_TYPE_WINDOW)
+ ? l10n_util::GetStringUTF16(IDS_APP_LIST_CONTEXT_MENU_NEW_WINDOW)
+ : l10n_util::GetStringUTF16(IDS_APP_LIST_CONTEXT_MENU_NEW_TAB);
}
#if defined(OS_MACOSX)
@@ -274,9 +273,9 @@ void AppContextMenu::ExecuteCommand(int command_id, int event_flags) {
// LAUNCH_TYPE_WINDOW and LAUNCH_TYPE_REGULAR.
if (extensions::util::IsNewBookmarkAppsEnabled()) {
launch_type = (controller_->GetExtensionLaunchType(profile_, app_id_) ==
- extensions::LAUNCH_TYPE_REGULAR) ?
- extensions::LAUNCH_TYPE_WINDOW :
- extensions::LAUNCH_TYPE_REGULAR;
+ extensions::LAUNCH_TYPE_WINDOW)
+ ? extensions::LAUNCH_TYPE_REGULAR
+ : extensions::LAUNCH_TYPE_WINDOW;
}
controller_->SetExtensionLaunchType(profile_, app_id_, launch_type);
} else if (command_id == OPTIONS) {
« no previous file with comments | « chrome/browser/resources/ntp4/apps_page.js ('k') | chrome/browser/ui/ash/launcher/launcher_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698