| Index: ash/shell.cc
|
| diff --git a/ash/shell.cc b/ash/shell.cc
|
| index dcdf7147c6854101a79dafb75695814b689b9b06..e4b78425ab22811284c8e8196dd9185b766995ea 100644
|
| --- a/ash/shell.cc
|
| +++ b/ash/shell.cc
|
| @@ -159,18 +159,9 @@ void CreateSpecialContainers(aura::RootWindow* root_window) {
|
| new ToplevelWindowEventFilter(always_on_top_container));
|
| SetChildWindowVisibilityChangesAnimated(always_on_top_container);
|
|
|
| - aura::Window* panel_container = CreateContainer(
|
| - internal::kShellWindowId_PanelContainer,
|
| - "PanelContainer",
|
| - non_lock_screen_containers);
|
| - if (CommandLine::ForCurrentProcess()->
|
| - HasSwitch(switches::kAuraPanelManager)) {
|
| - internal::PanelLayoutManager* layout_manager =
|
| - new internal::PanelLayoutManager(panel_container);
|
| - panel_container->SetEventFilter(
|
| - new internal::PanelWindowEventFilter(panel_container, layout_manager));
|
| - panel_container->SetLayoutManager(layout_manager);
|
| - }
|
| + CreateContainer(internal::kShellWindowId_PanelContainer,
|
| + "PanelContainer",
|
| + non_lock_screen_containers);
|
|
|
| CreateContainer(internal::kShellWindowId_LauncherContainer,
|
| "LauncherContainer",
|
| @@ -739,6 +730,7 @@ void Shell::Init() {
|
| monitor_controller_.reset(new internal::MonitorController);
|
| }
|
|
|
| +
|
| aura::Window* Shell::GetContainer(int container_id) {
|
| return const_cast<aura::Window*>(
|
| const_cast<const Shell*>(this)->GetContainer(container_id));
|
| @@ -826,6 +818,8 @@ void Shell::CreateLauncher() {
|
|
|
| launcher_->SetFocusCycler(focus_cycler_.get());
|
| shelf_->SetLauncher(launcher_.get());
|
| + if (panel_layout_manager_ != NULL)
|
| + panel_layout_manager_->SetLauncher(launcher_.get());
|
|
|
| launcher_->widget()->Show();
|
| }
|
| @@ -873,6 +867,19 @@ void Shell::InitLayoutManagers() {
|
| int index = user_wallpaper_delegate_->GetUserWallpaperIndex();
|
| desktop_background_controller_->SetDesktopBackgroundImageMode(
|
| GetWallpaper(index), GetWallpaperInfo(index).layout);
|
| +
|
| + // Create Panel layout manager
|
| + if (CommandLine::ForCurrentProcess()->
|
| + HasSwitch(switches::kAuraPanelManager)) {
|
| + aura::Window* panel_container = GetContainer(
|
| + internal::kShellWindowId_PanelContainer);
|
| + panel_layout_manager_ =
|
| + new internal::PanelLayoutManager(panel_container);
|
| + panel_container->SetEventFilter(
|
| + new internal::PanelWindowEventFilter(
|
| + panel_container, panel_layout_manager_));
|
| + panel_container->SetLayoutManager(panel_layout_manager_);
|
| + }
|
| }
|
|
|
| void Shell::DisableWorkspaceGridLayout() {
|
|
|