| 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..58f103501c1fded7a0716390ca0658a269f34104 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,6 +38,7 @@
|
| #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"
|
| @@ -658,6 +659,13 @@ bool ChromeLauncherControllerPerBrowser::CanPin() const {
|
| ash::ShelfAutoHideBehavior
|
| ChromeLauncherControllerPerBrowser::GetShelfAutoHideBehavior(
|
| aura::RootWindow* root_window) const {
|
| + // Don't show the shelf in the app mode.
|
| + CommandLine* command_line = CommandLine::ForCurrentProcess();
|
| + if (command_line->HasSwitch(switches::kAppId) &&
|
| + command_line->HasSwitch(switches::kForceAppMode)) {
|
| + 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 +1138,10 @@ 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.
|
| + return;
|
| }
|
|
|
| UpdatePerDisplayPref(
|
|
|