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

Unified Diff: content/renderer/frame_owner_properties.cc

Issue 2697713003: Initial Implementation of Iframe Attribute for Feature Policy (Part 2) (Closed)
Patch Set: Update rebase Created 3 years, 10 months 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
« no previous file with comments | « content/common/frame_owner_properties.cc ('k') | content/test/data/allowed_frames.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/frame_owner_properties.cc
diff --git a/content/renderer/frame_owner_properties.cc b/content/renderer/frame_owner_properties.cc
index d885fa1b426b5aaad26fdb66ffd57800336e95f9..bd0b4ced6055075e8a0de1d600a378ba29dcc2d7 100644
--- a/content/renderer/frame_owner_properties.cc
+++ b/content/renderer/frame_owner_properties.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include <iterator>
+#include "third_party/WebKit/public/platform/WebFeaturePolicy.h"
#include "third_party/WebKit/public/platform/modules/permissions/permission.mojom.h"
namespace content {
@@ -25,6 +26,9 @@ FrameOwnerProperties ConvertWebFrameOwnerPropertiesToFrameOwnerProperties(
std::copy(web_frame_owner_properties.delegatedPermissions.begin(),
web_frame_owner_properties.delegatedPermissions.end(),
std::back_inserter(result.delegated_permissions));
+ std::copy(web_frame_owner_properties.allowedFeatures.begin(),
+ web_frame_owner_properties.allowedFeatures.end(),
+ std::back_inserter(result.allowed_features));
return result;
}
@@ -44,6 +48,8 @@ ConvertFrameOwnerPropertiesToWebFrameOwnerProperties(
blink::WebString::fromUTF8(frame_owner_properties.required_csp);
result.delegatedPermissions = blink::WebVector<blink::mojom::PermissionName>(
frame_owner_properties.delegated_permissions);
+ result.allowedFeatures = blink::WebVector<blink::WebFeaturePolicyFeature>(
+ frame_owner_properties.allowed_features);
return result;
}
« no previous file with comments | « content/common/frame_owner_properties.cc ('k') | content/test/data/allowed_frames.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698