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

Unified Diff: chrome/browser/ui/views/app_list/app_list_controller_win.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 | « chrome/browser/ui/cocoa/app_list/app_list_controller_cocoa.mm ('k') | ui/app_list/app_list_item_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/app_list/app_list_controller_win.cc
diff --git a/chrome/browser/ui/views/app_list/app_list_controller_win.cc b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
index 70df36651f53b44b9c07e5338e91beaa36305728..5fe7960a76ba7ede0f6d9c213ba59e1faf15990d 100644
--- a/chrome/browser/ui/views/app_list/app_list_controller_win.cc
+++ b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
@@ -191,6 +191,9 @@ class AppListController : public ProfileInfoCacheObserver {
const std::string& extension_id,
const std::string& extension_name,
const gfx::ImageSkia& installing_icon);
+ void OnDownloadProgress(Profile* profile,
+ const std::string& extension_id,
+ int percent_downloaded);
private:
// Loads a profile asynchronously and calls OnProfileLoaded() when done.
@@ -547,6 +550,18 @@ void AppListController::OnBeginExtensionInstall(
installing_icon);
}
+void AppListController::OnDownloadProgress(Profile* profile,
+ const std::string& extension_id,
+ int percent_downloaded) {
+ // We only have a model for the current profile, so ignore events about
+ // others.
+ // TODO(koz): We should keep a model for each profile so we can record
+ // information like this.
+ if (profile != profile_)
+ return;
+ view_delegate_->OnDownloadProgress(extension_id, percent_downloaded);
+}
+
// Attempts to find the bounds of the Windows taskbar. Returns true on success.
// |rect| is in screen coordinates. If the taskbar is in autohide mode and is
// not visible, |rect| will be outside the current monitor's bounds, except for
@@ -860,6 +875,15 @@ void NotifyAppListOfBeginExtensionInstall(
extension_name,
installing_icon);
}
+
+void NotifyAppListOfDownloadProgress(
+ Profile* profile,
+ const std::string& extension_id,
+ int percent_downloaded) {
+ g_app_list_controller.Get().OnDownloadProgress(profile, extension_id,
+ percent_downloaded);
+}
+
#endif // !defined(USE_ASH)
} // namespace chrome
« no previous file with comments | « chrome/browser/ui/cocoa/app_list/app_list_controller_cocoa.mm ('k') | ui/app_list/app_list_item_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698