mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 17:44:56 +09:00
LibWeb+LibWebView+WebContent: Add APIs to manage an autoplay allowlist
The spec defines a Permissions Policy to control some browser behaviors on a per-origin basis. Management of these permissions live in their own spec: https://w3c.github.io/webappsec-permissions-policy/ This implements a somewhat ad-hoc Permissions Policy for autoplaying media elements. We will need to implement the entire policy spec for this to be more general.
This commit is contained in:
parent
6131e621d6
commit
7966fc4780
Notes:
sideshowbarker
2024-07-16 21:17:12 +09:00
Author: https://github.com/trflynn89
Commit: 7966fc4780
Pull-request: https://github.com/SerenityOS/serenity/pull/18416
Reviewed-by: https://github.com/cammo1123
12 changed files with 209 additions and 0 deletions
|
@ -600,6 +600,16 @@ void OutOfProcessWebView::set_content_filters(Vector<DeprecatedString> filters)
|
|||
client().async_set_content_filters(filters);
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::set_autoplay_allowed_on_all_websites()
|
||||
{
|
||||
client().async_set_autoplay_allowed_on_all_websites();
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::set_autoplay_allowlist(Vector<String> allowlist)
|
||||
{
|
||||
client().async_set_autoplay_allowlist(move(allowlist));
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::set_proxy_mappings(Vector<DeprecatedString> proxies, HashMap<DeprecatedString, size_t> mappings)
|
||||
{
|
||||
client().async_set_proxy_mappings(move(proxies), move(mappings));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue