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

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: move logic to RootWindowController 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
« no previous file with comments | « ash/wm/workspace_controller.cc ('k') | chrome/browser/ui/views/immersive_mode_controller.cc » ('j') | 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 54c780ee5ed30055e8a6d42c67a1a705fc95a5e0..425ec2d65b0a7e03d5a86c3c9364b424ed7f4015 100644
--- a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
@@ -7,7 +7,9 @@
#include <string>
#include "ash/desktop_background/user_wallpaper_delegate.h"
+#include "ash/root_window_controller.h"
#include "ash/shell.h"
+#include "ash/wm/property_util.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "chrome/browser/extensions/context_menu_matcher.h"
@@ -128,8 +130,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::GetRootWindowController(root_window_)->IsImmersiveMode()) {
+ AddCheckItemWithStringId(
+ MENU_AUTO_HIDE, IDS_AURA_LAUNCHER_CONTEXT_MENU_AUTO_HIDE);
+ }
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kShowLauncherAlignmentMenu)) {
AddSubMenuWithStringId(MENU_ALIGNMENT_MENU,
« no previous file with comments | « ash/wm/workspace_controller.cc ('k') | chrome/browser/ui/views/immersive_mode_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698