| Index: ash/root_window_controller.cc
|
| diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
|
| index 743160facc58f1448272b7cb81cc1872f0f9815a..602c57d856c766845b9e19857ce1d4d82ccb75f9 100644
|
| --- a/ash/root_window_controller.cc
|
| +++ b/ash/root_window_controller.cc
|
| @@ -461,24 +461,23 @@ const aura::Window* RootWindowController::GetContainer(int container_id) const {
|
| }
|
|
|
| void RootWindowController::ShowShelf() {
|
| - if (!shelf_)
|
| + if (!shelf_widget_)
|
| return;
|
| shelf_widget_->SetShelfVisibility(true);
|
| shelf_widget_->status_area_widget()->Show();
|
| }
|
|
|
| void RootWindowController::CreateShelf() {
|
| - if (shelf_)
|
| + if (wm_shelf_aura_->shelf())
|
| return;
|
| - ShelfView* shelf_view = shelf_widget_->CreateShelfView();
|
| -
|
| - shelf_.reset(
|
| - new Shelf(wm_shelf_aura_.get(), shelf_view, shelf_widget_.get()));
|
| - shelf_widget_->set_shelf(shelf_.get());
|
| + Shelf* shelf =
|
| + new Shelf(wm_shelf_aura_.get(), shelf_widget_->CreateShelfView(),
|
| + shelf_widget_.get());
|
| + shelf_widget_->set_shelf(shelf);
|
| // Must be initialized before the delegate is notified because the delegate
|
| // may try to access the WmShelf.
|
| - wm_shelf_aura_->SetShelf(shelf_.get());
|
| - WmShell::Get()->shelf_delegate()->OnShelfCreated(shelf_.get());
|
| + wm_shelf_aura_->SetShelf(base::WrapUnique(shelf));
|
| + WmShell::Get()->shelf_delegate()->OnShelfCreated(shelf);
|
|
|
| if (panel_layout_manager_)
|
| panel_layout_manager_->SetShelf(wm_shelf_aura_.get());
|
| @@ -497,7 +496,7 @@ void RootWindowController::CreateShelf() {
|
| }
|
|
|
| Shelf* RootWindowController::GetShelf() const {
|
| - return shelf_.get();
|
| + return wm_shelf_aura_->shelf();
|
| }
|
|
|
| void RootWindowController::UpdateAfterLoginStatusChange(LoginStatus status) {
|
| @@ -575,7 +574,7 @@ void RootWindowController::CloseChildWindows() {
|
| if (shelf_widget_)
|
| shelf_widget_->Shutdown();
|
|
|
| - wm_shelf_aura_->Shutdown();
|
| + wm_shelf_aura_->SetShelfLayoutManager(nullptr);
|
|
|
| // Close background widget first as it depends on tooltip.
|
| wallpaper_controller_.reset();
|
| @@ -616,7 +615,7 @@ void RootWindowController::CloseChildWindows() {
|
| }
|
|
|
| shelf_widget_.reset();
|
| - shelf_.reset();
|
| + wm_shelf_aura_->SetShelf(nullptr);
|
| }
|
|
|
| void RootWindowController::MoveWindowsTo(aura::Window* dst) {
|
|
|