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

Unified Diff: ui/views/win/windows_session_change_observer.cc

Issue 2418983002: ui/views: convert usage of FOR_EACH_OBSERVER macro (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/widget/widget.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/win/windows_session_change_observer.cc
diff --git a/ui/views/win/windows_session_change_observer.cc b/ui/views/win/windows_session_change_observer.cc
index ddbb3191ae30452d895e4a48a60e8b74c0b68fcd..d3663e5cc224b1e9b4bf8f323c94cb1051b3620e 100644
--- a/ui/views/win/windows_session_change_observer.cc
+++ b/ui/views/win/windows_session_change_observer.cc
@@ -53,9 +53,8 @@ class WindowsSessionChangeObserver::WtsRegistrationNotificationManager {
void OnWndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) {
switch (message) {
case WM_WTSSESSION_CHANGE:
- FOR_EACH_OBSERVER(WindowsSessionChangeObserver,
- observer_list_,
- OnSessionChange(wparam));
+ for (WindowsSessionChangeObserver& observer : observer_list_)
+ observer.OnSessionChange(wparam);
break;
case WM_DESTROY:
RemoveSingletonHwndObserver();
@@ -96,9 +95,8 @@ class WindowsSessionChangeObserver::WtsRegistrationNotificationManager {
// Under both cases we are in shutdown, which means no other worker threads
// can be running.
WTSUnRegisterSessionNotification(gfx::SingletonHwnd::GetInstance()->hwnd());
- FOR_EACH_OBSERVER(WindowsSessionChangeObserver,
- observer_list_,
- ClearCallback());
+ for (WindowsSessionChangeObserver& observer : observer_list_)
+ observer.ClearCallback();
}
base::ObserverList<WindowsSessionChangeObserver, true> observer_list_;
« no previous file with comments | « ui/views/widget/widget.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698