| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google, Inc. All rights reserved. | 2 * Copyright (C) 2011 Google, Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 #ifndef ContentSecurityPolicy_h | 26 #ifndef ContentSecurityPolicy_h |
| 27 #define ContentSecurityPolicy_h | 27 #define ContentSecurityPolicy_h |
| 28 | 28 |
| 29 #include "bindings/core/v8/ScriptState.h" | 29 #include "bindings/core/v8/ScriptState.h" |
| 30 #include "core/dom/ExecutionContext.h" | 30 #include "core/dom/ExecutionContext.h" |
| 31 #include "core/frame/ConsoleTypes.h" | 31 #include "core/frame/ConsoleTypes.h" |
| 32 #include "platform/network/ContentSecurityPolicyParsers.h" | 32 #include "platform/network/ContentSecurityPolicyParsers.h" |
| 33 #include "platform/network/HTTPParsers.h" | 33 #include "platform/network/HTTPParsers.h" |
| 34 #include "platform/weborigin/ReferrerPolicy.h" | 34 #include "platform/weborigin/ReferrerPolicy.h" |
| 35 #include "public/platform/WebURLRequest.h" | |
| 36 #include "wtf/HashSet.h" | 35 #include "wtf/HashSet.h" |
| 37 #include "wtf/PassOwnPtr.h" | 36 #include "wtf/PassOwnPtr.h" |
| 38 #include "wtf/PassRefPtr.h" | 37 #include "wtf/PassRefPtr.h" |
| 39 #include "wtf/RefCounted.h" | 38 #include "wtf/RefCounted.h" |
| 40 #include "wtf/Vector.h" | 39 #include "wtf/Vector.h" |
| 41 #include "wtf/text/StringHash.h" | 40 #include "wtf/text/StringHash.h" |
| 42 #include "wtf/text/TextPosition.h" | 41 #include "wtf/text/TextPosition.h" |
| 43 #include "wtf/text/WTFString.h" | 42 #include "wtf/text/WTFString.h" |
| 44 | 43 |
| 45 namespace WTF { | 44 namespace WTF { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 const String& deprecatedHeader() const; | 104 const String& deprecatedHeader() const; |
| 106 ContentSecurityPolicyHeaderType deprecatedHeaderType() const; | 105 ContentSecurityPolicyHeaderType deprecatedHeaderType() const; |
| 107 | 106 |
| 108 bool allowJavaScriptURLs(const String& contextURL, const WTF::OrdinalNumber&
contextLine, ReportingStatus = SendReport) const; | 107 bool allowJavaScriptURLs(const String& contextURL, const WTF::OrdinalNumber&
contextLine, ReportingStatus = SendReport) const; |
| 109 bool allowInlineEventHandlers(const String& contextURL, const WTF::OrdinalNu
mber& contextLine, ReportingStatus = SendReport) const; | 108 bool allowInlineEventHandlers(const String& contextURL, const WTF::OrdinalNu
mber& contextLine, ReportingStatus = SendReport) const; |
| 110 bool allowInlineScript(const String& contextURL, const WTF::OrdinalNumber& c
ontextLine, ReportingStatus = SendReport) const; | 109 bool allowInlineScript(const String& contextURL, const WTF::OrdinalNumber& c
ontextLine, ReportingStatus = SendReport) const; |
| 111 bool allowInlineStyle(const String& contextURL, const WTF::OrdinalNumber& co
ntextLine, ReportingStatus = SendReport) const; | 110 bool allowInlineStyle(const String& contextURL, const WTF::OrdinalNumber& co
ntextLine, ReportingStatus = SendReport) const; |
| 112 bool allowEval(ScriptState* = 0, ReportingStatus = SendReport) const; | 111 bool allowEval(ScriptState* = 0, ReportingStatus = SendReport) const; |
| 113 bool allowPluginType(const String& type, const String& typeAttribute, const
KURL&, ReportingStatus = SendReport) const; | 112 bool allowPluginType(const String& type, const String& typeAttribute, const
KURL&, ReportingStatus = SendReport) const; |
| 114 | 113 |
| 115 bool allowFromSource(const KURL&, blink::WebURLRequest::RequestContext, Repo
rtingStatus = SendReport) const; | |
| 116 | |
| 117 bool allowScriptFromSource(const KURL&, ReportingStatus = SendReport) const; | 114 bool allowScriptFromSource(const KURL&, ReportingStatus = SendReport) const; |
| 118 bool allowObjectFromSource(const KURL&, ReportingStatus = SendReport) const; | 115 bool allowObjectFromSource(const KURL&, ReportingStatus = SendReport) const; |
| 119 bool allowChildFrameFromSource(const KURL&, ReportingStatus = SendReport) co
nst; | 116 bool allowChildFrameFromSource(const KURL&, ReportingStatus = SendReport) co
nst; |
| 120 bool allowImageFromSource(const KURL&, ReportingStatus = SendReport) const; | 117 bool allowImageFromSource(const KURL&, ReportingStatus = SendReport) const; |
| 121 bool allowStyleFromSource(const KURL&, ReportingStatus = SendReport) const; | 118 bool allowStyleFromSource(const KURL&, ReportingStatus = SendReport) const; |
| 122 bool allowFontFromSource(const KURL&, ReportingStatus = SendReport) const; | 119 bool allowFontFromSource(const KURL&, ReportingStatus = SendReport) const; |
| 123 bool allowMediaFromSource(const KURL&, ReportingStatus = SendReport) const; | 120 bool allowMediaFromSource(const KURL&, ReportingStatus = SendReport) const; |
| 124 bool allowConnectToSource(const KURL&, ReportingStatus = SendReport) const; | 121 bool allowConnectToSource(const KURL&, ReportingStatus = SendReport) const; |
| 125 bool allowFormAction(const KURL&, ReportingStatus = SendReport) const; | 122 bool allowFormAction(const KURL&, ReportingStatus = SendReport) const; |
| 126 bool allowBaseURI(const KURL&, ReportingStatus = SendReport) const; | 123 bool allowBaseURI(const KURL&, ReportingStatus = SendReport) const; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 // We put the hash functions used on the policy object so that we only need | 200 // We put the hash functions used on the policy object so that we only need |
| 204 // to calculate a hash once and then distribute it to all of the directives | 201 // to calculate a hash once and then distribute it to all of the directives |
| 205 // for validation. | 202 // for validation. |
| 206 uint8_t m_scriptHashAlgorithmsUsed; | 203 uint8_t m_scriptHashAlgorithmsUsed; |
| 207 uint8_t m_styleHashAlgorithmsUsed; | 204 uint8_t m_styleHashAlgorithmsUsed; |
| 208 }; | 205 }; |
| 209 | 206 |
| 210 } | 207 } |
| 211 | 208 |
| 212 #endif | 209 #endif |
| OLD | NEW |