RemoteNetworkingContext.h [plain text]
#ifndef RemoteNetworkingContext_h
#define RemoteNetworkingContext_h
#include <WebCore/NetworkingContext.h>
#include <WebCore/SessionID.h>
namespace WebKit {
class RemoteNetworkingContext final : public WebCore::NetworkingContext {
public:
static PassRefPtr<RemoteNetworkingContext> create(WebCore::SessionID sessionID, bool shouldClearReferrerOnHTTPSToHTTPRedirect)
{
return adoptRef(new RemoteNetworkingContext(sessionID, shouldClearReferrerOnHTTPSToHTTPRedirect));
}
virtual ~RemoteNetworkingContext();
static void ensurePrivateBrowsingSession(WebCore::SessionID);
virtual bool shouldClearReferrerOnHTTPSToHTTPRedirect() const override { return m_shouldClearReferrerOnHTTPSToHTTPRedirect; }
private:
RemoteNetworkingContext(WebCore::SessionID sessionID, bool shouldClearReferrerOnHTTPSToHTTPRedirect)
: m_sessionID(sessionID)
, m_shouldClearReferrerOnHTTPSToHTTPRedirect(shouldClearReferrerOnHTTPSToHTTPRedirect)
#if PLATFORM(COCOA)
, m_needsSiteSpecificQuirks(false)
, m_localFileContentSniffingEnabled(false)
#endif
{ }
virtual bool isValid() const override;
virtual WebCore::NetworkStorageSession& storageSession() const override;
#if PLATFORM(COCOA)
void setNeedsSiteSpecificQuirks(bool value) { m_needsSiteSpecificQuirks = value; }
virtual bool needsSiteSpecificQuirks() const override;
void setLocalFileContentSniffingEnabled(bool value) { m_localFileContentSniffingEnabled = value; }
virtual bool localFileContentSniffingEnabled() const override;
virtual RetainPtr<CFDataRef> sourceApplicationAuditData() const override;
virtual String sourceApplicationIdentifier() const override;
virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const override;
#endif
WebCore::SessionID m_sessionID;
bool m_shouldClearReferrerOnHTTPSToHTTPRedirect;
#if PLATFORM(COCOA)
bool m_needsSiteSpecificQuirks;
bool m_localFileContentSniffingEnabled;
#endif
};
}
#endif // RemoteNetworkingContext_h