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

Side by Side Diff: components/dom_distiller/core/distilled_page_prefs.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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/dom_distiller/core/distilled_page_prefs.h" 5 #include "components/dom_distiller/core/distilled_page_prefs.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 void DistilledPagePrefs::AddObserver(Observer* obs) { 108 void DistilledPagePrefs::AddObserver(Observer* obs) {
109 observers_.AddObserver(obs); 109 observers_.AddObserver(obs);
110 } 110 }
111 111
112 void DistilledPagePrefs::RemoveObserver(Observer* obs) { 112 void DistilledPagePrefs::RemoveObserver(Observer* obs) {
113 observers_.RemoveObserver(obs); 113 observers_.RemoveObserver(obs);
114 } 114 }
115 115
116 void DistilledPagePrefs::NotifyOnChangeFontFamily( 116 void DistilledPagePrefs::NotifyOnChangeFontFamily(
117 DistilledPagePrefs::FontFamily new_font_family) { 117 DistilledPagePrefs::FontFamily new_font_family) {
118 FOR_EACH_OBSERVER(Observer, observers_, OnChangeFontFamily(new_font_family)); 118 for (Observer& observer : observers_)
119 observer.OnChangeFontFamily(new_font_family);
119 } 120 }
120 121
121 void DistilledPagePrefs::NotifyOnChangeTheme( 122 void DistilledPagePrefs::NotifyOnChangeTheme(
122 DistilledPagePrefs::Theme new_theme) { 123 DistilledPagePrefs::Theme new_theme) {
123 FOR_EACH_OBSERVER(Observer, observers_, OnChangeTheme(new_theme)); 124 for (Observer& observer : observers_)
125 observer.OnChangeTheme(new_theme);
124 } 126 }
125 127
126 void DistilledPagePrefs::NotifyOnChangeFontScaling( 128 void DistilledPagePrefs::NotifyOnChangeFontScaling(
127 float scaling) { 129 float scaling) {
128 FOR_EACH_OBSERVER(Observer, observers_, OnChangeFontScaling(scaling)); 130 for (Observer& observer : observers_)
131 observer.OnChangeFontScaling(scaling);
129 } 132 }
130 133
131 } // namespace dom_distiller 134 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « components/data_usage/core/data_use_aggregator.cc ('k') | components/dom_distiller/core/dom_distiller_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698