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

Unified Diff: services/ui/ws/focus_controller.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 | « services/ui/ws/animation_runner.cc ('k') | services/ui/ws/server_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/focus_controller.cc
diff --git a/services/ui/ws/focus_controller.cc b/services/ui/ws/focus_controller.cc
index ad9685b4d4d938269d1fb295701b583ff1562719..8ee22801bd050d5e70537c7d1e4e9b728226e11e 100644
--- a/services/ui/ws/focus_controller.cc
+++ b/services/ui/ws/focus_controller.cc
@@ -148,8 +148,8 @@ void FocusController::SetActiveWindow(ServerWindow* window,
ServerWindow* old_active = active_window_;
active_window_ = window;
activation_reason_ = reason;
- FOR_EACH_OBSERVER(FocusControllerObserver, observers_,
- OnActivationChanged(old_active, active_window_));
+ for (auto& observer : observers_)
+ observer.OnActivationChanged(old_active, active_window_);
if (active_window_ && activation_reason_ == ActivationChangeReason::CYCLE)
cycle_windows_->Add(active_window_);
}
@@ -223,8 +223,8 @@ bool FocusController::SetFocusedWindowImpl(
SetActiveWindow(GetActivatableAncestorOf(window),
ActivationChangeReason::FOCUS);
- FOR_EACH_OBSERVER(FocusControllerObserver, observers_,
- OnFocusChanged(change_source, old_focused, window));
+ for (auto& observer : observers_)
+ observer.OnFocusChanged(change_source, old_focused, window);
focused_window_ = window;
// We can currently use only a single ServerWindowDrawnTracker since focused
« no previous file with comments | « services/ui/ws/animation_runner.cc ('k') | services/ui/ws/server_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698