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

Unified Diff: Source/core/html/parser/HTMLResourcePreloader.h

Issue 14449003: Picture element initial implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@picture_after_rebase
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/parser/HTMLPreloadScanner.cpp ('k') | Source/core/html/parser/HTMLResourcePreloader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLResourcePreloader.h
diff --git a/Source/core/html/parser/HTMLResourcePreloader.h b/Source/core/html/parser/HTMLResourcePreloader.h
index b5232e7e5d3b3e586b0251118e6ef4de5549362a..0ab61130af624f88a541e3ed2d62477317295801 100644
--- a/Source/core/html/parser/HTMLResourcePreloader.h
+++ b/Source/core/html/parser/HTMLResourcePreloader.h
@@ -35,12 +35,17 @@ class PreloadRequest {
public:
static PassOwnPtr<PreloadRequest> create(const String& initiator, const String& resourceURL, const KURL& baseURL, CachedResource::Type resourceType, const String& mediaAttribute)
{
- return adoptPtr(new PreloadRequest(initiator, resourceURL, baseURL, resourceType, mediaAttribute));
+ return adoptPtr(new PreloadRequest(initiator, resourceURL, baseURL, resourceType, mediaAttribute, false, false));
}
static PassOwnPtr<PreloadRequest> create(const String& initiator, const String& resourceURL, const KURL& baseURL, CachedResource::Type resourceType)
{
- return adoptPtr(new PreloadRequest(initiator, resourceURL, baseURL, resourceType, ""));
+ return adoptPtr(new PreloadRequest(initiator, resourceURL, baseURL, resourceType, "", false, false));
+ }
+
+ static PassOwnPtr<PreloadRequest> create(bool bundleStart, bool bundleEnd)
+ {
+ return adoptPtr(new PreloadRequest("", "", KURL(), CachedResource::RawResource, "", bundleStart, bundleEnd));
}
bool isSafeToSendToAnotherThread() const;
@@ -52,15 +57,26 @@ public:
void setCharset(const String& charset) { m_charset = charset.isolatedCopy(); }
void setCrossOriginModeAllowsCookies(bool allowsCookies) { m_crossOriginModeAllowsCookies = allowsCookies; }
CachedResource::Type resourceType() const { return m_resourceType; }
+ const String& resourceURL() const { return m_resourceURL; }
+ bool bundleStart() { return m_bundleStart; }
+ bool bundleEnd() { return m_bundleEnd; }
private:
- PreloadRequest(const String& initiator, const String& resourceURL, const KURL& baseURL, CachedResource::Type resourceType, const String& mediaAttribute)
+ PreloadRequest(const String& initiator,
+ const String& resourceURL,
+ const KURL& baseURL,
+ CachedResource::Type resourceType,
+ const String& mediaAttribute,
+ bool bundleStart,
+ bool bundleEnd)
: m_initiator(initiator)
, m_resourceURL(resourceURL.isolatedCopy())
, m_baseURL(baseURL.copy())
, m_resourceType(resourceType)
, m_mediaAttribute(mediaAttribute.isolatedCopy())
, m_crossOriginModeAllowsCookies(false)
+ , m_bundleStart(bundleStart)
+ , m_bundleEnd(bundleEnd)
{
}
@@ -73,6 +89,8 @@ private:
CachedResource::Type m_resourceType;
String m_mediaAttribute;
bool m_crossOriginModeAllowsCookies;
+ bool m_bundleStart;
+ bool m_bundleEnd;
};
typedef Vector<OwnPtr<PreloadRequest> > PreloadRequestStream;
@@ -83,6 +101,8 @@ public:
explicit HTMLResourcePreloader(Document* document)
: m_document(document)
, m_weakFactory(this)
+ , m_inBundle(false)
+ , m_foundBundleResource(false)
{
}
@@ -94,6 +114,8 @@ public:
private:
Document* m_document;
WeakPtrFactory<HTMLResourcePreloader> m_weakFactory;
+ bool m_inBundle;
+ bool m_foundBundleResource;
};
}
« no previous file with comments | « Source/core/html/parser/HTMLPreloadScanner.cpp ('k') | Source/core/html/parser/HTMLResourcePreloader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698