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

Unified Diff: ash/shelf/shelf_view.h

Issue 1743493002: Cleanup ash shelf accessor functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert ash/shelf/shelf_widget.cc for browser_tests crash... Created 4 years, 10 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_tooltip_manager.cc ('k') | ash/shelf/shelf_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_view.h
diff --git a/ash/shelf/shelf_view.h b/ash/shelf/shelf_view.h
index c9c32b1e97043f8e9bc1d3e6682ae0a125ed1444..4b37d397b4d8d5a4eb90b8b3289d0ffbc06671fa 100644
--- a/ash/shelf/shelf_view.h
+++ b/ash/shelf/shelf_view.h
@@ -34,6 +34,7 @@ class MenuRunner;
}
namespace ash {
+class Shelf;
class ShelfDelegate;
class ShelfIconObserver;
class ShelfItemDelegateManager;
@@ -43,7 +44,6 @@ class DragImageView;
class OverflowBubble;
class OverflowButton;
class ShelfButton;
-class ShelfLayoutManager;
class ShelfTooltipManager;
namespace test {
@@ -64,16 +64,13 @@ class ASH_EXPORT ShelfView : public views::View,
public views::BoundsAnimatorObserver,
public app_list::ApplicationDragAndDropHost {
public:
- ShelfView(ShelfModel* model,
- ShelfDelegate* delegate,
- ShelfLayoutManager* manager);
+ ShelfView(ShelfModel* model, ShelfDelegate* delegate, Shelf* shelf);
~ShelfView() override;
ShelfTooltipManager* tooltip_manager() { return tooltip_.get(); }
- ShelfLayoutManager* shelf_layout_manager() { return layout_manager_; }
-
- ShelfModel* model() { return model_; }
+ Shelf* shelf() const { return shelf_; }
+ ShelfModel* model() const { return model_; }
void Init();
@@ -163,9 +160,7 @@ class ASH_EXPORT ShelfView : public views::View,
// button.
bool is_overflow_mode() const { return overflow_mode_; }
- bool dragging() const {
- return drag_pointer_ != NONE;
- }
+ bool dragging() const { return drag_pointer_ != NONE; }
// Sets the bounds of each view to its ideal bounds.
void LayoutToIdealBounds();
@@ -329,6 +324,9 @@ class ASH_EXPORT ShelfView : public views::View,
// Delegate; owned by Launcher.
ShelfDelegate* delegate_;
+ // The shelf; owned by ShelfWidget.
+ Shelf* shelf_;
+
// Used to manage the set of active launcher buttons. There is a view per
// item in |model_|.
scoped_ptr<views::ViewModel> view_model_;
@@ -428,9 +426,6 @@ class ASH_EXPORT ShelfView : public views::View,
// Holds ShelfItemDelegateManager.
ShelfItemDelegateManager* item_manager_;
- // Holds ShelfLayoutManager.
- ShelfLayoutManager* layout_manager_;
-
// True when this ShelfView is used for Overflow Bubble.
bool overflow_mode_;
« no previous file with comments | « ash/shelf/shelf_tooltip_manager.cc ('k') | ash/shelf/shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698