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 Ref<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)
{
}
virtual bool isValid() const override;
virtual WebCore::NetworkStorageSession& storageSession() const override;
#if PLATFORM(COCOA)
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_localFileContentSniffingEnabled = false;
#endif
};
}
#endif // RemoteNetworkingContext_h