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

Unified Diff: ash/common/shelf/wm_shelf.h

Issue 2293183002: ash: Remove ash::Shelf in favor of ash::WmShelf (Closed)
Patch Set: rebase 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/common/shelf/wm_shelf.h
diff --git a/ash/common/shelf/wm_shelf.h b/ash/common/shelf/wm_shelf.h
index a785551596b4ccbb2e4b29517b9e753b0e22ab18..b5630618e463d2a4490a03c62fafdc7a2dd927fb 100644
--- a/ash/common/shelf/wm_shelf.h
+++ b/ash/common/shelf/wm_shelf.h
@@ -22,7 +22,6 @@ class GestureEvent;
namespace ash {
-class Shelf;
class ShelfLayoutManager;
class ShelfLockingManager;
class ShelfView;
@@ -40,10 +39,7 @@ class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver {
// widget may not exist, or the shelf may not be visible.
static WmShelf* ForWindow(WmWindow* window);
- void SetShelf(Shelf* shelf);
- void ClearShelf();
- Shelf* shelf() const { return shelf_; }
-
+ // TODO(jamescook): Create the ShelfLayoutManager in this class.
virtual void SetShelfLayoutManager(ShelfLayoutManager* manager);
ShelfLayoutManager* shelf_layout_manager() const {
return shelf_layout_manager_;
@@ -51,6 +47,14 @@ class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver {
ShelfWidget* shelf_widget() { return shelf_widget_; }
+ // Creates the shelf view.
+ // TODO(jamescook): Make this create the shelf widget instead.
msw 2016/08/30 22:02:07 nit: I'm not sure about this TODO; it might make s
James Cook 2016/08/30 23:00:56 Removed the comment. I'm still not sure about the
+ void CreateShelf();
msw 2016/08/30 22:02:07 nit: "InitializeShelf" or similar?
James Cook 2016/08/30 23:00:57 Done.
+ void DestroyShelf();
msw 2016/08/30 22:02:07 nit: "ShutdownShelf" or similar?
James Cook 2016/08/30 23:00:57 Done.
+
+ // True after the ShelfView has been created (e.g. after login).
+ bool IsShelfCreated() const;
msw 2016/08/30 22:02:07 optional nit: "IsShelfInitialized" or similar?
James Cook 2016/08/30 23:00:57 Done.
+
// Returns the window showing the shelf.
WmWindow* GetWindow();
@@ -148,10 +152,6 @@ class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver {
BackgroundAnimatorChangeType change_type) override;
private:
- // Legacy shelf controller. Null before login and in secondary display init.
- // Instance lifetimes are managed by ash::RootWindowController and WmShelfMus.
- Shelf* shelf_ = nullptr;
-
// Layout manager for the shelf container window. Instances are constructed by
// ShelfWidget and lifetimes are managed by the container windows themselves.
ShelfLayoutManager* shelf_layout_manager_ = nullptr;
@@ -159,6 +159,10 @@ class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver {
// TODO(jamescook): Move ShelfWidget ownership here.
ShelfWidget* shelf_widget_ = nullptr;
+ // Internal implementation detail. Do not expose externally. Owned by views
+ // hierarchy. Null before login and in secondary display init.
+ ShelfView* shelf_view_ = nullptr;
+
ShelfAlignment alignment_ = SHELF_ALIGNMENT_BOTTOM_LOCKED;
// Sets shelf alignment to bottom during login and screen lock.

Powered by Google App Engine
This is Rietveld 408576698