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

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

Issue 1078633003: Added preloader support for sizes based RW values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 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 | « LayoutTests/http/tests/misc/resources/image-checks-for-rw.php ('k') | Source/core/fetch/FetchRequest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/FetchRequest.h
diff --git a/Source/core/fetch/FetchRequest.h b/Source/core/fetch/FetchRequest.h
index d7701d5d635ae40da2edbe773f2b3f4d16dd0235..201097965dc371534f61f30062fb9df24fb6be78 100644
--- a/Source/core/fetch/FetchRequest.h
+++ b/Source/core/fetch/FetchRequest.h
@@ -40,6 +40,17 @@ public:
enum DeferOption { NoDefer, LazyLoad, DeferredByClient };
enum OriginRestriction { UseDefaultOriginRestrictionForType, RestrictToSameOrigin, NoOriginRestriction };
+ struct ResourceWidth {
+ float width;
+ bool isSet;
+
+ ResourceWidth()
+ : width(0)
+ , isSet(false)
+ {
+ }
+ };
+
explicit FetchRequest(const ResourceRequest&, const AtomicString& initiator, const String& charset = String(), ResourceLoadPriority = ResourceLoadPriorityUnresolved);
FetchRequest(const ResourceRequest&, const AtomicString& initiator, const ResourceLoaderOptions&);
FetchRequest(const ResourceRequest&, const FetchInitiatorInfo&);
@@ -56,6 +67,7 @@ public:
bool forPreload() const { return m_forPreload; }
void setForPreload(bool forPreload) { m_forPreload = forPreload; }
DeferOption defer() const { return m_defer; }
+ ResourceWidth resourceWidth() const { return m_resourceWidth; }
void setDefer(DeferOption defer) { m_defer = defer; }
void setContentSecurityCheck(ContentSecurityPolicyDisposition contentSecurityPolicyOption) { m_options.contentSecurityPolicyOption = contentSecurityPolicyOption; }
void setCrossOriginAccessControl(SecurityOrigin*, StoredCredentials, CredentialRequest);
@@ -63,6 +75,7 @@ public:
void setCrossOriginAccessControl(SecurityOrigin*, const AtomicString& crossOriginMode);
OriginRestriction originRestriction() const { return m_originRestriction; }
void setOriginRestriction(OriginRestriction restriction) { m_originRestriction = restriction; }
+ void setResourceWidth(ResourceWidth);
private:
ResourceRequest m_resourceRequest;
@@ -72,6 +85,7 @@ private:
bool m_forPreload;
DeferOption m_defer;
OriginRestriction m_originRestriction;
+ ResourceWidth m_resourceWidth;
};
} // namespace blink
« no previous file with comments | « LayoutTests/http/tests/misc/resources/image-checks-for-rw.php ('k') | Source/core/fetch/FetchRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698