1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef ClientHintsPreferences_h
6 #define ClientHintsPreferences_h
8 #include "core/CoreExport.h"
9 #include "wtf/Allocator.h"
10 #include "wtf/text/WTFString.h"
14 class ResourceFetcher
;
16 class CORE_EXPORT ClientHintsPreferences
{
17 DISALLOW_ALLOCATION();
19 ClientHintsPreferences();
21 void updateFrom(const ClientHintsPreferences
&);
22 void updateFromAcceptClientHintsHeader(const String
& headerValue
, ResourceFetcher
*);
24 bool shouldSendDPR() const { return m_shouldSendDPR
; }
25 void setShouldSendDPR(bool should
) { m_shouldSendDPR
= should
; }
27 bool shouldSendResourceWidth() const { return m_shouldSendResourceWidth
; }
28 void setShouldSendResourceWidth(bool should
) { m_shouldSendResourceWidth
= should
; }
30 bool shouldSendViewportWidth() const { return m_shouldSendViewportWidth
; }
31 void setShouldSendViewportWidth(bool should
) { m_shouldSendViewportWidth
= should
; }
35 bool m_shouldSendResourceWidth
;
36 bool m_shouldSendViewportWidth
;