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

Unified Diff: ui/views/focus/focus_manager.cc

Issue 2417463009: Remove usage of FOR_EACH_OBSERVER macro in ui/views/. (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 | « ui/views/animation/bounds_animator.cc ('k') | ui/views/focus/widget_focus_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/focus/focus_manager.cc
diff --git a/ui/views/focus/focus_manager.cc b/ui/views/focus/focus_manager.cc
index 80a4dc8d6bdd0c7b67ee984e6081e434cebe6db1..ffcbd97b6677741f0118b8c1faa4012da950ac4c 100644
--- a/ui/views/focus/focus_manager.cc
+++ b/ui/views/focus/focus_manager.cc
@@ -317,8 +317,8 @@ void FocusManager::SetFocusedViewWithReason(
// Update the reason for the focus change (since this is checked by
// some listeners), then notify all listeners.
focus_change_reason_ = reason;
- FOR_EACH_OBSERVER(FocusChangeListener, focus_change_listeners_,
- OnWillChangeFocus(focused_view_, view));
+ for (auto& observer : focus_change_listeners_)
+ observer.OnWillChangeFocus(focused_view_, view);
View* old_focused_view = focused_view_;
focused_view_ = view;
@@ -331,8 +331,8 @@ void FocusManager::SetFocusedViewWithReason(
if (focused_view_)
focused_view_->Focus();
- FOR_EACH_OBSERVER(FocusChangeListener, focus_change_listeners_,
- OnDidChangeFocus(old_focused_view, focused_view_));
+ for (auto& observer : focus_change_listeners_)
+ observer.OnDidChangeFocus(old_focused_view, focused_view_);
}
void FocusManager::ClearFocus() {
« no previous file with comments | « ui/views/animation/bounds_animator.cc ('k') | ui/views/focus/widget_focus_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698