Chromium Code Reviews| 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..58aca961a97e85d279ffc6efdc1b352178dcd62a 100644 |
| --- a/ash/aura/wm_shell_aura.cc |
| +++ b/ash/aura/wm_shell_aura.cc |
| @@ -308,26 +308,25 @@ 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_) |
|
Daniel Erat
2016/10/14 15:18:20
nit: you need to add curly brackets on this one
Eric Willigers
2016/10/14 20:16:50
Done.
|
| + 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 |