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

Side by Side Diff: third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResource.h

Issue 2701753003: [WIP] off-main-thread loading
Patch Set: small fix Created 3 years, 8 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 unified diff | Download patch
OLDNEW
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 void appendData(const char* data, size_t length) override; 59 void appendData(const char* data, size_t length) override;
60 60
61 private: 61 private:
62 class CSSStyleSheetResourceFactory : public ResourceFactory { 62 class CSSStyleSheetResourceFactory : public ResourceFactory {
63 public: 63 public:
64 CSSStyleSheetResourceFactory() : ResourceFactory(Resource::CSSStyleSheet) {} 64 CSSStyleSheetResourceFactory() : ResourceFactory(Resource::CSSStyleSheet) {}
65 65
66 Resource* create(const ResourceRequest& request, 66 Resource* create(const ResourceRequest& request,
67 const ResourceLoaderOptions& options, 67 const ResourceLoaderOptions& options,
68 const String& charset) const override { 68 const String& charset,
69 FetchContext*) const override {
69 return new CSSStyleSheetResource(request, options, charset); 70 return new CSSStyleSheetResource(request, options, charset);
70 } 71 }
71 }; 72 };
72 CSSStyleSheetResource(const ResourceRequest&, 73 CSSStyleSheetResource(const ResourceRequest&,
73 const ResourceLoaderOptions&, 74 const ResourceLoaderOptions&,
74 const String& charset); 75 const String& charset);
75 76
76 bool canUseSheet(MIMETypeCheck) const; 77 bool canUseSheet(MIMETypeCheck) const;
77 void checkNotify() override; 78 void checkNotify() override;
78 79
(...skipping 11 matching lines...) Expand all
90 Member<StyleSheetContents> m_parsedStyleSheetCache; 91 Member<StyleSheetContents> m_parsedStyleSheetCache;
91 92
92 bool m_didNotifyFirstData; 93 bool m_didNotifyFirstData;
93 }; 94 };
94 95
95 DEFINE_RESOURCE_TYPE_CASTS(CSSStyleSheet); 96 DEFINE_RESOURCE_TYPE_CASTS(CSSStyleSheet);
96 97
97 } // namespace blink 98 } // namespace blink
98 99
99 #endif 100 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698