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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.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_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..b81f14f623103c51671bf562a5d135e04beebd52 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)) {
+ 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,10 @@ 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.
oshima 2013/01/30 00:28:31 NOTREACHED()
zel 2013/01/30 01:01:34 Done.
+ return;
}
UpdatePerDisplayPref(

Powered by Google App Engine
This is Rietveld 408576698