summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/web_contents_delegate_qt.h')
-rw-r--r--src/core/web_contents_delegate_qt.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h
index d523aa16b..9aa584369 100644
--- a/src/core/web_contents_delegate_qt.h
+++ b/src/core/web_contents_delegate_qt.h
@@ -42,7 +42,6 @@
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/common/permission_status.mojom.h"
#include "third_party/skia/include/core/SkColor.h"
#include "base/callback.h"
@@ -70,6 +69,23 @@ namespace QtWebEngineCore {
class WebContentsAdapterClient;
+class SavePageInfo
+{
+public:
+ SavePageInfo()
+ : requestedFormat(-1)
+ {
+ }
+
+ SavePageInfo(const QString &filePath, int format)
+ : requestedFilePath(filePath), requestedFormat(format)
+ {
+ }
+
+ QString requestedFilePath;
+ int requestedFormat;
+};
+
class WebContentsDelegateQt : public content::WebContentsDelegate
, public content::WebContentsObserver
{
@@ -126,6 +142,9 @@ public:
void launchExternalURL(const QUrl &url, ui::PageTransition page_transition, bool is_main_frame);
FaviconManager *faviconManager();
+ void setSavePageInfo(const SavePageInfo &spi) { m_savePageInfo = spi; }
+ const SavePageInfo &savePageInfo() { return m_savePageInfo; }
+
private:
QWeakPointer<WebContentsAdapter> createWindow(content::WebContents *new_contents, WindowOpenDisposition disposition, const gfx::Rect& initial_pos, bool user_gesture);
@@ -134,6 +153,7 @@ private:
int m_lastReceivedFindReply;
QVector<int64_t> m_loadingErrorFrameList;
QScopedPointer<FaviconManager> m_faviconManager;
+ SavePageInfo m_savePageInfo;
};
} // namespace QtWebEngineCore