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

Unified Diff: ui/aura/window_tree_host.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/aura/window.cc ('k') | ui/base/clipboard/clipboard_monitor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_tree_host.cc
diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc
index afa08aa984ee79bb848ff46546305472dfeec3c5..2da90f8085983dbee56886f26e9c649293f298bc 100644
--- a/ui/aura/window_tree_host.cc
+++ b/ui/aura/window_tree_host.cc
@@ -270,8 +270,8 @@ void WindowTreeHost::OnHostMoved(const gfx::Point& new_location) {
TRACE_EVENT1("ui", "WindowTreeHost::OnHostMoved",
"origin", new_location.ToString());
- FOR_EACH_OBSERVER(WindowTreeHostObserver, observers_,
- OnHostMoved(this, new_location));
+ for (WindowTreeHostObserver& observer : observers_)
+ observer.OnHostMoved(this, new_location);
}
void WindowTreeHost::OnHostResized(const gfx::Size& new_size) {
@@ -287,17 +287,18 @@ void WindowTreeHost::OnHostResized(const gfx::Size& new_size) {
// The layer, and the observers should be notified of the
// transformed size of the root window.
UpdateRootWindowSize(layer_size);
- FOR_EACH_OBSERVER(WindowTreeHostObserver, observers_, OnHostResized(this));
+ for (WindowTreeHostObserver& observer : observers_)
+ observer.OnHostResized(this);
}
void WindowTreeHost::OnHostWorkspaceChanged() {
- FOR_EACH_OBSERVER(WindowTreeHostObserver, observers_,
- OnHostWorkspaceChanged(this));
+ for (WindowTreeHostObserver& observer : observers_)
+ observer.OnHostWorkspaceChanged(this);
}
void WindowTreeHost::OnHostCloseRequested() {
- FOR_EACH_OBSERVER(WindowTreeHostObserver, observers_,
- OnHostCloseRequested(this));
+ for (WindowTreeHostObserver& observer : observers_)
+ observer.OnHostCloseRequested(this);
}
void WindowTreeHost::OnHostActivated() {
« no previous file with comments | « ui/aura/window.cc ('k') | ui/base/clipboard/clipboard_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698