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

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

Issue 2020623004: ash: Move shelf alignment and auto-hide calls from Shell to Shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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
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 0544d310c3434545052100c04e4c78f3c6a9ed69..338283e81f48d35b675086244563a43783cc7d7f 100644
--- a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
@@ -82,10 +82,8 @@ base::string16 LauncherContextMenu::GetLabelForCommandId(int command_id) const {
}
bool LauncherContextMenu::IsCommandIdChecked(int command_id) const {
- if (command_id == MENU_AUTO_HIDE) {
- return shelf_->GetAutoHideBehavior() ==
- ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS;
- }
+ if (command_id == MENU_AUTO_HIDE)
+ return shelf_->auto_hide_behavior() == ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS;
DCHECK(command_id < MENU_ITEM_COUNT);
return false;
}
@@ -136,7 +134,7 @@ void LauncherContextMenu::ExecuteCommand(int command_id, int event_flags) {
controller_->TogglePinned(item_.id);
break;
case MENU_AUTO_HIDE:
- shelf_->SetAutoHideBehavior(shelf_->GetAutoHideBehavior() ==
+ shelf_->SetAutoHideBehavior(shelf_->auto_hide_behavior() ==
ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS
? ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER
: ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);

Powered by Google App Engine
This is Rietveld 408576698