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

Unified Diff: ui/gfx/win/singleton_hwnd.cc

Issue 2422073002: Reduce FOR_EACH_OBSERVER usage in ui/ (Closed)
Patch Set: remove space 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/gfx/sys_color_change_listener.cc ('k') | ui/gl/gpu_switching_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/win/singleton_hwnd.cc
diff --git a/ui/gfx/win/singleton_hwnd.cc b/ui/gfx/win/singleton_hwnd.cc
index 814218746a88ef1b561ff7048ee809b0afd7d01a..7d3aa6ef7b43acbf4f70a38a83b88aac08606afa 100644
--- a/ui/gfx/win/singleton_hwnd.cc
+++ b/ui/gfx/win/singleton_hwnd.cc
@@ -21,9 +21,8 @@ BOOL SingletonHwnd::ProcessWindowMessage(HWND window,
LPARAM lparam,
LRESULT& result,
DWORD msg_map_id) {
- FOR_EACH_OBSERVER(SingletonHwndObserver,
- observer_list_,
- OnWndProc(window, message, wparam, lparam));
+ for (SingletonHwndObserver& observer : observer_list_)
+ observer.OnWndProc(window, message, wparam, lparam);
return false;
}
@@ -42,7 +41,8 @@ SingletonHwnd::~SingletonHwnd() {
DestroyWindow(hwnd());
// Tell all of our current observers to clean themselves up.
- FOR_EACH_OBSERVER(SingletonHwndObserver, observer_list_, ClearWndProc());
+ for (SingletonHwndObserver& observer : observer_list_)
+ observer.ClearWndProc();
}
void SingletonHwnd::AddObserver(SingletonHwndObserver* observer) {
« no previous file with comments | « ui/gfx/sys_color_change_listener.cc ('k') | ui/gl/gpu_switching_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698