diff options
Diffstat (limited to 'src/core/profile_adapter.h')
-rw-r--r-- | src/core/profile_adapter.h | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/src/core/profile_adapter.h b/src/core/profile_adapter.h index 46993f5bd..4be0ea51e 100644 --- a/src/core/profile_adapter.h +++ b/src/core/profile_adapter.h @@ -46,7 +46,7 @@ class UserResourceControllerHost; class VisitedLinksManagerQt; class WebContentsAdapterClient; -class Q_WEBENGINECORE_PRIVATE_EXPORT ProfileAdapter : public QObject +class Q_WEBENGINECORE_EXPORT ProfileAdapter : public QObject { public: explicit ProfileAdapter(const QString &storagePrefix = QString()); @@ -68,7 +68,7 @@ public: void addClient(ProfileAdapterClient *adapterClient); void removeClient(ProfileAdapterClient *adapterClient); - void cancelDownload(quint32 downloadId); + bool cancelDownload(quint32 downloadId); void pauseDownload(quint32 downloadId); void resumeDownload(quint32 downloadId); void removeDownload(quint32 downloadId); @@ -101,6 +101,9 @@ public: void setSpellCheckEnabled(bool enabled); bool isSpellCheckEnabled() const; + bool pushServiceEnabled() const; + void setPushServiceEnabled(bool enabled); + void addWebContentsAdapterClient(WebContentsAdapterClient *client); void removeWebContentsAdapterClient(WebContentsAdapterClient *client); void releaseAllWebContentsAdapterClients(); @@ -130,8 +133,8 @@ public: NotificationPermission = 2, AudioCapturePermission = 3, VideoCapturePermission = 4, - ClipboardRead = 5, - ClipboardWrite = 6, + ClipboardReadWrite = 5, + LocalFontsPermission = 6, }; enum PermissionState { @@ -140,6 +143,18 @@ public: DeniedPermission = 2 }; + enum ClientHint : uchar { + UAArchitecture, + UAPlatform, + UAModel, + UAMobile, + UAFullVersion, + UAPlatformVersion, + UABitness, + UAFullVersionList, + UAWOW64, + }; + HttpCacheType httpCacheType() const; void setHttpCacheType(ProfileAdapter::HttpCacheType); @@ -170,6 +185,12 @@ public: QString httpAcceptLanguage() const; void setHttpAcceptLanguage(const QString &httpAcceptLanguage); + QVariant clientHint(ClientHint clientHint) const; + void setClientHint(ClientHint clientHint, const QVariant &value); + bool clientHintsEnabled(); + void setClientHintsEnabled(bool enabled); + void resetClientHints(); + void clearHttpCache(); #if QT_CONFIG(ssl) @@ -218,9 +239,11 @@ private: QHash<QByteArray, QPointer<QWebEngineUrlSchemeHandler>> m_customUrlSchemeHandlers; QHash<QByteArray, QWeakPointer<UserNotificationController>> m_ephemeralNotifications; QHash<QByteArray, QSharedPointer<UserNotificationController>> m_persistentNotifications; + bool m_clientHintsEnabled; QList<ProfileAdapterClient*> m_clients; QList<WebContentsAdapterClient *> m_webContentsAdapterClients; + bool m_pushServiceEnabled; int m_httpCacheMaxSize; QrcUrlSchemeHandler m_qrcHandler; std::unique_ptr<base::CancelableTaskTracker> m_cancelableTaskTracker; |