mirror of
https://github.com/thoughtbot/capybara-webkit
synced 2023-03-27 23:22:28 -04:00
28 lines
587 B
C
28 lines
587 B
C
|
#ifndef _REQUESTHANDLER_H
|
||
|
#define _REQUESTHANDLER_H
|
||
|
|
||
|
#include "RequestHandler.h"
|
||
|
|
||
|
class UnknownUrlHandler : public RequestHandler {
|
||
|
public:
|
||
|
enum Mode { WARN, BLOCK };
|
||
|
|
||
|
UnknownUrlHandler(RequestHandler *next, QObject *parent = 0);
|
||
|
virtual QNetworkReply* handleRequest(
|
||
|
NetworkAccessManager *,
|
||
|
QNetworkAccessManager::Operation,
|
||
|
QNetworkRequest &,
|
||
|
QIODevice *
|
||
|
);
|
||
|
void allowUrl(const QString &);
|
||
|
void setMode(Mode);
|
||
|
|
||
|
private:
|
||
|
QStringList m_allowedUrls;
|
||
|
bool isUnknown(QUrl);
|
||
|
Mode m_mode;
|
||
|
RequestHandler *m_next;
|
||
|
};
|
||
|
|
||
|
#endif
|