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

Unified Diff: ash/mus/bridge/wm_shelf_mus.cc

Issue 2304443002: ash: Move ShelfWidget ownership to WmShelf and refactor access to it (Closed)
Patch Set: typo Created 4 years, 4 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
Index: ash/mus/bridge/wm_shelf_mus.cc
diff --git a/ash/mus/bridge/wm_shelf_mus.cc b/ash/mus/bridge/wm_shelf_mus.cc
index 0b03fcff97c8928fc6b9974b89897563e042dc48..f2f08421abef95daa248b9492ca70618522468e9 100644
--- a/ash/mus/bridge/wm_shelf_mus.cc
+++ b/ash/mus/bridge/wm_shelf_mus.cc
@@ -5,7 +5,6 @@
#include "ash/mus/bridge/wm_shelf_mus.h"
#include "ash/common/shelf/shelf_widget.h"
-#include "ash/common/shell_window_ids.h"
#include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
@@ -17,21 +16,19 @@ WmShelfMus::WmShelfMus(WmRootWindowController* root_window_controller) {
DCHECK(root_window_controller);
WmShell::Get()->CreateShelfDelegate();
WmWindow* root = root_window_controller->GetWindow();
- shelf_widget_.reset(new ShelfWidget(
- root->GetChildByShellWindowId(kShellWindowId_ShelfContainer),
- root->GetChildByShellWindowId(kShellWindowId_StatusContainer), this));
+ CreateShelfWidget(root);
InitializeShelf();
WmShell::Get()->NotifyShelfCreatedForRootWindow(root);
- shelf_widget_->PostCreateShelf();
+ shelf_widget()->PostCreateShelf();
}
WmShelfMus::~WmShelfMus() {
- shelf_widget_.reset();
+ DestroyShelfWidget();
ShutdownShelf();
}
void WmShelfMus::WillDeleteShelfLayoutManager() {
- shelf_widget_->Shutdown();
+ ShutdownShelfWidget();
WmShelf::WillDeleteShelfLayoutManager();
}

Powered by Google App Engine
This is Rietveld 408576698