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

Unified Diff: ash/shelf/wm_shelf.h

Issue 2889673002: chromeos: Refactor shelf to create ShelfView earlier in startup (Closed)
Patch Set: Move ShelfView to initializer list Created 3 years, 7 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/shelf/wm_shelf.h
diff --git a/ash/shelf/wm_shelf.h b/ash/shelf/wm_shelf.h
index 491f35e1b3ae4369371787afdf5671ffad546928..78eb18be4cf06aa5149cfe4a035859567eb7a349 100644
--- a/ash/shelf/wm_shelf.h
+++ b/ash/shelf/wm_shelf.h
@@ -33,8 +33,9 @@ class StatusAreaWidget;
class WmShelfObserver;
class WmWindow;
-// Controller for the shelf state. Exists for the lifetime of each root window
-// controller. Note that the shelf widget may not be created until after login.
James Cook 2017/05/16 21:32:35 This bit about the widget was a lie.
msw 2017/05/16 22:42:00 Acknowledged.
+// Controller for the shelf state. One per display, because each display might
+// have different shelf alignment, autohide, etc. Exists for the lifetime of the
+// root window controller.
class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver {
msw 2017/05/16 22:42:00 Should we rename this to Shelf at some point? :D
James Cook 2017/05/17 16:16:13 Yeah. Or ShelfController (and merge with the exist
public:
WmShelf();
@@ -58,14 +59,8 @@ class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver {
ShelfWidget* shelf_widget() { return shelf_widget_.get(); }
- // Creates the shelf view.
- void CreateShelfView();
-
// TODO(jamescook): Eliminate this method.
- void ShutdownShelf();
-
- // True after the ShelfView has been created (e.g. after login).
- bool IsShelfInitialized() const;
+ void NotifyShelfInitialized();
// Returns the window showing the shelf.
WmWindow* GetWindow();
@@ -159,10 +154,6 @@ class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver {
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.
- ShelfView* shelf_view_ = nullptr;
-
// These initial values hide the shelf until user preferences are available.
ShelfAlignment alignment_ = SHELF_ALIGNMENT_BOTTOM_LOCKED;
ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_ALWAYS_HIDDEN;

Powered by Google App Engine
This is Rietveld 408576698