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

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

Issue 11830008: ash/immersive mode: Hide the launcher when entering immersive mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: call up via ShellDelegate Created 7 years, 11 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 54c780ee5ed30055e8a6d42c67a1a705fc95a5e0..371ddb0fcda620dbc03e1524730fc7b60bc87f70 100644
--- a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
@@ -8,6 +8,7 @@
#include "ash/desktop_background/user_wallpaper_delegate.h"
#include "ash/shell.h"
+#include "ash/shell_delegate.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "chrome/browser/extensions/context_menu_matcher.h"
@@ -128,8 +129,13 @@ void LauncherContextMenu::Init() {
}
}
}
- AddCheckItemWithStringId(
- MENU_AUTO_HIDE, IDS_AURA_LAUNCHER_CONTEXT_MENU_AUTO_HIDE);
+ // Don't show the auto-hide menu item while in immersive mode because the
+ // launcher always auto-hides in this mode and it's confusing when the
+ // preference appears not to apply.
+ if (!ash::Shell::GetInstance()->delegate()->IsImmersiveMode()) {
+ AddCheckItemWithStringId(
+ MENU_AUTO_HIDE, IDS_AURA_LAUNCHER_CONTEXT_MENU_AUTO_HIDE);
+ }
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kShowLauncherAlignmentMenu)) {
AddSubMenuWithStringId(MENU_ALIGNMENT_MENU,

Powered by Google App Engine
This is Rietveld 408576698