Index: chrome/browser/ui/ash/launcher/launcher_context_menu.cc |
diff --git a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc |
index d8ea96aa853eaa5f1e5a803da0414244aa37fafa..af8d5b72acead58cba77b21b356110fa02d2304e 100644 |
--- a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc |
+++ b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc |
@@ -67,8 +67,10 @@ void LauncherContextMenu::Init() { |
set_delegate(this); |
if (is_valid_item()) { |
- if (item_.type == ash::TYPE_APP_SHORTCUT) { |
- DCHECK(controller_->IsPinned(item_.id)); |
+ if (item_.type == ash::TYPE_APP_SHORTCUT || |
+ item_.type == ash::TYPE_WINDOWED_APP) { |
+ DCHECK(item_.type == ash::TYPE_APP_SHORTCUT && |
+ controller_->IsPinned(item_.id)); |
// V1 apps can be started from the menu - but V2 apps should not. |
if (!controller_->IsPlatformApp(item_.id)) { |
AddItem(MENU_OPEN_NEW, string16()); |
@@ -76,7 +78,9 @@ void LauncherContextMenu::Init() { |
} |
AddItem( |
MENU_PIN, |
- l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_UNPIN)); |
+ l10n_util::GetStringUTF16(controller_->IsPinned(item_.id) ? |
+ IDS_LAUNCHER_CONTEXT_MENU_UNPIN : |
+ IDS_LAUNCHER_CONTEXT_MENU_PIN)); |
if (controller_->IsOpen(item_.id)) { |
AddItem(MENU_CLOSE, |
l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE)); |
@@ -118,6 +122,7 @@ void LauncherContextMenu::Init() { |
} |
AddSeparator(ui::NORMAL_SEPARATOR); |
if (item_.type == ash::TYPE_APP_SHORTCUT || |
+ item_.type == ash::TYPE_WINDOWED_APP || |
item_.type == ash::TYPE_PLATFORM_APP) { |
std::string app_id = controller_->GetAppIDForLauncherID(item_.id); |
if (!app_id.empty()) { |