Commit 3ec708ec authored by Luna Lu's avatar Luna Lu

Update comments for parameterized feature policy

In content/public/browser/render_frame_host.h to make it clear
how feature values are compared.

TBR: kinuko, iclelland

Change-Id: Iaee687abe3f49e4c2274fe158fd5ce4fd6151d2c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504295
Auto-Submit: Luna Lu <loonybear@chromium.org>
Reviewed-by: default avatarLuna Lu <loonybear@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638256}
parent 370527cd
...@@ -300,15 +300,16 @@ class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, ...@@ -300,15 +300,16 @@ class CONTENT_EXPORT RenderFrameHost : public IPC::Listener,
virtual bool GetSuddenTerminationDisablerState( virtual bool GetSuddenTerminationDisablerState(
blink::WebSuddenTerminationDisablerType disabler_type) = 0; blink::WebSuddenTerminationDisablerType disabler_type) = 0;
// Returns true if the given Feature Policy |feature| is enabled for this // Returns true if the given |threshold_value| is below the threshold value
// RenderFrameHost and is allowed to be used by it. Use this in the browser // specified in the policy for |feature| for this RenderFrameHost. See
// process to determine whether access to a feature is allowed. // third_party/blink/public/common/feature_policy/feature_policy.h for how to
virtual bool IsFeatureEnabled(blink::mojom::FeaturePolicyFeature feature) = 0; // compare values of different types. Use this in the browser process to
// Returns true if the given |threshold_value| is above the threshold value // determine whether access to a feature is allowed.
// specified in the policy for |feature| for this RenderFrameHost. Use this
// in the browser process to determine whether access to a feature is allowed.
virtual bool IsFeatureEnabled(blink::mojom::FeaturePolicyFeature feature, virtual bool IsFeatureEnabled(blink::mojom::FeaturePolicyFeature feature,
blink::PolicyValue threshold_value) = 0; blink::PolicyValue threshold_value) = 0;
// Same as above, with |threshold_value| set to the max value the given
// |feature| can have.
virtual bool IsFeatureEnabled(blink::mojom::FeaturePolicyFeature feature) = 0;
// Opens view-source tab for the document last committed in this // Opens view-source tab for the document last committed in this
// RenderFrameHost. // RenderFrameHost.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment