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

Unified Diff: ash/shelf/shelf_view.h

Issue 2053113002: Replaced BackgroundAnimator with ShelfBackgroundAnimator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into animate_shelf_chip_backgrounds Created 4 years, 5 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_layout_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 8af3d1e4882ceaef8a3df332948e784c3b0fe990..63138dddb26eac2211a1f24c6c727255a64b99ae 100644
--- a/ash/shelf/shelf_view.h
+++ b/ash/shelf/shelf_view.h
@@ -11,6 +11,7 @@
#include <vector>
#include "ash/common/shelf/ink_drop_button_listener.h"
+#include "ash/common/shelf/shelf_background_animator_observer.h"
#include "ash/common/shelf/shelf_button_pressed_metric_tracker.h"
#include "ash/common/shelf/shelf_item_delegate.h"
#include "ash/common/shelf/shelf_model_observer.h"
@@ -44,6 +45,7 @@ class OverflowBubble;
class OverflowButton;
class ScopedTargetRootWindow;
class Shelf;
+class ShelfBackgroundAnimator;
class ShelfButton;
class ShelfDelegate;
class ShelfIconObserver;
@@ -61,6 +63,7 @@ extern const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_RIGHT;
extern const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_COUNT;
class ASH_EXPORT ShelfView : public views::View,
+ public ShelfBackgroundAnimatorObserver,
public ShelfModelObserver,
public InkDropButtonListener,
public views::ContextMenuController,
@@ -71,7 +74,8 @@ class ASH_EXPORT ShelfView : public views::View,
ShelfView(ShelfModel* model,
ShelfDelegate* delegate,
WmShelf* wm_shelf,
- Shelf* shelf);
+ Shelf* shelf,
+ ShelfBackgroundAnimator* background_animator);
~ShelfView() override;
Shelf* shelf() const { return shelf_; }
@@ -283,6 +287,9 @@ class ASH_EXPORT ShelfView : public views::View,
// Overridden from ui::EventHandler:
void OnGestureEvent(ui::GestureEvent* event) override;
+ // ShelfBackgroundAnimatorObserver:
+ void UpdateShelfItemBackground(int alpha) override;
+
// Overridden from ShelfModelObserver:
void ShelfItemAdded(int model_index) override;
void ShelfItemRemoved(int model_index, ShelfID id) override;
@@ -468,6 +475,9 @@ class ASH_EXPORT ShelfView : public views::View,
// Tracks UMA metrics based on shelf button press actions.
ShelfButtonPressedMetricTracker shelf_button_pressed_metric_tracker_;
+ // The background animator to observe. Can be null.
+ ShelfBackgroundAnimator* background_animator_;
+
DISALLOW_COPY_AND_ASSIGN(ShelfView);
};
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/shelf/shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698