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

Unified Diff: ui/compositor/layer.cc

Issue 2417613003: Remove usage of FOR_EACH_OBSERVER macro in ui/compositor/. (Closed)
Patch Set: Add missing entries. 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 | « ui/compositor/compositor_vsync_manager.cc ('k') | ui/compositor/layer_animation_sequence.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 67886fcbe8c2c8c4bd925112d08d31cf7435f6a4..aa599ddfc2e4379ba45e916edd89e970d0f49622 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -96,7 +96,8 @@ Layer::Layer(LayerType type)
}
Layer::~Layer() {
- FOR_EACH_OBSERVER(LayerObserver, observer_list_, LayerDestroyed(this));
+ for (auto& observer : observer_list_)
+ observer.LayerDestroyed(this);
// Destroying the animator may cause observers to use the layer (and
// indirectly the WebLayer). Destroy the animator first so that the WebLayer
@@ -592,7 +593,8 @@ void Layer::SetShowSurface(
frame_size_in_dip_ = frame_size_in_dip;
RecomputeDrawsContentAndUVRect();
- FOR_EACH_OBSERVER(LayerObserver, observer_list_, SurfaceChanged(this));
+ for (auto& observer : observer_list_)
+ observer.SurfaceChanged(this);
}
void Layer::SetShowSolidColorContent() {
@@ -795,8 +797,8 @@ scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList(
PaintContext(display_list.get(), device_scale_factor_, invalidation));
}
display_list->Finalize();
- FOR_EACH_OBSERVER(LayerObserver, observer_list_,
- DidPaintLayer(this, invalidation));
+ for (auto& observer : observer_list_)
+ observer.DidPaintLayer(this, invalidation);
return display_list;
}
« no previous file with comments | « ui/compositor/compositor_vsync_manager.cc ('k') | ui/compositor/layer_animation_sequence.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698