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

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: fix linux compile 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
« no previous file with comments | « ui/app_list/app_list_item_model.h ('k') | ui/app_list/app_list_item_model_observer.h » ('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 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);
}
« no previous file with comments | « ui/app_list/app_list_item_model.h ('k') | ui/app_list/app_list_item_model_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698