DOMSecurityPolicy.h [plain text]
#ifndef DOMSecurityPolicy_h
#define DOMSecurityPolicy_h
#include "ContextDestructionObserver.h"
#include <wtf/PassOwnPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
class ContentSecurityPolicy;
class DOMStringList;
class Frame;
class DOMSecurityPolicy : public RefCounted<DOMSecurityPolicy>, public ContextDestructionObserver {
public:
static PassRefPtr<DOMSecurityPolicy> create(ScriptExecutionContext* context)
{
return adoptRef(new DOMSecurityPolicy(context));
}
~DOMSecurityPolicy();
bool isActive() const;
PassRefPtr<DOMStringList> reportURIs() const;
bool allowsInlineScript() const;
bool allowsInlineStyle() const;
bool allowsEval() const;
bool allowsConnectionTo(const String& url) const;
bool allowsFontFrom(const String& url) const;
bool allowsFormAction(const String& url) const;
bool allowsFrameFrom(const String& url) const;
bool allowsImageFrom(const String& url) const;
bool allowsMediaFrom(const String& url) const;
bool allowsObjectFrom(const String& url) const;
bool allowsPluginType(const String& type) const;
bool allowsScriptFrom(const String& url) const;
bool allowsStyleFrom(const String& url) const;
private:
explicit DOMSecurityPolicy(ScriptExecutionContext*);
};
}
#endif