| 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();
|
| }
|
|
|
|
|