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

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

Issue 12077055: Made launcher hidden when kicking off chrome in app mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/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..abaf21425629ec0cb8a508bcd6cac40da06e55e6 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();
Mr4D (OOO till 08-26) 2013/01/30 00:55:00 Please create a utility query for the command line
zel 2013/01/30 03:03:44 Done.
+ 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,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(

Powered by Google App Engine
This is Rietveld 408576698