Changeset View
Changeset View
Standalone View
Standalone View
webenginepart/src/webenginepartdownloadmanager.h
Context not available. | |||||
24 | #include <QObject> | 24 | #include <QObject> | ||
---|---|---|---|---|---|
25 | #include <QHash> | 25 | #include <QHash> | ||
26 | #include <QVector> | 26 | #include <QVector> | ||
27 | #include <QtGlobal> | ||||
28 | #include <QNetworkCookie> | ||||
29 | | ||||
30 | #include <KService> | ||||
27 | 31 | | |||
28 | class WebEnginePage; | 32 | class WebEnginePage; | ||
29 | class QWebEngineDownloadItem; | 33 | class QWebEngineDownloadItem; | ||
Context not available. | |||||
44 | private: | 48 | private: | ||
45 | WebEnginePartDownloadManager(); | 49 | WebEnginePartDownloadManager(); | ||
46 | WebEnginePage* pageForDownload(QWebEngineDownloadItem *it); | 50 | WebEnginePage* pageForDownload(QWebEngineDownloadItem *it); | ||
51 | bool saveOrOpen(QWebEngineDownloadItem* it, WebEnginePage* page); | ||||
52 | bool downloadAndSave(QWebEngineDownloadItem* it, WebEnginePage *page); | ||||
53 | bool downloadAndOpen(QWebEngineDownloadItem* it, WebEnginePage *page, KService::Ptr offer); | ||||
54 | bool performDownloadWithoutKIO(QWebEngineDownloadItem* it); | ||||
55 | | ||||
56 | #if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) | ||||
57 | void savePage(QWebEngineDownloadItem* it); | ||||
58 | #endif | ||||
47 | 59 | | |||
48 | private Q_SLOTS: | 60 | private Q_SLOTS: | ||
49 | void performDownload(QWebEngineDownloadItem *it); | 61 | void performDownload(QWebEngineDownloadItem *it); | ||
50 | void recordNavigationRequest(WebEnginePage* page, const QUrl& url); | 62 | void recordNavigationRequest(WebEnginePage* page, const QUrl& url); | ||
63 | void addCookie(const QNetworkCookie& cookie); | ||||
64 | void clearLastRequestPage(); | ||||
65 | void downloadFinished(); | ||||
51 | 66 | | |||
52 | private: | 67 | private: | ||
53 | QVector<WebEnginePage*> m_pages; | 68 | QVector<WebEnginePage*> m_pages; | ||
54 | QHash<QUrl, WebEnginePage*> m_requests; | 69 | QHash<QUrl, WebEnginePage*> m_requests; | ||
70 | WebEnginePage* m_lastRequestPage; | ||||
55 | }; | 71 | }; | ||
56 | 72 | | |||
57 | #endif // WEBENGINEPARTDOWNLOADMANAGER_H | 73 | #endif // WEBENGINEPARTDOWNLOADMANAGER_H | ||
Context not available. |