| Index: content/browser/download/download_manager_impl.h
|
| diff --git a/content/browser/download/download_manager_impl.h b/content/browser/download/download_manager_impl.h
|
| index fd148fe0bb6637de48b5cdda8a6640db31ae6d6d..81ffb3c32af99027a0418433ce103840e49006e2 100644
|
| --- a/content/browser/download/download_manager_impl.h
|
| +++ b/content/browser/download/download_manager_impl.h
|
| @@ -19,10 +19,15 @@
|
| #include "content/browser/download/download_item_impl_delegate.h"
|
| #include "content/common/content_export.h"
|
| #include "content/public/browser/download_manager.h"
|
| +#include "content/public/browser/download_url_parameters.h"
|
|
|
| class DownloadFileManager;
|
| class DownloadItemImpl;
|
|
|
| +namespace content {
|
| +class WebContents;
|
| +}
|
| +
|
| class CONTENT_EXPORT DownloadManagerImpl
|
| : public content::DownloadManager,
|
| private DownloadItemImplDelegate {
|
| @@ -98,6 +103,10 @@ class CONTENT_EXPORT DownloadManagerImpl
|
|
|
| virtual ~DownloadManagerImpl();
|
|
|
| + virtual void ContinueStartingDownload(
|
| + int32 id,
|
| + content::DownloadInterruptReason reason);
|
| +
|
| // Creates the download item. Must be called on the UI thread.
|
| // Returns the |BoundNetLog| used by the |DownloadItem|.
|
| virtual net::BoundNetLog CreateDownloadItem(DownloadCreateInfo* info);
|
| @@ -124,6 +133,10 @@ class CONTENT_EXPORT DownloadManagerImpl
|
| // and then notifies this update to the file's observer.
|
| void OnFileRemovalDetected(int32 download_id);
|
|
|
| + // Retrieves the download from the |download_id|.
|
| + // Returns NULL if the download is not active.
|
| + content::DownloadItem* GetActiveDownload(int32 download_id);
|
| +
|
| // Removes |download| from the active and in progress maps.
|
| // Called when the download is cancelled or has an error.
|
| // Does nothing if the download is not in the history DB.
|
| @@ -170,7 +183,11 @@ class CONTENT_EXPORT DownloadManagerImpl
|
| virtual bool ShouldOpenDownload(DownloadItemImpl* item) OVERRIDE;
|
| virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) OVERRIDE;
|
| virtual void CheckForFileRemoval(DownloadItemImpl* download_item) OVERRIDE;
|
| - virtual void MaybeCompleteDownload(DownloadItemImpl* download) OVERRIDE;
|
| + virtual void MaybeCompleteDownload(int32 download_id) OVERRIDE;
|
| + virtual void RestartInterruptedDownload(
|
| + DownloadItemImpl* download,
|
| + const content::DownloadUrlParameters::OnStartedCallback& callback)
|
| + OVERRIDE;
|
| virtual void DownloadStopped(DownloadItemImpl* download) OVERRIDE;
|
| virtual void DownloadCompleted(DownloadItemImpl* download) OVERRIDE;
|
| virtual void DownloadOpened(DownloadItemImpl* download) OVERRIDE;
|
| @@ -183,6 +200,11 @@ class CONTENT_EXPORT DownloadManagerImpl
|
| // Factory for creation of downloads items.
|
| scoped_ptr<content::DownloadItemFactory> factory_;
|
|
|
| + // Helper to get |WebContents| from a |DownloadItem|.
|
| + // Falls back to asking the delegate for one.
|
| + // May return NULL if it can't.
|
| + content::WebContents* GetWebContents(const content::DownloadItem* download);
|
| +
|
| // |downloads_| is the owning set for all downloads known to the
|
| // DownloadManager. This includes downloads started by the user in
|
| // this session, downloads initialized from the history system, and
|
|
|