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

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: rebase 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..4967525340af39584a953bf6400cad757db94b32 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
@@ -13,6 +13,7 @@
#include "base/command_line.h"
#include "base/string_number_conversions.h"
#include "base/values.h"
+#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/defaults.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
@@ -45,6 +46,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 +633,10 @@ Profile* ChromeLauncherControllerPerApp::profile() {
ash::ShelfAutoHideBehavior
ChromeLauncherControllerPerApp::GetShelfAutoHideBehavior(
aura::RootWindow* root_window) const {
+ // Don't show the shelf in app mode.
+ if (chrome::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(),
@@ -1202,6 +1208,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(

Powered by Google App Engine
This is Rietveld 408576698