| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef LinkFetchResource_h | |
| 6 #define LinkFetchResource_h | |
| 7 | |
| 8 #include "core/fetch/Resource.h" | |
| 9 #include "core/fetch/ResourceClient.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class FetchRequest; | |
| 14 class ResourceFetcher; | |
| 15 | |
| 16 class LinkFetchResource final : public Resource { | |
| 17 public: | |
| 18 using ClientType = ResourceClient; | |
| 19 | |
| 20 static Resource* fetch(Resource::Type, FetchRequest&, ResourceFetcher*); | |
| 21 ~LinkFetchResource() override; | |
| 22 | |
| 23 private: | |
| 24 class LinkResourceFactory : public ResourceFactory { | |
| 25 public: | |
| 26 explicit LinkResourceFactory(Resource::Type type) : ResourceFactory(type) {} | |
| 27 | |
| 28 Resource* create(const ResourceRequest& request, | |
| 29 const ResourceLoaderOptions& options, | |
| 30 const String& charset) const override { | |
| 31 return new LinkFetchResource(request, type(), options); | |
| 32 } | |
| 33 }; | |
| 34 LinkFetchResource(const ResourceRequest&, Type, const ResourceLoaderOptions&); | |
| 35 }; | |
| 36 | |
| 37 } // namespace blink | |
| 38 | |
| 39 #endif // LinkFetchResource_h | |
| OLD | NEW |