Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(543)

Unified Diff: third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h

Issue 2544933003: Split methods for ClientHintsPreferences from FrameFetchContext (Closed)
Patch Set: a Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h
diff --git a/third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h b/third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h
new file mode 100644
index 0000000000000000000000000000000000000000..ac9e015fe97fba6d75c9d92f0d100ae6a2ed393d
--- /dev/null
+++ b/third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h
@@ -0,0 +1,32 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef FrameClientHintsPreferencesContext_h
+#define FrameClientHintsPreferencesContext_h
+
+#include "core/fetch/ClientHintsPreferences.h"
+#include "core/frame/Frame.h"
+#include "platform/heap/Persistent.h"
+#include "wtf/Allocator.h"
+
+namespace blink {
+
+class FrameClientHintsPreferencesContext
yhirano 2016/12/08 07:47:12 +final
tyoshino (SeeGerritForStatus) 2016/12/09 09:43:24 Done.
+ : public ClientHintsPreferences::Context {
+ STACK_ALLOCATED();
+
+ public:
+ explicit FrameClientHintsPreferencesContext(Frame*);
+
+ void countClientHintsDPR() override;
+ void countClientHintsResourceWidth() override;
+ void countClientHintsViewportWidth() override;
+
+ private:
+ Persistent<Frame> m_frame;
yhirano 2016/12/08 07:47:12 I think a STACK_ALLOCATED class can have an onheap
tyoshino (SeeGerritForStatus) 2016/12/09 09:43:24 Tried, but it seems we can't. ../../third_party/W
tyoshino (SeeGerritForStatus) 2016/12/09 09:46:38 Sorry I misunderstood the suggestion. Done
+};
+
+} // namespace blink
+
+#endif // FrameClientHintsPreferencesContext_h

Powered by Google App Engine
This is Rietveld 408576698