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

Unified Diff: ui/app_list/app_list_item_model.cc

Issue 12208040: [win] Add a progress bar in the app launcher for app installs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: respond to comments Created 7 years, 10 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
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);
}

Powered by Google App Engine
This is Rietveld 408576698