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

Unified Diff: ui/app_list/search_result.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_box_model.cc ('k') | ui/app_list/speech_ui_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/search_result.cc
diff --git a/ui/app_list/search_result.cc b/ui/app_list/search_result.cc
index 7f64be19e037e716509bbeca2432f61fd49a756f..63862efdf360d00fee2ebd4de7f9e60736aee7ea 100644
--- a/ui/app_list/search_result.cc
+++ b/ui/app_list/search_result.cc
@@ -41,26 +41,26 @@ SearchResult::SearchResult()
}
SearchResult::~SearchResult() {
- FOR_EACH_OBSERVER(SearchResultObserver, observers_, OnResultDestroying());
+ for (auto& observer : observers_)
+ observer.OnResultDestroying();
}
void SearchResult::SetIcon(const gfx::ImageSkia& icon) {
icon_ = icon;
- FOR_EACH_OBSERVER(SearchResultObserver,
- observers_,
- OnIconChanged());
+ for (auto& observer : observers_)
+ observer.OnIconChanged();
}
void SearchResult::SetBadgeIcon(const gfx::ImageSkia& badge_icon) {
badge_icon_ = badge_icon;
- FOR_EACH_OBSERVER(SearchResultObserver, observers_, OnBadgeIconChanged());
+ for (auto& observer : observers_)
+ observer.OnBadgeIconChanged();
}
void SearchResult::SetActions(const Actions& sets) {
actions_ = sets;
- FOR_EACH_OBSERVER(SearchResultObserver,
- observers_,
- OnActionsChanged());
+ for (auto& observer : observers_)
+ observer.OnActionsChanged();
}
void SearchResult::SetIsInstalling(bool is_installing) {
@@ -68,9 +68,8 @@ void SearchResult::SetIsInstalling(bool is_installing) {
return;
is_installing_ = is_installing;
- FOR_EACH_OBSERVER(SearchResultObserver,
- observers_,
- OnIsInstallingChanged());
+ for (auto& observer : observers_)
+ observer.OnIsInstallingChanged();
}
void SearchResult::SetPercentDownloaded(int percent_downloaded) {
@@ -78,9 +77,8 @@ void SearchResult::SetPercentDownloaded(int percent_downloaded) {
return;
percent_downloaded_ = percent_downloaded;
- FOR_EACH_OBSERVER(SearchResultObserver,
- observers_,
- OnPercentDownloadedChanged());
+ for (auto& observer : observers_)
+ observer.OnPercentDownloadedChanged();
}
int SearchResult::GetPreferredIconDimension() const {
@@ -100,7 +98,8 @@ int SearchResult::GetPreferredIconDimension() const {
}
void SearchResult::NotifyItemInstalled() {
- FOR_EACH_OBSERVER(SearchResultObserver, observers_, OnItemInstalled());
+ for (auto& observer : observers_)
+ observer.OnItemInstalled();
}
void SearchResult::AddObserver(SearchResultObserver* observer) {
« no previous file with comments | « ui/app_list/search_box_model.cc ('k') | ui/app_list/speech_ui_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698