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

Unified Diff: third_party/WebKit/Source/core/dom/SecurityContext.h

Issue 2481653002: Move FeaturePolicy object to SecurityContext (Closed)
Patch Set: Created 4 years, 1 month 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/dom/SecurityContext.h
diff --git a/third_party/WebKit/Source/core/dom/SecurityContext.h b/third_party/WebKit/Source/core/dom/SecurityContext.h
index 072cbc68f98a97b4a9a35d887bda7f6a8a4b1bf4..f3114eac1c06d08d739ffb793ca5e1885da0994f 100644
--- a/third_party/WebKit/Source/core/dom/SecurityContext.h
+++ b/third_party/WebKit/Source/core/dom/SecurityContext.h
@@ -29,6 +29,7 @@
#include "core/CoreExport.h"
#include "core/dom/SandboxFlags.h"
+#include "platform/feature_policy/FeaturePolicy.h"
#include "platform/heap/Handle.h"
#include "platform/weborigin/Suborigin.h"
#include "public/platform/WebAddressSpace.h"
@@ -41,6 +42,8 @@
#include "wtf/text/StringHash.h"
#include "wtf/text/WTFString.h"
+#include <memory>
+
namespace blink {
class SecurityOrigin;
@@ -89,6 +92,11 @@ class CORE_EXPORT SecurityContext : public GarbageCollectedMixin {
void enforceSuborigin(const Suborigin&);
+ FeaturePolicy* getFeaturePolicy() const { return m_featurePolicy.get(); }
+ void setFeaturePolicy(std::unique_ptr<FeaturePolicy> newPolicy) {
+ m_featurePolicy = std::move(newPolicy);
+ }
+
protected:
SecurityContext();
virtual ~SecurityContext();
@@ -100,6 +108,7 @@ class CORE_EXPORT SecurityContext : public GarbageCollectedMixin {
private:
RefPtr<SecurityOrigin> m_securityOrigin;
Member<ContentSecurityPolicy> m_contentSecurityPolicy;
+ std::unique_ptr<FeaturePolicy> m_featurePolicy;
SandboxFlags m_sandboxFlags;
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.cpp ('k') | third_party/WebKit/Source/core/frame/Frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698