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

Unified Diff: ash/common/shelf/shelf_view.cc

Issue 2247503002: mash: Create and show a shelf in mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. 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
Index: ash/common/shelf/shelf_view.cc
diff --git a/ash/common/shelf/shelf_view.cc b/ash/common/shelf/shelf_view.cc
index 673fb6e5cc429af4a71398160dfa39c82fff4b8d..969d55e38794560b604926a392a62d9328e164fa 100644
--- a/ash/common/shelf/shelf_view.cc
+++ b/ash/common/shelf/shelf_view.cc
@@ -18,7 +18,6 @@
#include "ash/common/shelf/shelf_button.h"
#include "ash/common/shelf/shelf_constants.h"
#include "ash/common/shelf/shelf_delegate.h"
-#include "ash/common/shelf/shelf_icon_observer.h"
#include "ash/common/shelf/shelf_menu_model.h"
#include "ash/common/shelf/shelf_model.h"
#include "ash/common/shelf/wm_shelf.h"
@@ -1053,14 +1052,6 @@ int ShelfView::DetermineFirstVisiblePanelIndex(int min_value) const {
return index;
}
-void ShelfView::AddIconObserver(ShelfIconObserver* observer) {
- observers_.AddObserver(observer);
-}
-
-void ShelfView::RemoveIconObserver(ShelfIconObserver* observer) {
- observers_.RemoveObserver(observer);
-}
-
void ShelfView::AnimateToIdealBounds() {
IdealBounds ideal_bounds;
CalculateIdealBounds(&ideal_bounds);
@@ -1598,8 +1589,7 @@ void ShelfView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
// immediately.
BoundsAnimatorDisabler disabler(bounds_animator_.get());
LayoutToIdealBounds();
- FOR_EACH_OBSERVER(ShelfIconObserver, observers_,
- OnShelfIconPositionsChanged());
+ wm_shelf_->NotifyShelfIconPositionsChanged();
if (IsShowingOverflowBubble())
overflow_bubble_->Hide();
@@ -1882,8 +1872,7 @@ void ShelfView::OnMenuClosed(views::InkDrop* ink_drop) {
}
void ShelfView::OnBoundsAnimatorProgressed(views::BoundsAnimator* animator) {
- FOR_EACH_OBSERVER(ShelfIconObserver, observers_,
- OnShelfIconPositionsChanged());
+ wm_shelf_->NotifyShelfIconPositionsChanged();
PreferredSizeChanged();
}

Powered by Google App Engine
This is Rietveld 408576698