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

Unified Diff: ash/common/wm_shell.cc

Issue 2414303002: Remove usage of FOR_EACH_OBSERVER macro in ash/common (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 | « ash/common/wm/window_state.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm_shell.cc
diff --git a/ash/common/wm_shell.cc b/ash/common/wm_shell.cc
index 513f56622b172136c384826db9fbc0c94fbf5810..b78a7939aa12b7923d0bc59329f3165bc70cfe98 100644
--- a/ash/common/wm_shell.cc
+++ b/ash/common/wm_shell.cc
@@ -151,11 +151,13 @@ void WmShell::CreateShelfDelegate() {
}
void WmShell::OnMaximizeModeStarted() {
- FOR_EACH_OBSERVER(ShellObserver, shell_observers_, OnMaximizeModeStarted());
+ for (auto& observer : shell_observers_)
+ observer.OnMaximizeModeStarted();
}
void WmShell::OnMaximizeModeEnded() {
- FOR_EACH_OBSERVER(ShellObserver, shell_observers_, OnMaximizeModeEnded());
+ for (auto& observer : shell_observers_)
+ observer.OnMaximizeModeEnded();
}
void WmShell::UpdateAfterLoginStatusChange(LoginStatus status) {
@@ -167,33 +169,33 @@ void WmShell::UpdateAfterLoginStatusChange(LoginStatus status) {
void WmShell::NotifyFullscreenStateChanged(bool is_fullscreen,
WmWindow* root_window) {
- FOR_EACH_OBSERVER(ShellObserver, shell_observers_,
- OnFullscreenStateChanged(is_fullscreen, root_window));
+ for (auto& observer : shell_observers_)
+ observer.OnFullscreenStateChanged(is_fullscreen, root_window);
}
void WmShell::NotifyPinnedStateChanged(WmWindow* pinned_window) {
- FOR_EACH_OBSERVER(ShellObserver, shell_observers_,
- OnPinnedStateChanged(pinned_window));
+ for (auto& observer : shell_observers_)
+ observer.OnPinnedStateChanged(pinned_window);
}
void WmShell::NotifyVirtualKeyboardActivated(bool activated) {
- FOR_EACH_OBSERVER(ShellObserver, shell_observers_,
- OnVirtualKeyboardStateChanged(activated));
+ for (auto& observer : shell_observers_)
+ observer.OnVirtualKeyboardStateChanged(activated);
}
void WmShell::NotifyShelfCreatedForRootWindow(WmWindow* root_window) {
- FOR_EACH_OBSERVER(ShellObserver, shell_observers_,
- OnShelfCreatedForRootWindow(root_window));
+ for (auto& observer : shell_observers_)
+ observer.OnShelfCreatedForRootWindow(root_window);
}
void WmShell::NotifyShelfAlignmentChanged(WmWindow* root_window) {
- FOR_EACH_OBSERVER(ShellObserver, shell_observers_,
- OnShelfAlignmentChanged(root_window));
+ for (auto& observer : shell_observers_)
+ observer.OnShelfAlignmentChanged(root_window);
}
void WmShell::NotifyShelfAutoHideBehaviorChanged(WmWindow* root_window) {
- FOR_EACH_OBSERVER(ShellObserver, shell_observers_,
- OnShelfAutoHideBehaviorChanged(root_window));
+ for (auto& observer : shell_observers_)
+ observer.OnShelfAutoHideBehaviorChanged(root_window);
}
void WmShell::AddShellObserver(ShellObserver* observer) {
@@ -205,8 +207,8 @@ void WmShell::RemoveShellObserver(ShellObserver* observer) {
}
void WmShell::OnLockStateEvent(LockStateObserver::EventType event) {
- FOR_EACH_OBSERVER(LockStateObserver, lock_state_observers_,
- OnLockStateEvent(event));
+ for (auto& observer : lock_state_observers_)
+ observer.OnLockStateEvent(event);
}
void WmShell::AddLockStateObserver(LockStateObserver* observer) {
« no previous file with comments | « ash/common/wm/window_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698