Dekko
Loading...
Searching...
No Matches
DekkoWebEngineUrlRequestInterceptor.h
1#ifndef DEKKOWEBENGINEURLREQUESTINTERCEPTOR_H
2#define DEKKOWEBENGINEURLREQUESTINTERCEPTOR_H
3
4#include <QString>
5#include <QUrl>
6#include <QWebEngineUrlRequestInterceptor>
7
8class DekkoWebEngineUrlRequestInterceptor : public QWebEngineUrlRequestInterceptor
9{
10
11 Q_OBJECT
12public:
13 void interceptRequest(QWebEngineUrlRequestInfo &info);
14 explicit DekkoWebEngineUrlRequestInterceptor(QWebEngineUrlRequestInterceptor *parent = Q_NULLPTR);
16 }
17
18// void setCid(QString cid);
19 void setBlockRemoteResources(bool doBlock);
20// QString getCid() const;
21 bool areRemoteResourcesBlocked() const;
22
23signals:
24 void interceptedRemoteRequest(bool wasBlocked);
25
26private:
27 bool testScheme(const QString &scheme, const QUrl &url);
28 bool hasAllowedScheme(const QUrl &url);
29 bool remoteResourcesAreBlocked;
30// QString cid;
31};
32
33#endif