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

Unified Diff: services/navigation/public/cpp/view.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 | « no previous file | services/ui/public/cpp/input_devices/input_device_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/navigation/public/cpp/view.cc
diff --git a/services/navigation/public/cpp/view.cc b/services/navigation/public/cpp/view.cc
index aab5896dbeea1fe89d4e17b6da93a2f7a54696dd..4fa6009282086d30bd1365fa3814871fbbdf6bed 100644
--- a/services/navigation/public/cpp/view.cc
+++ b/services/navigation/public/cpp/view.cc
@@ -101,7 +101,8 @@ void View::OpenURL(mojom::OpenURLParamsPtr params) {
void View::LoadingStateChanged(bool is_loading) {
is_loading_ = is_loading;
- FOR_EACH_OBSERVER(ViewObserver, observers_, LoadingStateChanged(this));
+ for (auto& observer : observers_)
+ observer.LoadingStateChanged(this);
}
void View::NavigationStateChanged(const GURL& url,
@@ -112,16 +113,18 @@ void View::NavigationStateChanged(const GURL& url,
title_ = base::UTF8ToUTF16(title.get());
can_go_back_ = can_go_back;
can_go_forward_ = can_go_forward;
- FOR_EACH_OBSERVER(ViewObserver, observers_, NavigationStateChanged(this));
+ for (auto& observer : observers_)
+ observer.NavigationStateChanged(this);
}
void View::LoadProgressChanged(double progress) {
- FOR_EACH_OBSERVER(ViewObserver, observers_,
- LoadProgressChanged(this, progress));
+ for (auto& observer : observers_)
+ observer.LoadProgressChanged(this, progress);
}
void View::UpdateHoverURL(const GURL& url) {
- FOR_EACH_OBSERVER(ViewObserver, observers_, HoverTargetURLChanged(this, url));
+ for (auto& observer : observers_)
+ observer.HoverTargetURLChanged(this, url);
}
void View::ViewCreated(mojom::ViewPtr view,
« no previous file with comments | « no previous file | services/ui/public/cpp/input_devices/input_device_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698