DownloadAuthenticationClient.h [plain text]
#ifndef DownloadAuthenticationClient_h
#define DownloadAuthenticationClient_h
#if !USE(NETWORK_SESSION)
#include <WebCore/AuthenticationClient.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
class AuthenticationChallenge;
class Credential;
}
namespace WebKit {
class Download;
class DownloadAuthenticationClient : public RefCounted<DownloadAuthenticationClient>, public WebCore::AuthenticationClient {
public:
static Ref<DownloadAuthenticationClient> create(Download* download) { return adoptRef(*new DownloadAuthenticationClient(download)); }
void detach() { m_download = 0; }
using RefCounted<DownloadAuthenticationClient>::ref;
using RefCounted<DownloadAuthenticationClient>::deref;
private:
DownloadAuthenticationClient(Download*);
void receivedCredential(const WebCore::AuthenticationChallenge&, const WebCore::Credential&) override;
void receivedRequestToContinueWithoutCredential(const WebCore::AuthenticationChallenge&) override;
void receivedCancellation(const WebCore::AuthenticationChallenge&) override;
void receivedRequestToPerformDefaultHandling(const WebCore::AuthenticationChallenge&) override;
void receivedChallengeRejection(const WebCore::AuthenticationChallenge&) override;
void refAuthenticationClient() override { ref(); }
void derefAuthenticationClient() override { deref(); }
Download* m_download;
};
}
#endif // !USE(NETWORK_SESSION)
#endif // DownloadAuthenticationClient_h