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

Unified Diff: chrome/browser/ui/views/app_list/app_list_controller_win.cc

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
« no previous file with comments | « chrome/browser/ui/extensions/extension_install_ui_default.cc ('k') | chrome/chrome_browser_extensions.gypi » ('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 9f1aaf84d2e7e343dd49e2d01402ae9e51ba5e28..c9d334dc1268905c01990cebccd1549c037e2df9 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
@@ -151,16 +151,7 @@ class AppListController : public ProfileInfoCacheObserver {
// Hides the app list.
virtual void DismissAppList();
- virtual void OnBeginExtensionInstall(Profile* profile,
- const std::string& extension_id,
- const std::string& extension_name,
- const gfx::ImageSkia& installing_icon);
- virtual void OnDownloadProgress(Profile* profile,
- const std::string& extension_id,
- int percent_downloaded);
virtual bool IsAppListVisible() const;
- virtual void OnInstallFailure(Profile* profile,
- const std::string& extension_id);
// Update the profile path stored in local prefs, load it (if not already
// loaded), and show the app list.
@@ -510,44 +501,10 @@ void AppListController::DismissAppList() {
}
}
-void AppListController::OnBeginExtensionInstall(
- Profile* profile,
- const std::string& extension_id,
- const std::string& extension_name,
- const gfx::ImageSkia& installing_icon) {
- ShowAppList(profile);
- view_delegate_->OnBeginExtensionInstall(extension_id, extension_name,
- 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);
-}
-
bool AppListController::IsAppListVisible() const {
return app_list_is_showing_;
}
-void AppListController::OnInstallFailure(Profile* profile,
- const std::string& extension_id) {
- // 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_->OnInstallFailure(extension_id);
-}
-
void AppListController::AppListClosing() {
current_view_ = NULL;
view_delegate_ = NULL;
@@ -834,25 +791,8 @@ class AppListControllerAsh : public AppListController {
virtual void ShowAppList(Profile* profile) OVERRIDE;
virtual void DismissAppList() OVERRIDE;
-
- // The OnBeginExtensionInstall/OnDownloadProgress/OnInstallFalure overrides
- // are not necessary for ASH as these are handled by the ash Shell.
- virtual void OnBeginExtensionInstall(Profile* profile,
- const std::string& extension_id,
- const std::string& extension_name,
- const gfx::ImageSkia& installing_icon)
- OVERRIDE {}
-
- virtual void OnDownloadProgress(Profile* profile,
- const std::string& extension_id,
- int percent_downloaded) OVERRIDE {}
-
virtual bool IsAppListVisible() const OVERRIDE;
- virtual void OnInstallFailure(
- Profile* profile,
- const std::string& extension_id) OVERRIDE {}
-
private:
DISALLOW_COPY_AND_ASSIGN(AppListControllerAsh);
};
@@ -941,29 +881,4 @@ bool IsAppListVisible() {
return GetCurrentAppListController()->IsAppListVisible();
}
-void NotifyAppListOfBeginExtensionInstall(
- Profile* profile,
- const std::string& extension_id,
- const std::string& extension_name,
- const gfx::ImageSkia& installing_icon) {
- GetCurrentAppListController()->OnBeginExtensionInstall(profile,
- extension_id,
- extension_name,
- installing_icon);
-}
-
-void NotifyAppListOfDownloadProgress(
- Profile* profile,
- const std::string& extension_id,
- int percent_downloaded) {
- GetCurrentAppListController()->OnDownloadProgress(profile, extension_id,
- percent_downloaded);
-}
-
-void NotifyAppListOfExtensionInstallFailure(
- Profile* profile,
- const std::string& extension_id) {
- GetCurrentAppListController()->OnInstallFailure(profile, extension_id);
-}
-
} // namespace chrome
« no previous file with comments | « chrome/browser/ui/extensions/extension_install_ui_default.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698