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

Unified Diff: ash/mus/window_manager.cc

Issue 2421853003: Remove usage of FOR_EACH_OBSERVER macro in ash/ (Closed)
Patch Set: shell_observers 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 | « ash/mus/keyboard_ui_mus.cc ('k') | ash/shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/window_manager.cc
diff --git a/ash/mus/window_manager.cc b/ash/mus/window_manager.cc
index 66a388d3d70de845b0a11be152256bb44f590535..ca975ea8be7b8318390f6510cbbd64b0094abca2 100644
--- a/ash/mus/window_manager.cc
+++ b/ash/mus/window_manager.cc
@@ -164,12 +164,11 @@ RootWindowController* WindowManager::CreateRootWindowController(
// TODO: this should be called when logged in. See http://crbug.com/654606.
root_window_controller->wm_root_window_controller()->CreateShelf();
- FOR_EACH_OBSERVER(WindowManagerObserver, observers_,
- OnRootWindowControllerAdded(root_window_controller));
+ for (auto& observer : observers_)
+ observer.OnRootWindowControllerAdded(root_window_controller);
- FOR_EACH_OBSERVER(display::DisplayObserver,
- *screen_->display_list()->observers(),
- OnDisplayAdded(root_window_controller->display()));
+ for (auto& observer : *screen_->display_list()->observers())
+ observer.OnDisplayAdded(root_window_controller->display());
return root_window_controller;
}
@@ -199,8 +198,8 @@ void WindowManager::Shutdown() {
// Observers can rely on WmShell from the callback. So notify the observers
// before destroying it.
- FOR_EACH_OBSERVER(WindowManagerObserver, observers_,
- OnWindowTreeClientDestroyed());
+ for (auto& observer : observers_)
+ observer.OnWindowTreeClientDestroyed();
// Primary RootWindowController must be destroyed last.
RootWindowController* primary_root_window_controller =
« no previous file with comments | « ash/mus/keyboard_ui_mus.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698