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

Unified Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 2422923002: Reduce usage of FOR_EACH_OBSERVER macro in content/browser (Closed)
Patch Set: skip cases in 2418143004 and 2418373002 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
Index: content/browser/compositor/gpu_process_transport_factory.cc
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index fdb0fc4d431a36e6ee4a7d12cab364173f71c83a..f1445c9faee43f08aa2ad8cbe978a9a3b7569c5d 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -613,8 +613,8 @@ void GpuProcessTransportFactory::RemoveCompositor(ui::Compositor* compositor) {
// If there are any observer left at this point, make sure they clean up
// before we destroy the GLHelper.
- FOR_EACH_OBSERVER(ui::ContextFactoryObserver, observer_list_,
- OnLostResources());
+ for (auto& observer : observer_list_)
+ observer.OnLostResources();
helper.reset();
DCHECK(!gl_helper_) << "Destroying the GLHelper should not cause a new "
@@ -856,8 +856,8 @@ void GpuProcessTransportFactory::OnLostMainThreadSharedContext() {
std::unique_ptr<display_compositor::GLHelper> lost_gl_helper =
std::move(gl_helper_);
- FOR_EACH_OBSERVER(ui::ContextFactoryObserver, observer_list_,
- OnLostResources());
+ for (auto& observer : observer_list_)
+ observer.OnLostResources();
// Kill things that use the shared context before killing the shared context.
lost_gl_helper.reset();
« no previous file with comments | « content/browser/browser_child_process_host_impl.cc ('k') | content/browser/devtools/service_worker_devtools_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698