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

Unified Diff: services/ui/ws/animation_runner.cc

Issue 2424613002: Remove usage of FOR_EACH_OBSERVER macro in services/ (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 | « services/ui/public/cpp/window_tree_client.cc ('k') | services/ui/ws/focus_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/animation_runner.cc
diff --git a/services/ui/ws/animation_runner.cc b/services/ui/ws/animation_runner.cc
index a52332d8f83eb8a29ff3f3534549330cd74c27be..5f03c74208e8a91fa27a92ea3caa7d3bb8403384 100644
--- a/services/ui/ws/animation_runner.cc
+++ b/services/ui/ws/animation_runner.cc
@@ -79,8 +79,8 @@ AnimationRunner::AnimationId AnimationRunner::Schedule(
id_to_windows_map_[animation_id].insert(window);
}
- FOR_EACH_OBSERVER(AnimationRunnerObserver, observers_,
- OnAnimationScheduled(animation_id));
+ for (auto& observer : observers_)
+ observer.OnAnimationScheduled(animation_id);
return animation_id;
}
@@ -122,7 +122,8 @@ void AnimationRunner::Tick(base::TimeTicks time) {
}
}
for (const AnimationId& id : animations_completed) {
- FOR_EACH_OBSERVER(AnimationRunnerObserver, observers_, OnAnimationDone(id));
+ for (auto& observer : observers_)
+ observer.OnAnimationDone(id);
}
}
@@ -135,11 +136,11 @@ void AnimationRunner::CancelAnimationForWindowImpl(ServerWindow* window,
if (RemoveWindowFromMaps(window)) {
// This was the last window in the group.
if (source == CANCEL_SOURCE_CANCEL) {
- FOR_EACH_OBSERVER(AnimationRunnerObserver, observers_,
- OnAnimationCanceled(animation_id));
+ for (auto& observer : observers_)
+ observer.OnAnimationCanceled(animation_id);
} else {
- FOR_EACH_OBSERVER(AnimationRunnerObserver, observers_,
- OnAnimationInterrupted(animation_id));
+ for (auto& observer : observers_)
+ observer.OnAnimationInterrupted(animation_id);
}
}
}
« no previous file with comments | « services/ui/public/cpp/window_tree_client.cc ('k') | services/ui/ws/focus_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698