OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ClientHintsPreferences_h | 5 #ifndef ClientHintsPreferences_h |
6 #define ClientHintsPreferences_h | 6 #define ClientHintsPreferences_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "wtf/Allocator.h" | 9 #include "wtf/Allocator.h" |
10 #include "wtf/text/WTFString.h" | 10 #include "wtf/text/WTFString.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class ResourceFetcher; | 14 class ResourceFetcher; |
15 | 15 |
16 class CORE_EXPORT ClientHintsPreferences { | 16 class CORE_EXPORT ClientHintsPreferences { |
17 DISALLOW_ALLOCATION(); | 17 DISALLOW_NEW(); |
18 public: | 18 public: |
19 ClientHintsPreferences(); | 19 ClientHintsPreferences(); |
20 | 20 |
21 void updateFrom(const ClientHintsPreferences&); | 21 void updateFrom(const ClientHintsPreferences&); |
22 void updateFromAcceptClientHintsHeader(const String& headerValue, ResourceFe
tcher*); | 22 void updateFromAcceptClientHintsHeader(const String& headerValue, ResourceFe
tcher*); |
23 | 23 |
24 bool shouldSendDPR() const { return m_shouldSendDPR; } | 24 bool shouldSendDPR() const { return m_shouldSendDPR; } |
25 void setShouldSendDPR(bool should) { m_shouldSendDPR = should; } | 25 void setShouldSendDPR(bool should) { m_shouldSendDPR = should; } |
26 | 26 |
27 bool shouldSendResourceWidth() const { return m_shouldSendResourceWidth; } | 27 bool shouldSendResourceWidth() const { return m_shouldSendResourceWidth; } |
28 void setShouldSendResourceWidth(bool should) { m_shouldSendResourceWidth = s
hould; } | 28 void setShouldSendResourceWidth(bool should) { m_shouldSendResourceWidth = s
hould; } |
29 | 29 |
30 bool shouldSendViewportWidth() const { return m_shouldSendViewportWidth; } | 30 bool shouldSendViewportWidth() const { return m_shouldSendViewportWidth; } |
31 void setShouldSendViewportWidth(bool should) { m_shouldSendViewportWidth = s
hould; } | 31 void setShouldSendViewportWidth(bool should) { m_shouldSendViewportWidth = s
hould; } |
32 | 32 |
33 private: | 33 private: |
34 bool m_shouldSendDPR; | 34 bool m_shouldSendDPR; |
35 bool m_shouldSendResourceWidth; | 35 bool m_shouldSendResourceWidth; |
36 bool m_shouldSendViewportWidth; | 36 bool m_shouldSendViewportWidth; |
37 }; | 37 }; |
38 | 38 |
39 } // namespace blink | 39 } // namespace blink |
40 | 40 |
41 #endif | 41 #endif |
OLD | NEW |