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..422ea8b677ad6d5129c3161ba10e98bcbf87c61a 100644 |
--- a/chrome/browser/download/download_ui_controller.h |
+++ b/chrome/browser/download/download_ui_controller.h |
@@ -7,30 +7,31 @@ |
#include <set> |
+#include "base/callback_forward.h" |
Randy Smith (Not in Mondays)
2014/04/21 18:21:22
Is this include still needed?
asanka
2014/04/23 05:51:09
Removed.
|
#include "base/memory/scoped_ptr.h" |
#include "chrome/browser/download/all_download_item_notifier.h" |
class Profile; |
+class DownloadHistory; |
Randy Smith (Not in Mondays)
2014/04/21 18:21:22
Is this forward decl still needed?
asanka
2014/04/23 05:51:09
Removed.
|
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 |