Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / core / fetch / ClientHintsPreferences.h
blobb5cd2d7f13e9e6cec7d2623bffd4a830e1acc879
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"
12 namespace blink {
14 class ResourceFetcher;
16 class CORE_EXPORT ClientHintsPreferences {
17 DISALLOW_ALLOCATION();
18 public:
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; }
33 private:
34 bool m_shouldSendDPR;
35 bool m_shouldSendResourceWidth;
36 bool m_shouldSendViewportWidth;
39 } // namespace blink
41 #endif