summaryrefslogtreecommitdiffstats
path: root/src/core/download_manager_delegate_qt.h
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-11-16 17:51:01 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-12-11 06:37:32 +0000
commit9d18f8d02b73c2c9310b772c972ea1e0d1356102 (patch)
tree7cc8c93950db0797916146620c6fb2e56ad0acc4 /src/core/download_manager_delegate_qt.h
parent222faea4af492f3286e9adca9c3d57a0f553a52a (diff)
Add web action for saving the current web page
Add the possibility to save web pages as single HTML file, complete HTML (with resource directory) or MHTML archive. Change-Id: Ic7e7cfda9432f3534c13350a6369d79bb17fd8b3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/core/download_manager_delegate_qt.h')
-rw-r--r--src/core/download_manager_delegate_qt.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/download_manager_delegate_qt.h b/src/core/download_manager_delegate_qt.h
index fea965749..700c2f5a7 100644
--- a/src/core/download_manager_delegate_qt.h
+++ b/src/core/download_manager_delegate_qt.h
@@ -38,6 +38,7 @@
#define DOWNLOAD_MANAGER_DELEGATE_QT_H
#include "content/public/browser/download_manager_delegate.h"
+#include <base/memory/weak_ptr.h>
#include <QtCore/qcompilerdetection.h> // Needed for Q_DECL_OVERRIDE
@@ -72,6 +73,12 @@ public:
base::FilePath* website_save_dir,
base::FilePath* download_save_dir,
bool* skip_dir_check) Q_DECL_OVERRIDE;
+ void ChooseSavePath(content::WebContents *web_contents,
+ const base::FilePath &suggested_path,
+ const base::FilePath::StringType &default_extension,
+ bool can_save_as_complete,
+ const content::SavePackagePathPickedCallback &callback) Q_DECL_OVERRIDE;
+
void cancelDownload(quint32 downloadId);
@@ -81,9 +88,11 @@ public:
private:
void cancelDownload(const content::DownloadTargetCallback& callback);
+ void savePackageDownloadCreated(content::DownloadItem *download);
BrowserContextAdapter *m_contextAdapter;
uint64 m_currentId;
+ base::WeakPtrFactory<DownloadManagerDelegateQt> m_weakPtrFactory;
friend class DownloadManagerDelegateInstance;
DISALLOW_COPY_AND_ASSIGN(DownloadManagerDelegateQt);