1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00
capybara-webkit/src/UnknownUrlHandler.h

30 lines
634 B
C
Raw Normal View History

#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);
void reset();
private:
QStringList m_allowedUrls;
bool isUnknown(QUrl);
Mode m_mode;
RequestHandler *m_next;
2015-01-27 10:44:00 -05:00
void allowDefaultUrls();
};
#endif