Chromium Code Reviews| Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.cc |
| diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.cc |
| index 207f51b85e7b6d1004f3e80a85c0bf6f779317c6..e5ecb8c752eae8e74a0a05573f08458b972ca458 100644 |
| --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.cc |
| +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.cc |
| @@ -45,6 +45,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" |
| @@ -631,6 +632,13 @@ Profile* ChromeLauncherControllerPerApp::profile() { |
| ash::ShelfAutoHideBehavior |
| ChromeLauncherControllerPerApp::GetShelfAutoHideBehavior( |
| aura::RootWindow* root_window) const { |
| + // Don't show the shelf in app mode. |
| + CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| + if (command_line->HasSwitch(switches::kAppId) && |
| + command_line->HasSwitch(switches::kForceAppMode)) { |
|
Mr4D (OOO till 08-26)
2013/01/30 00:55:00
Please create a utility query for the command line
zel
2013/01/30 01:46:32
Where do you guys think I should place such utilit
Mr4D (OOO till 08-26)
2013/01/30 02:11:41
Maybe chrome/browser/ui/ash/ash_util.cc?
zel
2013/01/30 03:03:44
Done.
zel
2013/01/30 03:03:44
Done.
|
| + 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(), |
| @@ -1202,6 +1210,11 @@ void ChromeLauncherControllerPerApp::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( |