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

Unified Diff: ash/shell.cc

Issue 14584004: Remove ash-disable-launcher-per-display flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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
« no previous file with comments | « ash/shell.h ('k') | ash/wm/ash_activation_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 4f6e9366103ec951f94dd00bb5bc63a33acf7c16..9112130ab35c684dcd280cd591cf5f7ceb78b5e6 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -414,12 +414,6 @@ std::vector<aura::Window*> Shell::GetContainersFromAllRootWindows(
}
// static
-bool Shell::IsLauncherPerDisplayEnabled() {
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- return !command_line->HasSwitch(switches::kAshDisableLauncherPerDisplay);
-}
-
-// static
bool Shell::IsForcedMaximizeMode() {
CommandLine* command_line = CommandLine::ForCurrentProcess();
return command_line->HasSwitch(switches::kForcedMaximizeMode);
@@ -732,25 +726,17 @@ void Shell::OnLockStateChanged(bool locked) {
}
void Shell::CreateLauncher() {
- if (IsLauncherPerDisplayEnabled()) {
- RootWindowControllerList controllers = GetAllRootWindowControllers();
- for (RootWindowControllerList::iterator iter = controllers.begin();
- iter != controllers.end(); ++iter)
- (*iter)->shelf()->CreateLauncher();
- } else {
- GetPrimaryRootWindowController()->shelf()->CreateLauncher();
- }
+ RootWindowControllerList controllers = GetAllRootWindowControllers();
+ for (RootWindowControllerList::iterator iter = controllers.begin();
+ iter != controllers.end(); ++iter)
+ (*iter)->shelf()->CreateLauncher();
}
void Shell::ShowLauncher() {
- if (IsLauncherPerDisplayEnabled()) {
- RootWindowControllerList controllers = GetAllRootWindowControllers();
- for (RootWindowControllerList::iterator iter = controllers.begin();
- iter != controllers.end(); ++iter)
- (*iter)->ShowLauncher();
- } else {
- GetPrimaryRootWindowController()->ShowLauncher();
- }
+ RootWindowControllerList controllers = GetAllRootWindowControllers();
+ for (RootWindowControllerList::iterator iter = controllers.begin();
+ iter != controllers.end(); ++iter)
+ (*iter)->ShowLauncher();
}
void Shell::AddShellObserver(ShellObserver* observer) {
@@ -863,8 +849,7 @@ void Shell::InitRootWindowForSecondaryDisplay(aura::RootWindow* root) {
// screen.
controller->CreateSystemBackground(false);
InitRootWindowController(controller);
- if (IsLauncherPerDisplayEnabled())
- controller->InitForPrimaryDisplay();
+ controller->InitForPrimaryDisplay();
controller->root_window_layout()->OnWindowResized();
desktop_background_controller_->OnRootWindowAdded(root);
high_contrast_controller_->OnRootWindowAdded(root);
« no previous file with comments | « ash/shell.h ('k') | ash/wm/ash_activation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698