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

Unified Diff: mash/shelf/shelf_button.h

Issue 1585363002: Fork a subset of ash/shelf for use in mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ui/resources dep; comment out unused constants. Created 4 years, 11 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 | « mash/shelf/shelf_application.cc ('k') | mash/shelf/shelf_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/shelf/shelf_button.h
diff --git a/ash/shelf/shelf_button.h b/mash/shelf/shelf_button.h
similarity index 85%
copy from ash/shelf/shelf_button.h
copy to mash/shelf/shelf_button.h
index 20dea7d72126096ca86d38df79b66037910db88d..83b1bc38ad2e2e7ef7dd12ac9bb3fedd7626cdca 100644
--- a/ash/shelf/shelf_button.h
+++ b/mash/shelf/shelf_button.h
@@ -2,21 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ASH_SHELF_SHELF_BUTTON_H_
-#define ASH_SHELF_SHELF_BUTTON_H_
+#ifndef MASH_SHELF_SHELF_BUTTON_H_
+#define MASH_SHELF_SHELF_BUTTON_H_
-#include "ash/ash_export.h"
#include "base/macros.h"
+#include "mash/shelf/shelf_types.h"
#include "ui/gfx/shadow_value.h"
#include "ui/views/controls/button/custom_button.h"
#include "ui/views/controls/image_view.h"
-namespace ash {
+namespace mash {
+namespace shelf {
class ShelfButtonHost;
-class ShelfLayoutManager;
// Button used for items on the launcher, except for the AppList.
-class ASH_EXPORT ShelfButton : public views::CustomButton {
+class ShelfButton : public views::CustomButton {
public:
static const char kViewClassName[];
@@ -42,8 +42,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);
+ ShelfButtonHost* host);
// Sets the image to display for this entry.
void SetImage(const gfx::ImageSkia& image);
@@ -55,9 +54,6 @@ 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_;
- }
// Returns the bounds of the icon.
gfx::Rect GetIconBounds() const;
@@ -71,8 +67,7 @@ class ASH_EXPORT ShelfButton : public views::CustomButton {
protected:
ShelfButton(views::ButtonListener* listener,
- ShelfButtonHost* host,
- ShelfLayoutManager* shelf_layout_manager);
+ ShelfButtonHost* host);
// 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 +118,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,8 +133,6 @@ class ASH_EXPORT ShelfButton : public views::CustomButton {
// together.
int state_;
- ShelfLayoutManager* shelf_layout_manager_;
-
gfx::ShadowValues icon_shadows_;
// If non-null the destuctor sets this to true. This is set while the menu is
@@ -153,6 +142,7 @@ class ASH_EXPORT ShelfButton : public views::CustomButton {
DISALLOW_COPY_AND_ASSIGN(ShelfButton);
};
-} // namespace ash
+} // namespace shelf
+} // namespace mash
-#endif // ASH_SHELF_SHELF_BUTTON_H_
+#endif // MASH_SHELF_SHELF_BUTTON_H_
« no previous file with comments | « mash/shelf/shelf_application.cc ('k') | mash/shelf/shelf_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698