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

Unified Diff: ash/launcher/launcher_context_menu.cc

Issue 10273012: ash: Fix shelf auto hide behavior not persisted regression. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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 | « ash/launcher/launcher_context_menu.h ('k') | ash/launcher/launcher_context_menu_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/launcher/launcher_context_menu.cc
diff --git a/ash/launcher/launcher_context_menu.cc b/ash/launcher/launcher_context_menu.cc
index 3872ade360f058b0215be5f55e2af3852f5d33fa..dd0604e52b4b692310e3a92c02c9bfad1215d2d5 100644
--- a/ash/launcher/launcher_context_menu.cc
+++ b/ash/launcher/launcher_context_menu.cc
@@ -31,7 +31,7 @@ bool LauncherContextMenu::IsAutoHideMenuHideChecked() {
}
// static
-void LauncherContextMenu::ToggleAutoHideMenu() {
+ShelfAutoHideBehavior LauncherContextMenu::GetToggledAutoHideBehavior() {
ash::Shell* shell = ash::Shell::GetInstance();
ash::ShelfAutoHideBehavior auto_hide_behavior;
if (shell->IsInMaximizedMode()) {
@@ -44,7 +44,7 @@ void LauncherContextMenu::ToggleAutoHideMenu() {
} else {
auto_hide_behavior = ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS;
}
- shell->SetShelfAutoHideBehavior(auto_hide_behavior);
+ return auto_hide_behavior;
}
// static
@@ -76,7 +76,8 @@ bool LauncherContextMenu::GetAcceleratorForCommandId(
void LauncherContextMenu::ExecuteCommand(int command_id) {
switch (static_cast<MenuItem>(command_id)) {
case MENU_AUTO_HIDE:
- ToggleAutoHideMenu();
+ ash::Shell::GetInstance()->SetShelfAutoHideBehavior(
+ GetToggledAutoHideBehavior());
break;
}
}
« no previous file with comments | « ash/launcher/launcher_context_menu.h ('k') | ash/launcher/launcher_context_menu_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698