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

Unified Diff: third_party/WebKit/Source/core/fetch/FetchRequest.h

Issue 2423683002: Add Blink support for showing image placeholders using range requests. (Closed)
Patch Set: Created 4 years, 2 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: third_party/WebKit/Source/core/fetch/FetchRequest.h
diff --git a/third_party/WebKit/Source/core/fetch/FetchRequest.h b/third_party/WebKit/Source/core/fetch/FetchRequest.h
index 93c26cfddf0ab562714c1ca99c15779a4ac6a2b8..207ffe4c83fd78b41670fd6600ff1e24d2297c0c 100644
--- a/third_party/WebKit/Source/core/fetch/FetchRequest.h
+++ b/third_party/WebKit/Source/core/fetch/FetchRequest.h
@@ -49,6 +49,10 @@ class CORE_EXPORT FetchRequest {
RestrictToSameOrigin,
NoOriginRestriction
};
+ enum PlaceholderImageRequestType {
+ DisallowPlaceholder = 0, // The requested image must not be a placeholder.
+ AllowPlaceholder, // The image is allowed to be a placeholder.
+ };
struct ResourceWidth {
DISALLOW_NEW();
@@ -121,6 +125,14 @@ class CORE_EXPORT FetchRequest {
m_options.parserDisposition = parserDisposition;
}
+ PlaceholderImageRequestType placeholderImageRequestType() const {
+ return m_placeholderImageRequestType;
+ }
+ void setPlaceholderImageRequestType(
+ PlaceholderImageRequestType placeholderImageRequestType) {
+ m_placeholderImageRequestType = placeholderImageRequestType;
+ }
+
void makeSynchronous();
private:
@@ -134,6 +146,7 @@ class CORE_EXPORT FetchRequest {
OriginRestriction m_originRestriction;
ResourceWidth m_resourceWidth;
ClientHintsPreferences m_clientHintPreferences;
+ PlaceholderImageRequestType m_placeholderImageRequestType;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698