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 c3a74bfee59a5fc881720167a2544112cf863b36..c9a28315dcce27ea0e2a6b063643d5656aed0c54 100644 |
--- a/ui/app_list/app_list_item_model.cc |
+++ b/ui/app_list/app_list_item_model.cc |
@@ -9,7 +9,10 @@ |
namespace app_list { |
-AppListItemModel::AppListItemModel() : highlighted_(false) { |
+AppListItemModel::AppListItemModel() |
+ : highlighted_(false), |
+ is_installing_(false), |
+ percent_downloaded_(-1) { |
} |
AppListItemModel::~AppListItemModel() { |
@@ -38,6 +41,26 @@ void AppListItemModel::SetHighlighted(bool highlighted) { |
ItemHighlightedChanged()); |
} |
+void AppListItemModel::SetIsInstalling(bool is_installing) { |
+ if (is_installing_ == is_installing) |
+ return; |
+ |
+ is_installing_ = is_installing; |
+ FOR_EACH_OBSERVER(AppListItemModelObserver, |
+ observers_, |
+ ItemIsInstallingChanged()); |
+} |
+ |
+void AppListItemModel::SetPercentDownloaded(int percent_downloaded) { |
+ if (percent_downloaded_ == percent_downloaded) |
+ return; |
+ |
+ percent_downloaded_ = percent_downloaded; |
+ FOR_EACH_OBSERVER(AppListItemModelObserver, |
+ observers_, |
+ ItemPercentDownloadedChanged()); |
+} |
+ |
void AppListItemModel::AddObserver(AppListItemModelObserver* observer) { |
observers_.AddObserver(observer); |
} |