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

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

Issue 166633002: Prefetch @import files from CSS files. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
Index: Source/core/fetch/CSSStyleSheetResource.h
diff --git a/Source/core/fetch/CSSStyleSheetResource.h b/Source/core/fetch/CSSStyleSheetResource.h
index 83aabcd22871e5064279dcdfd8a4ec5411234099..cda03c443e588d56c2afcdf15a86518153c83666 100644
--- a/Source/core/fetch/CSSStyleSheetResource.h
+++ b/Source/core/fetch/CSSStyleSheetResource.h
@@ -28,6 +28,10 @@
#include "core/fetch/ResourcePtr.h"
#include "core/fetch/StyleSheetResource.h"
+#include "core/html/parser/BackgroundHTMLInputStream.h"
+#include "core/html/parser/CSSPreloadScanner.h"
+#include "core/html/parser/HTMLParserOptions.h"
+#include "core/html/parser/HTMLTokenizer.h"
abarth-chromium 2014/02/15 18:48:48 Woah there. Fetch shouldn't need to know about an
namespace WebCore {
@@ -38,7 +42,7 @@ class TextResourceDecoder;
class CSSStyleSheetResource FINAL : public StyleSheetResource {
public:
- CSSStyleSheetResource(const ResourceRequest&, const String& charset);
+ CSSStyleSheetResource(const ResourceRequest&, const String& charset, Document*);
abarth-chromium 2014/02/15 18:48:48 Resources shouldn't be specific to documents.
virtual ~CSSStyleSheetResource();
const String sheetText(bool enforceMIMEType = true, bool* hasValidMIMEType = 0) const;
@@ -54,11 +58,20 @@ public:
private:
bool canUseSheet(bool enforceMIMEType, bool* hasValidMIMEType) const;
virtual void checkNotify() OVERRIDE;
+ virtual void appendData(const char*, int);
+ void prescan(const char* data);
OwnPtr<TextResourceDecoder> m_decoder;
String m_decodedSheetText;
RefPtr<StyleSheetContents> m_parsedStyleSheetCache;
+ HTMLParserOptions m_options;
+ OwnPtr<HTMLTokenizer> m_tokenizer;
eseidel 2014/02/14 12:15:41 This seems wrong. Do other resources own a Tokeni
eseidel 2014/02/14 12:16:57 Why would each resource want its own tokenizer/sca
+ OwnPtr<CSSPreloadScanner> m_preloadScanner;
+ OwnPtr<BackgroundHTMLInputStream> m_input;
+ OwnPtr<HTMLToken> m_token;
+ OwnPtr<HTMLResourcePreloader> m_preloader;
+ bool m_prescan;
};
DEFINE_RESOURCE_TYPE_CASTS(CSSStyleSheet);
« no previous file with comments | « no previous file | Source/core/fetch/CSSStyleSheetResource.cpp » ('j') | Source/core/fetch/CSSStyleSheetResource.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698