NetworkingContext.h [plain text]
#ifndef NetworkingContext_h
#define NetworkingContext_h
#include "NetworkStorageSession.h"
#include <wtf/RefCounted.h>
#include <wtf/RetainPtr.h>
#if PLATFORM(COCOA)
#include <wtf/SchedulePair.h>
#endif
#if PLATFORM(COCOA)
OBJC_CLASS NSOperationQueue;
#endif
#if USE(SOUP)
typedef struct _SoupSession SoupSession;
#endif
namespace WebCore {
class ResourceError;
class ResourceRequest;
class NetworkingContext : public RefCounted<NetworkingContext> {
public:
virtual ~NetworkingContext() { }
virtual bool isValid() const { return true; }
virtual bool shouldClearReferrerOnHTTPSToHTTPRedirect() const = 0;
#if PLATFORM(COCOA)
virtual bool localFileContentSniffingEnabled() const = 0; virtual SchedulePairHashSet* scheduledRunLoopPairs() const { return 0; }
virtual RetainPtr<CFDataRef> sourceApplicationAuditData() const = 0;
virtual ResourceError blockedError(const ResourceRequest&) const = 0;
#endif
virtual String sourceApplicationIdentifier() const { return emptyString(); }
#if PLATFORM(COCOA) || USE(CFNETWORK) || USE(SOUP)
virtual NetworkStorageSession& storageSession() const = 0;
#endif
#if PLATFORM(WIN)
virtual ResourceError blockedError(const ResourceRequest&) const = 0;
#endif
protected:
NetworkingContext() { }
};
}
#endif // NetworkingContext_h