Add an SPI policy action to allow clients to explicitly ask for a new process on...
[WebKit-https.git] / Source / WebKit / UIProcess / API / C / WKFramePolicyListener.cpp
index 41de762..ff97e98 100644 (file)
@@ -45,6 +45,12 @@ void WKFramePolicyListenerUse(WKFramePolicyListenerRef policyListenerRef)
     toImpl(policyListenerRef)->use(std::nullopt);
 }
 
     toImpl(policyListenerRef)->use(std::nullopt);
 }
 
+void WKFramePolicyListenerUseInNewProcess(WKFramePolicyListenerRef policyListenerRef)
+{
+    toImpl(policyListenerRef)->setApplyPolicyInNewProcessIfPossible(true);
+    toImpl(policyListenerRef)->use(std::nullopt);
+}
+
 void WKFramePolicyListenerUseWithPolicies(WKFramePolicyListenerRef policyListenerRef, WKWebsitePoliciesRef websitePolicies)
 {
     auto data = toImpl(websitePolicies)->data();
 void WKFramePolicyListenerUseWithPolicies(WKFramePolicyListenerRef policyListenerRef, WKWebsitePoliciesRef websitePolicies)
 {
     auto data = toImpl(websitePolicies)->data();
@@ -60,6 +66,12 @@ void WKFramePolicyListenerUseWithPolicies(WKFramePolicyListenerRef policyListene
     toImpl(policyListenerRef)->use(WTFMove(data));
 }
 
     toImpl(policyListenerRef)->use(WTFMove(data));
 }
 
+void WKFramePolicyListenerUseInNewProcessWithPolicies(WKFramePolicyListenerRef policyListenerRef, WKWebsitePoliciesRef websitePolicies)
+{
+    toImpl(policyListenerRef)->setApplyPolicyInNewProcessIfPossible(true);
+    WKFramePolicyListenerUseWithPolicies(policyListenerRef, websitePolicies);
+}
+
 void WKFramePolicyListenerDownload(WKFramePolicyListenerRef policyListenerRef)
 {
     toImpl(policyListenerRef)->download();
 void WKFramePolicyListenerDownload(WKFramePolicyListenerRef policyListenerRef)
 {
     toImpl(policyListenerRef)->download();