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

Unified Diff: chrome/browser/download/download_ui_controller.h

Issue 230103002: [Downloads] Ask DownloadHistory if a download was from history. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build Created 6 years, 7 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/download/download_service.cc ('k') | chrome/browser/download/download_ui_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_ui_controller.h
diff --git a/chrome/browser/download/download_ui_controller.h b/chrome/browser/download/download_ui_controller.h
index f4f8de8a7e6a49fac408f70904d7de7fd249db15..d84cce73fb81dc2cb1cc2d7057b45cae7f9e8cbf 100644
--- a/chrome/browser/download/download_ui_controller.h
+++ b/chrome/browser/download/download_ui_controller.h
@@ -10,27 +10,20 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/download/all_download_item_notifier.h"
-class Profile;
-
-namespace content {
-class WebContents;
-}
-
-// This class handles the task of observing for download notifications and
+// This class handles the task of observing a single DownloadManager for
// notifying the UI when a new download should be displayed in the UI.
-//
-// This class monitors each IN_PROGRESS download that is created (for which
-// OnDownloadCreated is called) until:
-// - it is assigned a target path or
-// - is interrupted.
-// Then the NotifyDownloadStarting() method of the Delegate is invoked.
+// It invokes the OnNewDownloadReady() method of hte Delegate when the
+// target path is available for a new download.
class DownloadUIController : public AllDownloadItemNotifier::Observer {
public:
// The delegate is responsible for figuring out how to notify the UI.
class Delegate {
public:
virtual ~Delegate();
- virtual void NotifyDownloadStarting(content::DownloadItem* item) = 0;
+
+ // This method is invoked to notify the UI of the new download |item|. Note
+ // that |item| may be in any state by the time this method is invoked.
+ virtual void OnNewDownloadReady(content::DownloadItem* item) = 0;
};
// |manager| is the download manager to observe for new downloads. If
« no previous file with comments | « chrome/browser/download/download_service.cc ('k') | chrome/browser/download/download_ui_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698