summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/network/ResourceHandle.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/network/ResourceHandle.h')
-rw-r--r--WebCore/platform/network/ResourceHandle.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/WebCore/platform/network/ResourceHandle.h b/WebCore/platform/network/ResourceHandle.h
index e82e13b..e7f6092 100644
--- a/WebCore/platform/network/ResourceHandle.h
+++ b/WebCore/platform/network/ResourceHandle.h
@@ -27,6 +27,7 @@
#define ResourceHandle_h
#include "AuthenticationChallenge.h"
+#include "AuthenticationClient.h"
#include "HTTPHeaderMap.h"
#include "ThreadableLoader.h"
#include <wtf/OwnPtr.h>
@@ -84,14 +85,18 @@ class KURL;
class ResourceError;
class ResourceHandleClient;
class ResourceHandleInternal;
-struct ResourceRequest;
+class ResourceRequest;
class ResourceResponse;
class SchedulePair;
class SharedBuffer;
template <typename T> class Timer;
-class ResourceHandle : public RefCounted<ResourceHandle> {
+class ResourceHandle : public RefCounted<ResourceHandle>
+#if PLATFORM(MAC) || USE(CFNETWORK) || USE(CURL)
+ , public AuthenticationClient
+#endif
+ {
private:
ResourceHandle(const ResourceRequest&, ResourceHandleClient*, bool defersLoading, bool shouldContentSniff, bool mightDownloadFromHandle);
@@ -110,7 +115,7 @@ public:
static bool didSendBodyDataDelegateExists();
#endif
- ~ResourceHandle();
+ virtual ~ResourceHandle();
#if PLATFORM(MAC) || USE(CFNETWORK)
void willSendRequest(ResourceRequest&, const ResourceResponse& redirectResponse);
@@ -118,9 +123,9 @@ public:
#endif
#if PLATFORM(MAC) || USE(CFNETWORK) || USE(CURL)
void didReceiveAuthenticationChallenge(const AuthenticationChallenge&);
- void receivedCredential(const AuthenticationChallenge&, const Credential&);
- void receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&);
- void receivedCancellation(const AuthenticationChallenge&);
+ virtual void receivedCredential(const AuthenticationChallenge&, const Credential&);
+ virtual void receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&);
+ virtual void receivedCancellation(const AuthenticationChallenge&);
#endif
#if PLATFORM(MAC)
@@ -133,7 +138,6 @@ public:
void schedule(SchedulePair*);
void unschedule(SchedulePair*);
#elif USE(CFNETWORK)
- static CFRunLoopRef loaderRunLoop();
CFURLConnectionRef connection() const;
CFURLConnectionRef releaseConnectionForDownload();
static void setHostAllowsAnyHTTPSCertificate(const String&);
@@ -190,11 +194,17 @@ public:
void fireFailure(Timer<ResourceHandle>*);
+ using RefCounted<ResourceHandle>::ref;
+ using RefCounted<ResourceHandle>::deref;
+
private:
void scheduleFailure(FailureType);
bool start(Frame*);
+ virtual void refAuthenticationClient() { ref(); }
+ virtual void derefAuthenticationClient() { deref(); }
+
friend class ResourceHandleInternal;
OwnPtr<ResourceHandleInternal> d;
};