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

Unified Diff: ui/app_list/app_list_item_model.cc

Issue 10638018: app_list: Initialize more views in the initializer list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | « no previous file | ui/app_list/apps_grid_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/app_list_item_model.cc
diff --git a/ui/app_list/app_list_item_model.cc b/ui/app_list/app_list_item_model.cc
index 6c052cb5f56c9c42f1fe1bbf3ec268a149c7ab93..82cfd32dfb8188c293a0e20f53659ad97777810e 100644
--- a/ui/app_list/app_list_item_model.cc
+++ b/ui/app_list/app_list_item_model.cc
@@ -16,14 +16,15 @@ AppListItemModel::~AppListItemModel() {
void AppListItemModel::SetIcon(const SkBitmap& icon) {
icon_ = icon;
- FOR_EACH_OBSERVER(AppListItemModelObserver, observers_,
- ItemIconChanged());
+ FOR_EACH_OBSERVER(AppListItemModelObserver, observers_, ItemIconChanged());
}
void AppListItemModel::SetTitle(const std::string& title) {
+ if (title_ == title)
+ return;
+
title_ = title;
- FOR_EACH_OBSERVER(AppListItemModelObserver, observers_,
- ItemTitleChanged());
+ FOR_EACH_OBSERVER(AppListItemModelObserver, observers_, ItemTitleChanged());
}
void AppListItemModel::SetHighlighted(bool highlighted) {
@@ -31,7 +32,8 @@ void AppListItemModel::SetHighlighted(bool highlighted) {
return;
highlighted_ = highlighted;
- FOR_EACH_OBSERVER(AppListItemModelObserver, observers_,
+ FOR_EACH_OBSERVER(AppListItemModelObserver,
+ observers_,
ItemHighlightedChanged());
}
« no previous file with comments | « no previous file | ui/app_list/apps_grid_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698