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

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

Issue 1183233002: Split RW hint into Width and Viewport-Width (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed and added layout tests Created 5 years, 6 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/ClientHintsPreferences.h
diff --git a/Source/core/fetch/ClientHintsPreferences.h b/Source/core/fetch/ClientHintsPreferences.h
index 2ea866a2e7f246587674c509a5abd866cebfe736..b51cf2174776216b9367eb353183bf5007d97055 100644
--- a/Source/core/fetch/ClientHintsPreferences.h
+++ b/Source/core/fetch/ClientHintsPreferences.h
@@ -10,29 +10,35 @@
namespace blink {
-class DocumentLoader;
+class Document;
class ClientHintsPreferences {
public:
ClientHintsPreferences()
: m_shouldSendDPR(false)
- , m_shouldSendRW(false)
+ , m_shouldSendResourceWidth(false)
+ , m_shouldSendViewportWidth(false)
{
}
void set(const ClientHintsPreferences& other)
{
m_shouldSendDPR = other.m_shouldSendDPR;
- m_shouldSendRW = other.m_shouldSendRW;
+ m_shouldSendResourceWidth = other.m_shouldSendResourceWidth;
+ m_shouldSendViewportWidth = other.m_shouldSendViewportWidth;
}
void setShouldSendDPR(bool should) { m_shouldSendDPR = should; }
- void setShouldSendRW(bool should) { m_shouldSendRW = should; }
+ void setShouldSendResourceWidth(bool should) { m_shouldSendResourceWidth = should; }
+ void setShouldSendViewportWidth(bool should) { m_shouldSendViewportWidth = should; }
bool shouldSendDPR() const { return m_shouldSendDPR; }
- bool shouldSendRW() const { return m_shouldSendRW; }
+ bool shouldSendResourceWidth() const { return m_shouldSendResourceWidth; }
+ bool shouldSendViewportWidth() const { return m_shouldSendViewportWidth; }
+
private:
bool m_shouldSendDPR;
- bool m_shouldSendRW;
+ bool m_shouldSendResourceWidth;
+ bool m_shouldSendViewportWidth;
};
CORE_EXPORT void handleAcceptClientHintsHeader(const String& headerValue, ClientHintsPreferences&);
« no previous file with comments | « LayoutTests/http/tests/misc/resources/image-checks-for-width.php ('k') | Source/core/fetch/ClientHintsPreferences.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698