OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> | 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> |
4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
6 | 6 |
7 This library is free software; you can redistribute it and/or | 7 This library is free software; you can redistribute it and/or |
8 modify it under the terms of the GNU Library General Public | 8 modify it under the terms of the GNU Library General Public |
9 License as published by the Free Software Foundation; either | 9 License as published by the Free Software Foundation; either |
10 version 2 of the License, or (at your option) any later version. | 10 version 2 of the License, or (at your option) any later version. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 void onMemoryDump(WebMemoryDumpLevelOfDetail, | 69 void onMemoryDump(WebMemoryDumpLevelOfDetail, |
70 WebProcessMemoryDump*) const override; | 70 WebProcessMemoryDump*) const override; |
71 | 71 |
72 void destroyDecodedDataForFailedRevalidation() override; | 72 void destroyDecodedDataForFailedRevalidation() override; |
73 | 73 |
74 const String& script(); | 74 const String& script(); |
75 | 75 |
76 bool mimeTypeAllowedByNosniff() const; | 76 bool mimeTypeAllowedByNosniff() const; |
77 | 77 |
| 78 void setIntegrityMetadata(const IntegrityMetadataSet& metadata) { |
| 79 m_integrityMetadata = metadata; |
| 80 } |
| 81 const IntegrityMetadataSet& integrityMetadata() const { |
| 82 return m_integrityMetadata; |
| 83 } |
| 84 // The argument must never be |NotChecked|. |
| 85 void setIntegrityDisposition(ScriptIntegrityDisposition); |
| 86 ScriptIntegrityDisposition integrityDisposition() { |
| 87 return m_integrityDisposition; |
| 88 } |
| 89 bool mustRefetchDueToIntegrityMetadata(const FetchRequest&) const override; |
| 90 |
78 private: | 91 private: |
79 class ScriptResourceFactory : public ResourceFactory { | 92 class ScriptResourceFactory : public ResourceFactory { |
80 public: | 93 public: |
81 ScriptResourceFactory() : ResourceFactory(Resource::Script) {} | 94 ScriptResourceFactory() : ResourceFactory(Resource::Script) {} |
82 | 95 |
83 Resource* create(const ResourceRequest& request, | 96 Resource* create(const ResourceRequest& request, |
84 const ResourceLoaderOptions& options, | 97 const ResourceLoaderOptions& options, |
85 const String& charset) const override { | 98 const String& charset) const override { |
86 return new ScriptResource(request, options, charset); | 99 return new ScriptResource(request, options, charset); |
87 } | 100 } |
88 }; | 101 }; |
89 | 102 |
90 ScriptResource(const ResourceRequest&, | 103 ScriptResource(const ResourceRequest&, |
91 const ResourceLoaderOptions&, | 104 const ResourceLoaderOptions&, |
92 const String& charset); | 105 const String& charset); |
93 | 106 |
| 107 ScriptIntegrityDisposition m_integrityDisposition; |
| 108 IntegrityMetadataSet m_integrityMetadata; |
| 109 |
94 AtomicString m_script; | 110 AtomicString m_script; |
95 }; | 111 }; |
96 | 112 |
97 DEFINE_RESOURCE_TYPE_CASTS(Script); | 113 DEFINE_RESOURCE_TYPE_CASTS(Script); |
98 | 114 |
99 } // namespace blink | 115 } // namespace blink |
100 | 116 |
101 #endif | 117 #endif |
OLD | NEW |