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

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

Issue 2414303002: Remove usage of FOR_EACH_OBSERVER macro in ash/common (Closed)
Patch Set: Created 4 years, 2 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/common/shelf/shelf_model.cc ('k') | ash/common/system/chromeos/network/vpn_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/wm_shelf.cc
diff --git a/ash/common/shelf/wm_shelf.cc b/ash/common/shelf/wm_shelf.cc
index d1d09c035f76e2bf5deaca46be21aaedfe8fdd08..94c8a3832f25c0ebd8dc18bede0be9ffb46ef5c8 100644
--- a/ash/common/shelf/wm_shelf.cc
+++ b/ash/common/shelf/wm_shelf.cc
@@ -283,7 +283,8 @@ void WmShelf::RemoveObserver(WmShelfObserver* observer) {
}
void WmShelf::NotifyShelfIconPositionsChanged() {
- FOR_EACH_OBSERVER(WmShelfObserver, observers_, OnShelfIconPositionsChanged());
+ for (auto& observer : observers_)
+ observer.OnShelfIconPositionsChanged();
}
StatusAreaWidget* WmShelf::GetStatusAreaWidget() const {
@@ -313,21 +314,21 @@ void WmShelf::WillDeleteShelfLayoutManager() {
}
void WmShelf::WillChangeVisibilityState(ShelfVisibilityState new_state) {
- FOR_EACH_OBSERVER(WmShelfObserver, observers_,
- WillChangeVisibilityState(new_state));
+ for (auto& observer : observers_)
+ observer.WillChangeVisibilityState(new_state);
}
void WmShelf::OnAutoHideStateChanged(ShelfAutoHideState new_state) {
- FOR_EACH_OBSERVER(WmShelfObserver, observers_,
- OnAutoHideStateChanged(new_state));
+ for (auto& observer : observers_)
+ observer.OnAutoHideStateChanged(new_state);
}
void WmShelf::OnBackgroundUpdated(ShelfBackgroundType background_type,
BackgroundAnimatorChangeType change_type) {
if (background_type == GetBackgroundType())
return;
- FOR_EACH_OBSERVER(WmShelfObserver, observers_,
- OnBackgroundTypeChanged(background_type, change_type));
+ for (auto& observer : observers_)
+ observer.OnBackgroundTypeChanged(background_type, change_type);
}
} // namespace ash
« no previous file with comments | « ash/common/shelf/shelf_model.cc ('k') | ash/common/system/chromeos/network/vpn_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698