Chromium Code Reviews| 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; |
|
tfarina
2013/02/06 15:37:34
add a blank line above as it's done in SetHighligh
koz (OOO until 15th September)
2013/02/07 03:13:23
Done here and below.
|
| + 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); |
| } |