| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 FrameClientHintsPreferencesContext_h | 5 #ifndef FrameClientHintsPreferencesContext_h |
| 6 #define FrameClientHintsPreferencesContext_h | 6 #define FrameClientHintsPreferencesContext_h |
| 7 | 7 |
| 8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
| 9 #include "platform/heap/Persistent.h" | 9 #include "platform/heap/Persistent.h" |
| 10 #include "platform/loader/fetch/ClientHintsPreferences.h" | 10 #include "platform/loader/fetch/ClientHintsPreferences.h" |
| 11 #include "platform/wtf/Allocator.h" | 11 #include "platform/wtf/Allocator.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class FrameClientHintsPreferencesContext final | 15 class FrameClientHintsPreferencesContext final |
| 16 : public ClientHintsPreferences::Context { | 16 : public ClientHintsPreferences::Context { |
| 17 STACK_ALLOCATED(); | 17 STACK_ALLOCATED(); |
| 18 | 18 |
| 19 public: | 19 public: |
| 20 explicit FrameClientHintsPreferencesContext(LocalFrame*); | 20 explicit FrameClientHintsPreferencesContext(LocalFrame*); |
| 21 | 21 |
| 22 void CountClientHintsDeviceRAM() override; |
| 22 void CountClientHintsDPR() override; | 23 void CountClientHintsDPR() override; |
| 23 void CountClientHintsResourceWidth() override; | 24 void CountClientHintsResourceWidth() override; |
| 24 void CountClientHintsViewportWidth() override; | 25 void CountClientHintsViewportWidth() override; |
| 25 | 26 |
| 26 private: | 27 private: |
| 27 Member<LocalFrame> frame_; | 28 Member<LocalFrame> frame_; |
| 28 }; | 29 }; |
| 29 | 30 |
| 30 } // namespace blink | 31 } // namespace blink |
| 31 | 32 |
| 32 #endif // FrameClientHintsPreferencesContext_h | 33 #endif // FrameClientHintsPreferencesContext_h |
| OLD | NEW |