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

Unified Diff: chrome/browser/ui/app_list/apps_model_builder.h

Issue 12298015: Change NotifyAppList*() functions into observers on a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac 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: chrome/browser/ui/app_list/apps_model_builder.h
diff --git a/chrome/browser/ui/app_list/apps_model_builder.h b/chrome/browser/ui/app_list/apps_model_builder.h
index 4f06ff309d9b86cd94b1d986fe5a0b0330de92f5..1a68123881711a3bbdf5c924902b15fb3d775057 100644
--- a/chrome/browser/ui/app_list/apps_model_builder.h
+++ b/chrome/browser/ui/app_list/apps_model_builder.h
@@ -10,6 +10,7 @@
#include "base/gtest_prod_util.h"
#include "base/prefs/public/pref_change_registrar.h"
+#include "chrome/browser/extensions/install_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "ui/app_list/app_list_model.h"
@@ -25,7 +26,8 @@ class ImageSkia;
}
class AppsModelBuilder : public content::NotificationObserver,
- public ui::ListModelObserver {
+ public ui::ListModelObserver,
+ public extensions::InstallObserver {
public:
AppsModelBuilder(Profile* profile,
app_list::AppListModel::Apps* model,
@@ -35,20 +37,19 @@ class AppsModelBuilder : public content::NotificationObserver,
// Populates the model.
void Build();
- // Called when an extension starts installing.
- void OnBeginExtensionInstall(const std::string& extension_id,
- const std::string& extension_name,
- const gfx::ImageSkia& installing_icon);
+ private:
+ typedef std::vector<ExtensionAppItem*> Apps;
- // Called when progress is made on an extension's download.
- void OnDownloadProgress(const std::string& extension_id,
- int percent_downloaded);
+ // Overridden from extensions::InstallObserver:
+ virtual void OnBeginExtensionInstall(const std::string& extension_id,
+ const std::string& extension_name,
+ const gfx::ImageSkia& installing_icon,
+ bool is_app) OVERRIDE;
- // Called when an extension fails to install.
- void OnInstallFailure(const std::string& extension_id);
+ virtual void OnDownloadProgress(const std::string& extension_id,
+ int percent_downloaded) OVERRIDE;
- private:
- typedef std::vector<ExtensionAppItem*> Apps;
+ virtual void OnInstallFailure(const std::string& extension_id) OVERRIDE;
// Adds apps in |extensions| to |apps|.
void AddApps(const ExtensionSet* extensions, Apps* apps);
« no previous file with comments | « chrome/browser/ui/app_list/app_list_view_delegate.cc ('k') | chrome/browser/ui/app_list/apps_model_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698