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

Unified Diff: ash/aura/wm_shell_aura.cc

Issue 2420863002: Remove usage of FOR_EACH_OBSERVER macro in ash/aura (Closed)
Patch Set: braces 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 | « ash/aura/pointer_watcher_adapter.cc ('k') | ash/aura/wm_window_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/aura/wm_shell_aura.cc
diff --git a/ash/aura/wm_shell_aura.cc b/ash/aura/wm_shell_aura.cc
index a34cc4c6b2d343b425b5b703cad5d86a1120f9fe..9e0150bc6d91511690b566268a56d1b2aa24bb5e 100644
--- a/ash/aura/wm_shell_aura.cc
+++ b/ash/aura/wm_shell_aura.cc
@@ -308,26 +308,26 @@ void WmShellAura::OnWindowActivated(
WmWindow* lost_active_wm = WmWindowAura::Get(lost_active);
if (gained_active_wm)
set_root_window_for_new_windows(gained_active_wm->GetRootWindow());
- FOR_EACH_OBSERVER(WmActivationObserver, activation_observers_,
- OnWindowActivated(gained_active_wm, lost_active_wm));
+ for (auto& observer : activation_observers_)
+ observer.OnWindowActivated(gained_active_wm, lost_active_wm);
}
void WmShellAura::OnAttemptToReactivateWindow(aura::Window* request_active,
aura::Window* actual_active) {
- FOR_EACH_OBSERVER(
- WmActivationObserver, activation_observers_,
- OnAttemptToReactivateWindow(WmWindowAura::Get(request_active),
- WmWindowAura::Get(actual_active)));
+ for (auto& observer : activation_observers_) {
+ observer.OnAttemptToReactivateWindow(WmWindowAura::Get(request_active),
+ WmWindowAura::Get(actual_active));
+ }
}
void WmShellAura::OnDisplayConfigurationChanging() {
- FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_,
- OnDisplayConfigurationChanging());
+ for (auto& observer : display_observers_)
+ observer.OnDisplayConfigurationChanging();
}
void WmShellAura::OnDisplayConfigurationChanged() {
- FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_,
- OnDisplayConfigurationChanged());
+ for (auto& observer : display_observers_)
+ observer.OnDisplayConfigurationChanged();
}
} // namespace ash
« no previous file with comments | « ash/aura/pointer_watcher_adapter.cc ('k') | ash/aura/wm_window_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698