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

Unified Diff: ui/app_list/search_box_model.cc

Issue 2422873002: Remove usage of FOR_EACH_OBSERVER macro in ui/app_list (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 | « ui/app_list/search/history_data.cc ('k') | ui/app_list/search_result.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/search_box_model.cc
diff --git a/ui/app_list/search_box_model.cc b/ui/app_list/search_box_model.cc
index aa29fccff7c0fdfb58af72b2b48f8c69854e91a6..4691883b967fcd53e0023cd8e0a6d1880a38a915 100644
--- a/ui/app_list/search_box_model.cc
+++ b/ui/app_list/search_box_model.cc
@@ -36,9 +36,8 @@ SearchBoxModel::~SearchBoxModel() {
void SearchBoxModel::SetSpeechRecognitionButton(
std::unique_ptr<SearchBoxModel::SpeechButtonProperty> speech_button) {
speech_button_ = std::move(speech_button);
- FOR_EACH_OBSERVER(SearchBoxModelObserver,
- observers_,
- SpeechRecognitionButtonPropChanged());
+ for (auto& observer : observers_)
+ observer.SpeechRecognitionButtonPropChanged();
}
void SearchBoxModel::SetHintText(const base::string16& hint_text) {
@@ -46,7 +45,8 @@ void SearchBoxModel::SetHintText(const base::string16& hint_text) {
return;
hint_text_ = hint_text;
- FOR_EACH_OBSERVER(SearchBoxModelObserver, observers_, HintTextChanged());
+ for (auto& observer : observers_)
+ observer.HintTextChanged();
}
void SearchBoxModel::SetAccessibleName(const base::string16& accessible_name) {
@@ -54,7 +54,8 @@ void SearchBoxModel::SetAccessibleName(const base::string16& accessible_name) {
return;
accessible_name_ = accessible_name;
- FOR_EACH_OBSERVER(SearchBoxModelObserver, observers_, HintTextChanged());
+ for (auto& observer : observers_)
+ observer.HintTextChanged();
}
void SearchBoxModel::SetSelectionModel(const gfx::SelectionModel& sel) {
@@ -62,9 +63,8 @@ void SearchBoxModel::SetSelectionModel(const gfx::SelectionModel& sel) {
return;
selection_model_ = sel;
- FOR_EACH_OBSERVER(SearchBoxModelObserver,
- observers_,
- SelectionModelChanged());
+ for (auto& observer : observers_)
+ observer.SelectionModelChanged();
}
void SearchBoxModel::SetText(const base::string16& text) {
@@ -77,7 +77,8 @@ void SearchBoxModel::SetText(const base::string16& text) {
UMA_HISTOGRAM_ENUMERATION("Apps.AppListSearchCommenced", 1, 2);
}
text_ = text;
- FOR_EACH_OBSERVER(SearchBoxModelObserver, observers_, TextChanged());
+ for (auto& observer : observers_)
+ observer.TextChanged();
}
void SearchBoxModel::AddObserver(SearchBoxModelObserver* observer) {
« no previous file with comments | « ui/app_list/search/history_data.cc ('k') | ui/app_list/search_result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698