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

Unified Diff: ash/root_window_controller.cc

Issue 2041583004: mash: Move WmShelfAura ownership to RootWindowController and init it earlier (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moveshelftypes
Patch Set: . Created 4 years, 6 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/root_window_controller.h ('k') | ash/shelf/shelf.h » ('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 a444afa9b5894581bb9e9ee9b76cfc86cd6ccd88..b79eb6f4198bcc11a30ee283526545f0540f3f9f 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -403,12 +403,12 @@ void RootWindowController::ShowShelf() {
void RootWindowController::CreateShelf() {
if (shelf_widget_->shelf())
return;
- shelf_widget_->CreateShelf();
+ shelf_widget_->CreateShelf(wm_shelf_aura_.get());
if (panel_layout_manager_)
- panel_layout_manager_->SetShelf(shelf_widget_->shelf()->wm_shelf());
+ panel_layout_manager_->SetShelf(wm_shelf_aura_.get());
if (docked_layout_manager_) {
- docked_layout_manager_->SetShelf(shelf_widget_->shelf()->wm_shelf());
+ docked_layout_manager_->SetShelf(wm_shelf_aura_.get());
if (shelf_widget_->shelf_layout_manager())
docked_layout_manager_->AddObserver(
shelf_widget_->shelf_layout_manager());
@@ -500,6 +500,8 @@ void RootWindowController::CloseChildWindows() {
if (shelf_widget_)
shelf_widget_->Shutdown();
+ wm_shelf_aura_->Shutdown();
+
// Close background widget first as it depends on tooltip.
wallpaper_controller_.reset();
animating_wallpaper_controller_.reset();
@@ -663,6 +665,7 @@ void RootWindowController::SetTouchAccessibilityAnchorPoint(
RootWindowController::RootWindowController(AshWindowTreeHost* ash_host)
: ash_host_(ash_host),
+ wm_shelf_aura_(new WmShelfAura),
docked_layout_manager_(NULL),
panel_layout_manager_(NULL),
touch_hud_debug_(NULL),
@@ -762,6 +765,7 @@ void RootWindowController::InitLayoutManagers() {
WmWindowAura::Get(GetContainer(kShellWindowId_StatusContainer));
shelf_widget_.reset(new ShelfWidget(shelf_container, status_container,
workspace_controller()));
+ wm_shelf_aura_->SetShelfLayoutManager(shelf_widget_->shelf_layout_manager());
workspace_layout_manager_delegate->set_shelf(
shelf_widget_->shelf_layout_manager());
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shelf/shelf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698