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

Unified Diff: ash/root_window_controller.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/launcher/launcher_view.cc ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 81117d93ab405949253e81240f7b936e3b17a4d6..6d0355e5dc7276bb923581c15c585ffc111a0caa 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -183,10 +183,7 @@ RootWindowController::~RootWindowController() {
// static
RootWindowController* RootWindowController::ForLauncher(aura::Window* window) {
- if (Shell::IsLauncherPerDisplayEnabled())
- return GetRootWindowController(window->GetRootWindow());
- else
- return Shell::GetPrimaryRootWindowController();
+ return GetRootWindowController(window->GetRootWindow());
}
// static
@@ -275,17 +272,15 @@ void RootWindowController::InitForPrimaryDisplay() {
shelf_.reset(new ash::ShelfWidget(
shelf_container, status_container, workspace_controller()));
- if (Shell::IsLauncherPerDisplayEnabled() ||
- root_window_ == Shell::GetPrimaryRootWindow()) {
- // Create Panel layout manager
- aura::Window* panel_container = GetContainer(
- internal::kShellWindowId_PanelContainer);
- panel_layout_manager_ =
- new internal::PanelLayoutManager(panel_container);
- panel_container_handler_.reset(
- new ToplevelWindowEventHandler(panel_container));
- panel_container->SetLayoutManager(panel_layout_manager_);
- }
+ // Create Panel layout manager
+ aura::Window* panel_container = GetContainer(
+ internal::kShellWindowId_PanelContainer);
+ panel_layout_manager_ =
+ new internal::PanelLayoutManager(panel_container);
+ panel_container_handler_.reset(
+ new ToplevelWindowEventHandler(panel_container));
+ panel_container->SetLayoutManager(panel_layout_manager_);
+
if (Shell::GetInstance()->session_state_delegate()->HasActiveUser())
shelf_->CreateLauncher();
@@ -416,11 +411,9 @@ SystemTray* RootWindowController::GetSystemTray() {
void RootWindowController::ShowContextMenu(
const gfx::Point& location_in_screen) {
- aura::RootWindow* target = Shell::IsLauncherPerDisplayEnabled() ?
- root_window() : Shell::GetPrimaryRootWindow();
DCHECK(Shell::GetInstance()->delegate());
scoped_ptr<ui::MenuModel> menu_model(
- Shell::GetInstance()->delegate()->CreateContextMenu(target));
+ Shell::GetInstance()->delegate()->CreateContextMenu(root_window()));
if (!menu_model)
return;
« no previous file with comments | « ash/launcher/launcher_view.cc ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698