This source file includes following definitions.
- registerURLSchemeAsLocal
- registerURLSchemeAsNoAccess
- registerURLSchemeAsDisplayIsolated
- registerURLSchemeAsSecure
- registerURLSchemeAsCORSEnabled
- registerURLSchemeAsBypassingContentSecurityPolicy
- registerURLSchemeAsEmptyDocument
- addOriginAccessWhitelistEntry
- removeOriginAccessWhitelistEntry
- resetOriginAccessWhitelists
- generateReferrerHeader
- registerURLSchemeAsNotAllowingJavascriptURLs
#include "config.h"
#include "WebSecurityPolicy.h"
#include "public/platform/WebString.h"
#include "public/platform/WebURL.h"
#include "core/loader/FrameLoader.h"
#include "platform/weborigin/SchemeRegistry.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "platform/weborigin/SecurityPolicy.h"
using namespace WebCore;
namespace blink {
void WebSecurityPolicy::registerURLSchemeAsLocal(const WebString& scheme)
{
SchemeRegistry::registerURLSchemeAsLocal(scheme);
}
void WebSecurityPolicy::registerURLSchemeAsNoAccess(const WebString& scheme)
{
SchemeRegistry::registerURLSchemeAsNoAccess(scheme);
}
void WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(const WebString& scheme)
{
SchemeRegistry::registerURLSchemeAsDisplayIsolated(scheme);
}
void WebSecurityPolicy::registerURLSchemeAsSecure(const WebString& scheme)
{
SchemeRegistry::registerURLSchemeAsSecure(scheme);
}
void WebSecurityPolicy::registerURLSchemeAsCORSEnabled(const WebString& scheme)
{
SchemeRegistry::registerURLSchemeAsCORSEnabled(scheme);
}
void WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy(const WebString& scheme)
{
SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy(scheme);
}
void WebSecurityPolicy::registerURLSchemeAsEmptyDocument(const WebString& scheme)
{
SchemeRegistry::registerURLSchemeAsEmptyDocument(scheme);
}
void WebSecurityPolicy::addOriginAccessWhitelistEntry(
const WebURL& sourceOrigin,
const WebString& destinationProtocol,
const WebString& destinationHost,
bool allowDestinationSubdomains)
{
SecurityPolicy::addOriginAccessWhitelistEntry(
*SecurityOrigin::create(sourceOrigin), destinationProtocol,
destinationHost, allowDestinationSubdomains);
}
void WebSecurityPolicy::removeOriginAccessWhitelistEntry(
const WebURL& sourceOrigin,
const WebString& destinationProtocol,
const WebString& destinationHost,
bool allowDestinationSubdomains)
{
SecurityPolicy::removeOriginAccessWhitelistEntry(
*SecurityOrigin::create(sourceOrigin), destinationProtocol,
destinationHost, allowDestinationSubdomains);
}
void WebSecurityPolicy::resetOriginAccessWhitelists()
{
SecurityPolicy::resetOriginAccessWhitelists();
}
WebString WebSecurityPolicy::generateReferrerHeader(WebReferrerPolicy referrerPolicy, const WebURL& url, const WebString& referrer)
{
return SecurityPolicy::generateReferrerHeader(static_cast<ReferrerPolicy>(referrerPolicy), url, referrer);
}
void WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs(const WebString& scheme)
{
SchemeRegistry::registerURLSchemeAsNotAllowingJavascriptURLs(scheme);
}
}