OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef LinkPreloadResourceClients_h | 5 #ifndef LinkPreloadResourceClients_h |
6 #define LinkPreloadResourceClients_h | 6 #define LinkPreloadResourceClients_h |
7 | 7 |
8 #include "core/loader/resource/CSSStyleSheetResource.h" | 8 #include "core/loader/resource/CSSStyleSheetResource.h" |
9 #include "core/loader/resource/FontResource.h" | 9 #include "core/loader/resource/FontResource.h" |
10 #include "core/loader/resource/ImageResource.h" | 10 #include "core/loader/resource/ImageResource.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 return new LinkPreloadStyleResourceClient(loader, resource); | 81 return new LinkPreloadStyleResourceClient(loader, resource); |
82 } | 82 } |
83 | 83 |
84 virtual String debugName() const { return "LinkPreloadStyle"; } | 84 virtual String debugName() const { return "LinkPreloadStyle"; } |
85 virtual ~LinkPreloadStyleResourceClient() {} | 85 virtual ~LinkPreloadStyleResourceClient() {} |
86 | 86 |
87 void clear() override { clearResource(); } | 87 void clear() override { clearResource(); } |
88 | 88 |
89 void setCSSStyleSheet(const String&, | 89 void setCSSStyleSheet(const String&, |
90 const KURL&, | 90 const KURL&, |
| 91 ReferrerPolicy, |
91 const String&, | 92 const String&, |
92 const CSSStyleSheetResource* resource) override { | 93 const CSSStyleSheetResource* resource) override { |
93 DCHECK_EQ(this->resource(), resource); | 94 DCHECK_EQ(this->resource(), resource); |
94 triggerEvents(static_cast<const Resource*>(resource)); | 95 triggerEvents(static_cast<const Resource*>(resource)); |
95 } | 96 } |
96 | 97 |
97 DEFINE_INLINE_VIRTUAL_TRACE() { | 98 DEFINE_INLINE_VIRTUAL_TRACE() { |
98 LinkPreloadResourceClient::trace(visitor); | 99 LinkPreloadResourceClient::trace(visitor); |
99 ResourceOwner<CSSStyleSheetResource, StyleSheetResourceClient>::trace( | 100 ResourceOwner<CSSStyleSheetResource, StyleSheetResourceClient>::trace( |
100 visitor); | 101 visitor); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 private: | 203 private: |
203 LinkPreloadRawResourceClient(LinkLoader* loader, RawResource* resource) | 204 LinkPreloadRawResourceClient(LinkLoader* loader, RawResource* resource) |
204 : LinkPreloadResourceClient(loader) { | 205 : LinkPreloadResourceClient(loader) { |
205 setResource(resource, Resource::DontMarkAsReferenced); | 206 setResource(resource, Resource::DontMarkAsReferenced); |
206 } | 207 } |
207 }; | 208 }; |
208 | 209 |
209 } // namespace blink | 210 } // namespace blink |
210 | 211 |
211 #endif // LinkPreloadResourceClients_h | 212 #endif // LinkPreloadResourceClients_h |
OLD | NEW |