Chromium Code Reviews| Index: ash/common/shelf/wm_shelf.h |
| diff --git a/ash/common/shelf/wm_shelf.h b/ash/common/shelf/wm_shelf.h |
| index aa1abe5ff65969e233acd9d26a3b86c74ba31265..514c1487982b0344b95247d67a9a7f8f03a386a2 100644 |
| --- a/ash/common/shelf/wm_shelf.h |
| +++ b/ash/common/shelf/wm_shelf.h |
| @@ -39,13 +39,15 @@ class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver { |
| // widget may not exist, or the shelf may not be visible. |
| static WmShelf* ForWindow(WmWindow* window); |
| - // TODO(jamescook): Create the ShelfLayoutManager in this class. |
| - virtual void SetShelfLayoutManager(ShelfLayoutManager* manager); |
| + virtual void CreateShelfWidget(WmWindow* root); |
|
James Cook
2016/08/31 22:18:08
Ugly, but at least it makes the steps explicit.
|
| + void ShutdownShelfWidget(); |
| + void DestroyShelfWidget(); |
| + |
| ShelfLayoutManager* shelf_layout_manager() const { |
| return shelf_layout_manager_; |
| } |
| - ShelfWidget* shelf_widget() { return shelf_widget_; } |
| + ShelfWidget* shelf_widget() { return shelf_widget_.get(); } |
| // Creates the shelf view. |
| void InitializeShelf(); |
| @@ -155,8 +157,7 @@ class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver { |
| // ShelfWidget and lifetimes are managed by the container windows themselves. |
| ShelfLayoutManager* shelf_layout_manager_ = nullptr; |
| - // TODO(jamescook): Move ShelfWidget ownership here. |
| - ShelfWidget* shelf_widget_ = nullptr; |
| + std::unique_ptr<ShelfWidget> shelf_widget_; |
| // Internal implementation detail. Do not expose externally. Owned by views |
| // hierarchy. Null before login and in secondary display init. |