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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2791063002: Add Feature Policy interface to RenderFrameHost (Closed)
Patch Set: Rebase Created 3 years, 8 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/browser/frame_host/render_frame_host_impl.h ('k') | content/public/browser/render_frame_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 55d6a08eced5a705888db727291502979b46785e..ee24d6327aff7161e92ef8553bb62ac827458e1d 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -107,6 +107,7 @@
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "services/service_manager/public/cpp/connector.h"
#include "services/service_manager/public/cpp/interface_provider.h"
+#include "third_party/WebKit/public/platform/WebFeaturePolicy.h"
#include "ui/accessibility/ax_tree.h"
#include "ui/accessibility/ax_tree_id_registry.h"
#include "ui/accessibility/ax_tree_update.h"
@@ -1912,6 +1913,12 @@ bool RenderFrameHostImpl::IsBeforeUnloadHangMonitorDisabledForTesting() {
return !beforeunload_timeout_;
}
+bool RenderFrameHostImpl::IsFeatureEnabled(
+ blink::WebFeaturePolicyFeature feature) {
+ return feature_policy_->IsFeatureEnabledForOrigin(feature,
Reilly Grant (use Gerrit) 2017/04/13 20:21:45 I recommend making this feature_policy_ && feature
+ GetLastCommittedOrigin());
+}
+
void RenderFrameHostImpl::OnDidAccessInitialDocument() {
delegate_->DidAccessInitialDocument();
}
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/public/browser/render_frame_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698