0

Remove usage of FOR_EACH_OBSERVER macro in apps/

Observer lists now support range-based for loops.

BUG=655021

Review-Url: https://codereview.chromium.org/2422543002
Cr-Commit-Position: refs/heads/master@{#425802}
This commit is contained in:
ericwilligers
2016-10-17 15:55:09 -07:00
committed by Commit bot
parent ce4bc516c7
commit 01080f9de6

@ -125,23 +125,28 @@ bool AppLifetimeMonitor::HasOtherVisibleAppWindows(
}
void AppLifetimeMonitor::NotifyAppStart(const std::string& app_id) {
FOR_EACH_OBSERVER(Observer, observers_, OnAppStart(profile_, app_id));
for (auto& observer : observers_)
observer.OnAppStart(profile_, app_id);
}
void AppLifetimeMonitor::NotifyAppActivated(const std::string& app_id) {
FOR_EACH_OBSERVER(Observer, observers_, OnAppActivated(profile_, app_id));
for (auto& observer : observers_)
observer.OnAppActivated(profile_, app_id);
}
void AppLifetimeMonitor::NotifyAppDeactivated(const std::string& app_id) {
FOR_EACH_OBSERVER(Observer, observers_, OnAppDeactivated(profile_, app_id));
for (auto& observer : observers_)
observer.OnAppDeactivated(profile_, app_id);
}
void AppLifetimeMonitor::NotifyAppStop(const std::string& app_id) {
FOR_EACH_OBSERVER(Observer, observers_, OnAppStop(profile_, app_id));
for (auto& observer : observers_)
observer.OnAppStop(profile_, app_id);
}
void AppLifetimeMonitor::NotifyChromeTerminating() {
FOR_EACH_OBSERVER(Observer, observers_, OnChromeTerminating());
for (auto& observer : observers_)
observer.OnChromeTerminating();
}
} // namespace apps