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

Unified Diff: ui/app_list/speech_ui_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_result.cc ('k') | ui/app_list/views/app_list_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/speech_ui_model.cc
diff --git a/ui/app_list/speech_ui_model.cc b/ui/app_list/speech_ui_model.cc
index 927619df3294aaa755c0bb4f80474b7a9651f2f1..f85109eceb84283a37ee427ace6e43d734307a16 100644
--- a/ui/app_list/speech_ui_model.cc
+++ b/ui/app_list/speech_ui_model.cc
@@ -35,9 +35,8 @@ void SpeechUIModel::SetSpeechResult(const base::string16& result,
result_ = result;
is_final_ = is_final;
- FOR_EACH_OBSERVER(SpeechUIModelObserver,
- observers_,
- OnSpeechResult(result, is_final));
+ for (auto& observer : observers_)
+ observer.OnSpeechResult(result, is_final);
}
void SpeechUIModel::UpdateSoundLevel(int16_t level) {
@@ -70,9 +69,8 @@ void SpeechUIModel::UpdateSoundLevel(int16_t level) {
std::numeric_limits<uint8_t>::max() / range;
}
- FOR_EACH_OBSERVER(SpeechUIModelObserver,
- observers_,
- OnSpeechSoundLevelChanged(visible_level));
+ for (auto& observer : observers_)
+ observer.OnSpeechSoundLevelChanged(visible_level);
}
void SpeechUIModel::SetSpeechRecognitionState(SpeechRecognitionState new_state,
@@ -94,9 +92,8 @@ void SpeechUIModel::SetSpeechRecognitionState(SpeechRecognitionState new_state,
maximum_sound_level_ = kDefaultSoundLevel;
}
- FOR_EACH_OBSERVER(SpeechUIModelObserver,
- observers_,
- OnSpeechRecognitionStateChanged(new_state));
+ for (auto& observer : observers_)
+ observer.OnSpeechRecognitionStateChanged(new_state);
}
void SpeechUIModel::AddObserver(SpeechUIModelObserver* observer) {
« no previous file with comments | « ui/app_list/search_result.cc ('k') | ui/app_list/views/app_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698