Chromium Code Reviews| Index: ash/shell.cc |
| diff --git a/ash/shell.cc b/ash/shell.cc |
| index 21af31b1ea29c6dd4ae24d33b6fdb4e43ec7f946..80ff6d28ee316704207915272f9aff561d173de2 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_AppListContainer, |
| "AppListContainer", |
| @@ -764,6 +755,7 @@ void Shell::Init() { |
| monitor_controller_.reset(new internal::MonitorController); |
| } |
|
sky
2012/04/03 20:39:37
Remove this line.
|
| + |
| aura::Window* Shell::GetContainer(int container_id) { |
| return const_cast<aura::Window*>( |
| const_cast<const Shell*>(this)->GetContainer(container_id)); |
| @@ -853,6 +845,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(); |
| } |
| @@ -920,6 +914,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() { |