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

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: review comments 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
« no previous file with comments | « ash/mus/bridge/wm_shelf_mus.h ('k') | ash/mus/root_window_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..657ab36b7e1e2e422ac7b7decbc6e34051cc3c91 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"
@@ -13,25 +12,22 @@
namespace ash {
namespace mus {
-WmShelfMus::WmShelfMus(WmRootWindowController* root_window_controller) {
- DCHECK(root_window_controller);
+WmShelfMus::WmShelfMus(WmWindow* root_window) {
+ DCHECK(root_window);
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_window);
InitializeShelf();
- WmShell::Get()->NotifyShelfCreatedForRootWindow(root);
- shelf_widget_->PostCreateShelf();
+ WmShell::Get()->NotifyShelfCreatedForRootWindow(root_window);
+ shelf_widget()->PostCreateShelf();
}
WmShelfMus::~WmShelfMus() {
- shelf_widget_.reset();
+ DestroyShelfWidget();
ShutdownShelf();
}
void WmShelfMus::WillDeleteShelfLayoutManager() {
- shelf_widget_->Shutdown();
+ ShutdownShelfWidget();
WmShelf::WillDeleteShelfLayoutManager();
}
« no previous file with comments | « ash/mus/bridge/wm_shelf_mus.h ('k') | ash/mus/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698