Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(706)

Unified Diff: Source/core/fetch/XSLStyleSheetResource.h

Issue 1170503003: Remove resource type-specific fetching logic from ResourceFetcher (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Null-check Document::loader() before calling startPreload() Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/fetch/ScriptResource.cpp ('k') | Source/core/fetch/XSLStyleSheetResource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/XSLStyleSheetResource.h
diff --git a/Source/core/fetch/XSLStyleSheetResource.h b/Source/core/fetch/XSLStyleSheetResource.h
index 4b4e4f498a3fa38dac7ba341dcf2c5b1ab95765e..9842e071d4942256807ec8f365e3c83802bac3a6 100644
--- a/Source/core/fetch/XSLStyleSheetResource.h
+++ b/Source/core/fetch/XSLStyleSheetResource.h
@@ -31,15 +31,30 @@
namespace blink {
+class FetchRequest;
+class ResourceFetcher;
+
class XSLStyleSheetResource final : public StyleSheetResource {
public:
- XSLStyleSheetResource(const ResourceRequest&, const String& charset);
+ static ResourcePtr<XSLStyleSheetResource> fetch(FetchRequest&, ResourceFetcher*);
const String& sheet() const { return m_sheet; }
virtual void didAddClient(ResourceClient*) override;
protected:
+ class XSLStyleSheetResourceFactory : public ResourceFactory {
+ public:
+ XSLStyleSheetResourceFactory()
+ : ResourceFactory(Resource::XSLStyleSheet) { }
+
+ Resource* create(const ResourceRequest& request, const String& charset) const override
+ {
+ return new XSLStyleSheetResource(request, charset);
+ }
+ };
+ XSLStyleSheetResource(const ResourceRequest&, const String& charset);
+
virtual void checkNotify() override;
String m_sheet;
« no previous file with comments | « Source/core/fetch/ScriptResource.cpp ('k') | Source/core/fetch/XSLStyleSheetResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698