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

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

Issue 46313002: Support the DPR header for client hints. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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: Source/core/fetch/ImageResource.h
diff --git a/Source/core/fetch/ImageResource.h b/Source/core/fetch/ImageResource.h
index 968a76060572c55c34c64b12f88de081210c0315..00bbb7167f4d846d60b4c1c34233269ccf6710ab 100644
--- a/Source/core/fetch/ImageResource.h
+++ b/Source/core/fetch/ImageResource.h
@@ -64,6 +64,9 @@ public:
bool usesImageContainerSize() const;
bool imageHasRelativeWidth() const;
bool imageHasRelativeHeight() const;
+ // The device pixel resolution we got from the server for this image, or 1.0
pdr. 2013/10/26 01:26:31 Nit: change this to: // The device pixel ratio we
+ float dprHeaderValue() const { return m_dprHeaderValue; }
pdr. 2013/10/26 01:26:31 Bikeshed: Do you mind spelling dpr out? For exampl
+ bool hasDprHeaderValue() const { return m_hasDprHeaderValue; }
enum SizeType {
NormalSize, // Report the size of the image associated with a certain renderer
@@ -113,10 +116,12 @@ private:
typedef pair<IntSize, float> SizeAndZoom;
typedef HashMap<const ImageResourceClient*, SizeAndZoom> ContainerSizeRequests;
ContainerSizeRequests m_pendingContainerSizeRequests;
+ float m_dprHeaderValue;
RefPtr<WebCore::Image> m_image;
OwnPtr<SVGImageCache> m_svgImageCache;
bool m_loadingMultipartContent;
+ bool m_hasDprHeaderValue;
};
}

Powered by Google App Engine
This is Rietveld 408576698