Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc |
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc |
index 4001dd6fafd2d09f3646256d14c81b4a6648b7e2..4fef8a68de1a6afff7347018ea169f80b5e4652e 100644 |
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc |
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc |
@@ -38,9 +38,11 @@ |
#include "chrome/browser/ui/tabs/tab_strip_model.h" |
#include "chrome/browser/web_applications/web_app.h" |
#include "chrome/common/chrome_notification_types.h" |
+#include "chrome/common/chrome_switches.h" |
#include "chrome/common/extensions/extension.h" |
#include "chrome/common/extensions/extension_resource.h" |
#include "chrome/common/pref_names.h" |
+#include "chrome/common/switch_utils.h" |
#include "chrome/common/url_constants.h" |
#include "content/public/browser/navigation_entry.h" |
#include "content/public/browser/notification_service.h" |
@@ -658,6 +660,10 @@ bool ChromeLauncherControllerPerBrowser::CanPin() const { |
ash::ShelfAutoHideBehavior |
ChromeLauncherControllerPerBrowser::GetShelfAutoHideBehavior( |
aura::RootWindow* root_window) const { |
+ // Don't show the shelf in the app mode. |
+ if (switches::IsRunningInAppMode()) |
+ return ash::SHELF_AUTO_HIDE_ALWAYS_HIDDEN; |
+ |
// See comment in |kShelfAlignment| as to why we consider two prefs. |
const std::string behavior_value( |
GetPrefForRootWindow(profile_->GetPrefs(), |
@@ -1130,6 +1136,11 @@ void ChromeLauncherControllerPerBrowser::SetShelfAutoHideBehaviorPrefs( |
case ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER: |
value = ash::kShelfAutoHideBehaviorNever; |
break; |
+ case ash::SHELF_AUTO_HIDE_ALWAYS_HIDDEN: |
+ // This one should not be a valid preference option for now. We only want |
+ // to completely hide it when we run app mode. |
+ NOTREACHED(); |
+ return; |
} |
UpdatePerDisplayPref( |