Index: content/common/feature_policy/feature_policy.h |
diff --git a/content/common/feature_policy/feature_policy.h b/content/common/feature_policy/feature_policy.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..83eaee1332461b89d4da1da27872c46e3b70642d |
--- /dev/null |
+++ b/content/common/feature_policy/feature_policy.h |
@@ -0,0 +1,37 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
raymes
2017/01/25 01:00:42
nit: 2017
iclelland
2017/01/25 03:28:38
Done.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_COMMON_FEATURE_POLICY_FEATURE_POLICY_H_ |
+#define CONTENT_COMMON_FEATURE_POLICY_FEATURE_POLICY_H_ |
+ |
+#include <string> |
+#include <vector> |
+ |
+#include "content/common/content_export.h" |
+#include "url/origin.h" |
+ |
+namespace content { |
+ |
+// This struct holds feature policy whitelist data that needs to be replicated |
+// between a RenderFrame and any of its associated RenderFrameProxies. A list of |
+// these form a ParsedFeaturePolicyHeader. |
+// NOTE: These types are used for replication frame state between processes. |
+// They exist only because we can't transfer WebVectors directly over IPC. |
+struct CONTENT_EXPORT ParsedFeaturePolicyDeclaration { |
+ ParsedFeaturePolicyDeclaration(); |
+ ParsedFeaturePolicyDeclaration(std::string feature_name, |
+ bool matches_all_origins, |
+ std::vector<url::Origin> origins); |
+ ParsedFeaturePolicyDeclaration(const ParsedFeaturePolicyDeclaration& rhs); |
+ ~ParsedFeaturePolicyDeclaration(); |
+ |
+ std::string feature_name; |
+ bool matches_all_origins; |
+ std::vector<url::Origin> origins; |
+}; |
+using ParsedFeaturePolicyHeader = std::vector<ParsedFeaturePolicyDeclaration>; |
raymes
2017/01/25 01:00:42
nit: newline before
iclelland
2017/01/25 14:58:04
Done.
|
+ |
+} // namespace content |
+ |
+#endif // CONTENT_COMMON_FEATURE_POLICY_FEATURE_POLICY_H_ |