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/text/WTFString.h" | 10 #include "wtf/text/WTFString.h" |
10 | 11 |
11 namespace blink { | 12 namespace blink { |
12 | 13 |
13 class ResourceFetcher; | 14 class ResourceFetcher; |
14 | 15 |
15 class CORE_EXPORT ClientHintsPreferences { | 16 class CORE_EXPORT ClientHintsPreferences { |
| 17 DISALLOW_ALLOCATION(); |
16 public: | 18 public: |
17 ClientHintsPreferences(); | 19 ClientHintsPreferences(); |
18 | 20 |
19 void updateFrom(const ClientHintsPreferences&); | 21 void updateFrom(const ClientHintsPreferences&); |
20 void updateFromAcceptClientHintsHeader(const String& headerValue, ResourceFe
tcher*); | 22 void updateFromAcceptClientHintsHeader(const String& headerValue, ResourceFe
tcher*); |
21 | 23 |
22 bool shouldSendDPR() const { return m_shouldSendDPR; } | 24 bool shouldSendDPR() const { return m_shouldSendDPR; } |
23 void setShouldSendDPR(bool should) { m_shouldSendDPR = should; } | 25 void setShouldSendDPR(bool should) { m_shouldSendDPR = should; } |
24 | 26 |
25 bool shouldSendResourceWidth() const { return m_shouldSendResourceWidth; } | 27 bool shouldSendResourceWidth() const { return m_shouldSendResourceWidth; } |
26 void setShouldSendResourceWidth(bool should) { m_shouldSendResourceWidth = s
hould; } | 28 void setShouldSendResourceWidth(bool should) { m_shouldSendResourceWidth = s
hould; } |
27 | 29 |
28 bool shouldSendViewportWidth() const { return m_shouldSendViewportWidth; } | 30 bool shouldSendViewportWidth() const { return m_shouldSendViewportWidth; } |
29 void setShouldSendViewportWidth(bool should) { m_shouldSendViewportWidth = s
hould; } | 31 void setShouldSendViewportWidth(bool should) { m_shouldSendViewportWidth = s
hould; } |
30 | 32 |
31 private: | 33 private: |
32 bool m_shouldSendDPR; | 34 bool m_shouldSendDPR; |
33 bool m_shouldSendResourceWidth; | 35 bool m_shouldSendResourceWidth; |
34 bool m_shouldSendViewportWidth; | 36 bool m_shouldSendViewportWidth; |
35 }; | 37 }; |
36 | 38 |
37 } // namespace blink | 39 } // namespace blink |
38 | 40 |
39 #endif | 41 #endif |
OLD | NEW |