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

Unified Diff: chrome/browser/ui/ash/launcher/launcher_context_menu.cc

Issue 2771663002: mash: Refactor ChromeLauncherController's ShelfDelegate code. (Closed)
Patch Set: Address comments. Created 3 years, 9 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/ui/ash/launcher/chrome_launcher_controller_mus.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5852c2339385f639e9383573dd4e507a9ccb3faa..4ddb2a73b5fe964feabc8aebed974b401407bb9a 100644
--- a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
@@ -127,7 +127,10 @@ void LauncherContextMenu::ExecuteCommand(int command_id, int event_flags) {
ash::UMA_CLOSE_THROUGH_CONTEXT_MENU);
break;
case MENU_PIN:
- controller_->TogglePinned(item_.id);
+ if (controller_->IsAppPinned(item_.app_launch_id.app_id()))
+ controller_->UnpinAppWithID(item_.app_launch_id.app_id());
+ else
+ controller_->PinAppWithID(item_.app_launch_id.app_id());
break;
case MENU_AUTO_HIDE:
wm_shelf_->SetAutoHideBehavior(
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698