diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/parser/HTMLResourcePreloader.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/html/parser/HTMLResourcePreloader.h')
-rw-r--r-- | Source/WebCore/html/parser/HTMLResourcePreloader.h | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/Source/WebCore/html/parser/HTMLResourcePreloader.h b/Source/WebCore/html/parser/HTMLResourcePreloader.h index f93a093bd..cd10f85de 100644 --- a/Source/WebCore/html/parser/HTMLResourcePreloader.h +++ b/Source/WebCore/html/parser/HTMLResourcePreloader.h @@ -20,11 +20,10 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef HTMLResourcePreloader_h -#define HTMLResourcePreloader_h +#pragma once #include "CachedResource.h" #include "CachedResourceRequest.h" @@ -32,25 +31,29 @@ namespace WebCore { class PreloadRequest { + WTF_MAKE_FAST_ALLOCATED; public: - PreloadRequest(const String& initiator, const String& resourceURL, const URL& baseURL, CachedResource::Type resourceType, const String& mediaAttribute) + enum class ModuleScript { + Yes, + No, + }; + PreloadRequest(const String& initiator, const String& resourceURL, const URL& baseURL, CachedResource::Type resourceType, const String& mediaAttribute, ModuleScript moduleScript) : m_initiator(initiator) - , m_resourceURL(resourceURL.isolatedCopy()) - , m_baseURL(baseURL.copy()) + , m_resourceURL(resourceURL) + , m_baseURL(baseURL.isolatedCopy()) , m_resourceType(resourceType) - , m_mediaAttribute(mediaAttribute.isolatedCopy()) - , m_crossOriginModeAllowsCookies(false) + , m_mediaAttribute(mediaAttribute) + , m_moduleScript(moduleScript) { } - bool isSafeToSendToAnotherThread() const; - CachedResourceRequest resourceRequest(Document&); const String& charset() const { return m_charset; } const String& media() const { return m_mediaAttribute; } void setCharset(const String& charset) { m_charset = charset.isolatedCopy(); } - void setCrossOriginModeAllowsCookies(bool allowsCookies) { m_crossOriginModeAllowsCookies = allowsCookies; } + void setCrossOriginMode(const String& mode) { m_crossOriginMode = mode; } + void setNonce(const String& nonce) { m_nonceAttribute = nonce; } CachedResource::Type resourceType() const { return m_resourceType; } private: @@ -62,7 +65,9 @@ private: String m_charset; CachedResource::Type m_resourceType; String m_mediaAttribute; - bool m_crossOriginModeAllowsCookies; + String m_crossOriginMode; + String m_nonceAttribute; + ModuleScript m_moduleScript; }; typedef Vector<std::unique_ptr<PreloadRequest>> PreloadRequestStream; @@ -86,6 +91,4 @@ private: WeakPtrFactory<HTMLResourcePreloader> m_weakFactory; }; -} - -#endif +} // namespace WebCore |