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

Side by Side Diff: components/exo/wm_helper.cc

Issue 2440303002: Remove usage of FOR_EACH_OBSERVER macro in components/ (Closed)
Patch Set: remove superfluous return Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « components/exo/surface.cc ('k') | components/favicon/core/favicon_driver.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/exo/wm_helper.h" 5 #include "components/exo/wm_helper.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 8
9 namespace exo { 9 namespace exo {
10 namespace { 10 namespace {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 void WMHelper::AddAccessibilityObserver(AccessibilityObserver* observer) { 65 void WMHelper::AddAccessibilityObserver(AccessibilityObserver* observer) {
66 accessibility_observers_.AddObserver(observer); 66 accessibility_observers_.AddObserver(observer);
67 } 67 }
68 68
69 void WMHelper::RemoveAccessibilityObserver(AccessibilityObserver* observer) { 69 void WMHelper::RemoveAccessibilityObserver(AccessibilityObserver* observer) {
70 accessibility_observers_.RemoveObserver(observer); 70 accessibility_observers_.RemoveObserver(observer);
71 } 71 }
72 72
73 void WMHelper::NotifyWindowActivated(aura::Window* gained_active, 73 void WMHelper::NotifyWindowActivated(aura::Window* gained_active,
74 aura::Window* lost_active) { 74 aura::Window* lost_active) {
75 FOR_EACH_OBSERVER(ActivationObserver, activation_observers_, 75 for (ActivationObserver& observer : activation_observers_)
76 OnWindowActivated(gained_active, lost_active)); 76 observer.OnWindowActivated(gained_active, lost_active);
77 } 77 }
78 78
79 void WMHelper::NotifyWindowFocused(aura::Window* gained_focus, 79 void WMHelper::NotifyWindowFocused(aura::Window* gained_focus,
80 aura::Window* lost_focus) { 80 aura::Window* lost_focus) {
81 FOR_EACH_OBSERVER(FocusObserver, focus_observers_, 81 for (FocusObserver& observer : focus_observers_)
82 OnWindowFocused(gained_focus, lost_focus)); 82 observer.OnWindowFocused(gained_focus, lost_focus);
83 } 83 }
84 84
85 void WMHelper::NotifyCursorVisibilityChanged(bool is_visible) { 85 void WMHelper::NotifyCursorVisibilityChanged(bool is_visible) {
86 FOR_EACH_OBSERVER(CursorObserver, cursor_observers_, 86 for (CursorObserver& observer : cursor_observers_)
87 OnCursorVisibilityChanged(is_visible)); 87 observer.OnCursorVisibilityChanged(is_visible);
88 } 88 }
89 89
90 void WMHelper::NotifyCursorSetChanged(ui::CursorSetType cursor_set) { 90 void WMHelper::NotifyCursorSetChanged(ui::CursorSetType cursor_set) {
91 FOR_EACH_OBSERVER(CursorObserver, cursor_observers_, 91 for (CursorObserver& observer : cursor_observers_)
92 OnCursorSetChanged(cursor_set)); 92 observer.OnCursorSetChanged(cursor_set);
93 } 93 }
94 94
95 void WMHelper::NotifyMaximizeModeStarted() { 95 void WMHelper::NotifyMaximizeModeStarted() {
96 FOR_EACH_OBSERVER(MaximizeModeObserver, maximize_mode_observers_, 96 for (MaximizeModeObserver& observer : maximize_mode_observers_)
97 OnMaximizeModeStarted()); 97 observer.OnMaximizeModeStarted();
98 } 98 }
99 99
100 void WMHelper::NotifyMaximizeModeEnded() { 100 void WMHelper::NotifyMaximizeModeEnded() {
101 FOR_EACH_OBSERVER(MaximizeModeObserver, maximize_mode_observers_, 101 for (MaximizeModeObserver& observer : maximize_mode_observers_)
102 OnMaximizeModeEnded()); 102 observer.OnMaximizeModeEnded();
103 } 103 }
104 104
105 void WMHelper::NotifyAccessibilityModeChanged() { 105 void WMHelper::NotifyAccessibilityModeChanged() {
106 FOR_EACH_OBSERVER(AccessibilityObserver, accessibility_observers_, 106 for (AccessibilityObserver& observer : accessibility_observers_)
107 OnAccessibilityModeChanged()); 107 observer.OnAccessibilityModeChanged();
108 } 108 }
109 109
110 } // namespace exo 110 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/surface.cc ('k') | components/favicon/core/favicon_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698