| 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..a1949d8a306acac708ae3cca5c3ca36bc5766a54 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,24 @@ 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);
|
| }
|
|
|