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

Unified Diff: ash/shelf/shelf_button.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_alignment_menu.cc ('k') | ash/shelf/shelf_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_button.h
diff --git a/ash/shelf/shelf_button.h b/ash/shelf/shelf_button.h
index 20dea7d72126096ca86d38df79b66037910db88d..4e63e9e31db7104b87292f3d57e884ac7227595c 100644
--- a/ash/shelf/shelf_button.h
+++ b/ash/shelf/shelf_button.h
@@ -12,8 +12,8 @@
#include "ui/views/controls/image_view.h"
namespace ash {
+class Shelf;
class ShelfButtonHost;
-class ShelfLayoutManager;
// Button used for items on the launcher, except for the AppList.
class ASH_EXPORT ShelfButton : public views::CustomButton {
@@ -43,7 +43,7 @@ class ASH_EXPORT ShelfButton : public views::CustomButton {
// Called to create an instance of a ShelfButton.
static ShelfButton* Create(views::ButtonListener* listener,
ShelfButtonHost* host,
- ShelfLayoutManager* shelf_layout_manager);
+ Shelf* shelf);
// Sets the image to display for this entry.
void SetImage(const gfx::ImageSkia& image);
@@ -55,9 +55,7 @@ class ASH_EXPORT ShelfButton : public views::CustomButton {
void AddState(State state);
void ClearState(State state);
int state() const { return state_; }
- const ShelfLayoutManager* shelf_layout_manager() const {
- return shelf_layout_manager_;
- }
+ const Shelf* shelf() const { return shelf_; }
// Returns the bounds of the icon.
gfx::Rect GetIconBounds() const;
@@ -72,7 +70,7 @@ class ASH_EXPORT ShelfButton : public views::CustomButton {
protected:
ShelfButton(views::ButtonListener* listener,
ShelfButtonHost* host,
- ShelfLayoutManager* shelf_layout_manager);
+ Shelf* shelf);
// Class that draws the icon part of a button, so it can be animated
// independently of the rest. This can be subclassed to provide a custom
@@ -123,10 +121,6 @@ class ASH_EXPORT ShelfButton : public views::CustomButton {
private:
class BarView;
- // Returns true if the shelf is horizontal. If this returns false the shelf is
- // vertical.
- bool IsShelfHorizontal() const;
-
// Updates the parts of the button to reflect the current |state_| and
// alignment. This may add or remove views, layout and paint.
void UpdateState();
@@ -142,7 +136,7 @@ class ASH_EXPORT ShelfButton : public views::CustomButton {
// together.
int state_;
- ShelfLayoutManager* shelf_layout_manager_;
+ Shelf* shelf_;
gfx::ShadowValues icon_shadows_;
« no previous file with comments | « ash/shelf/shelf_alignment_menu.cc ('k') | ash/shelf/shelf_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698