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

Unified Diff: content/public/browser/download_manager_delegate.h

Issue 10069014: Save Page As MHTML (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: avoid re-entering Created 8 years, 8 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: content/public/browser/download_manager_delegate.h
diff --git a/content/public/browser/download_manager_delegate.h b/content/public/browser/download_manager_delegate.h
index 6cc557c6de7a88e5cdbb41f3d5fa28243a551653..5d29627017956ae6a20f7b78730805021c8d93ac 100644
--- a/content/public/browser/download_manager_delegate.h
+++ b/content/public/browser/download_manager_delegate.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/file_path.h"
+#include "base/logging.h"
#include "base/time.h"
#include "content/common/content_export.h"
#include "content/public/browser/save_page_type.h"
@@ -19,13 +20,20 @@ class DownloadId;
class DownloadItem;
class WebContents;
-typedef base::Callback<void(const FilePath&, content::SavePageType)>
+// Called by SavePackage when it creates a DownloadItem.
+typedef base::Callback<void(DownloadItem*)>
+ SaveFileDownloadCreatedCallback;
Randy Smith (Not in Mondays) 2012/04/27 18:24:04 So I had a heck of a time figuring out how this th
benjhayden 2012/04/28 19:09:03 Actually, my bp is on the low end. My doctor sugge
+
+// Called by SavePackageFilePicker when the user picks a filename.
+typedef base::Callback<void(const FilePath&,
+ content::SavePageType,
+ const SaveFileDownloadCreatedCallback&)>
SaveFilePathPickedCallback;
// Browser's download manager: manages all downloads and destination view.
class CONTENT_EXPORT DownloadManagerDelegate {
public:
- virtual ~DownloadManagerDelegate() {}
+ virtual ~DownloadManagerDelegate();
// Lets the delegate know that the download manager is shutting down.
virtual void Shutdown() {}
@@ -109,14 +117,13 @@ class CONTENT_EXPORT DownloadManagerDelegate {
FilePath* download_save_dir) {}
// Asks the user for the path to save a page. The delegate calls the callback
- // to give the answer, except on ChromeOS, where the saving is done by
- // SavePackageFilePickerChromeOS. TODO(achuith): Move ChromeOS save
- // functionality to SavePackage.
+ // to give the answer.
virtual void ChooseSavePath(WebContents* web_contents,
const FilePath& suggested_path,
const FilePath::StringType& default_extension,
bool can_save_as_complete,
- SaveFilePathPickedCallback callback) {}
+ const SaveFilePathPickedCallback& callback) {
+ }
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698