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

Unified Diff: ui/aura/env.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/android/window_android.cc ('k') | ui/aura/test/test_cursor_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/env.cc
diff --git a/ui/aura/env.cc b/ui/aura/env.cc
index 058d94a05eef060058198e95c95a5f4d34ea1b5c..07c113849ea030b6fc6cf2c11c3463f83aa69063 100644
--- a/ui/aura/env.cc
+++ b/ui/aura/env.cc
@@ -36,7 +36,8 @@ bool RunningInsideMus() {
// Env, public:
Env::~Env() {
- FOR_EACH_OBSERVER(EnvObserver, observers_, OnWillDestroyEnv());
+ for (EnvObserver& observer : observers_)
+ observer.OnWillDestroyEnv();
DCHECK_EQ(this, lazy_tls_ptr.Pointer()->Get());
lazy_tls_ptr.Pointer()->Set(NULL);
}
@@ -101,15 +102,18 @@ void Env::Init() {
}
void Env::NotifyWindowInitialized(Window* window) {
- FOR_EACH_OBSERVER(EnvObserver, observers_, OnWindowInitialized(window));
+ for (EnvObserver& observer : observers_)
+ observer.OnWindowInitialized(window);
}
void Env::NotifyHostInitialized(WindowTreeHost* host) {
- FOR_EACH_OBSERVER(EnvObserver, observers_, OnHostInitialized(host));
+ for (EnvObserver& observer : observers_)
+ observer.OnHostInitialized(host);
}
void Env::NotifyHostActivated(WindowTreeHost* host) {
- FOR_EACH_OBSERVER(EnvObserver, observers_, OnHostActivated(host));
+ for (EnvObserver& observer : observers_)
+ observer.OnHostActivated(host);
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « ui/android/window_android.cc ('k') | ui/aura/test/test_cursor_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698