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

Unified Diff: ash/shelf/shelf_widget.h

Issue 2235233006: ash: Refactor Shelf ownership and ShelfView creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « ash/shelf/shelf.cc ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_widget.h
diff --git a/ash/shelf/shelf_widget.h b/ash/shelf/shelf_widget.h
index 9efbd633c9394062c76573bc6029d28cc8b91acf..83bd7b2e403d273709488c5ee7906f534776179e 100644
--- a/ash/shelf/shelf_widget.h
+++ b/ash/shelf/shelf_widget.h
@@ -20,6 +20,7 @@ namespace ash {
class FocusCycler;
class Shelf;
class ShelfLayoutManager;
+class ShelfView;
class StatusAreaWidget;
class WmShelfAura;
class WmWindow;
@@ -39,6 +40,8 @@ class ASH_EXPORT ShelfWidget : public views::Widget,
static bool ShelfAlignmentAllowed();
void OnShelfAlignmentChanged();
+
+ // DEPRECATED: Prefer WmShelf::GetAlignment().
ShelfAlignment GetAlignment() const;
// Sets the shelf's background type.
@@ -55,11 +58,14 @@ class ASH_EXPORT ShelfWidget : public views::Widget,
void SetDimsShelf(bool dimming);
bool GetDimsShelf() const;
+ // TODO(jamescook): Eliminate these.
+ Shelf* shelf() { return shelf_; }
+ void set_shelf(Shelf* shelf) { shelf_ = shelf; }
+
ShelfLayoutManager* shelf_layout_manager() { return shelf_layout_manager_; }
- Shelf* shelf() const { return shelf_.get(); }
StatusAreaWidget* status_area_widget() const { return status_area_widget_; }
- void CreateShelf();
+ ShelfView* CreateShelfView();
void PostCreateShelf();
// Set visibility of the shelf.
@@ -108,12 +114,15 @@ class ASH_EXPORT ShelfWidget : public views::Widget,
// Owned by the shelf container's aura::Window.
ShelfLayoutManager* shelf_layout_manager_;
- std::unique_ptr<Shelf> shelf_;
+ // Owned by the root window controller.
+ Shelf* shelf_;
StatusAreaWidget* status_area_widget_;
// |delegate_view_| is the contents view of this widget and is cleaned up
// during CloseChildWindows of the associated RootWindowController.
DelegateView* delegate_view_;
+ // View containing the shelf items. Owned by the views hierarchy.
+ ShelfView* shelf_view_;
ShelfBackgroundAnimator background_animator_;
bool activating_as_fallback_;
« no previous file with comments | « ash/shelf/shelf.cc ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698