1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 16:37:47 +00:00

Browser: Propagate autoplay settings to the WebContent process

This commit is contained in:
Timothy Flynn 2023-04-17 13:37:36 -04:00 committed by Andreas Kling
parent 65283d6879
commit fed2606591
6 changed files with 62 additions and 1 deletions

View file

@ -683,6 +683,14 @@ void BrowserWindow::content_filters_changed()
});
}
void BrowserWindow::autoplay_allowlist_changed()
{
tab_widget().for_each_child_of_type<Browser::Tab>([](auto& tab) {
tab.autoplay_allowlist_changed();
return IterationDecision::Continue;
});
}
void BrowserWindow::proxy_mappings_changed()
{
tab_widget().for_each_child_of_type<Browser::Tab>([](auto& tab) {
@ -729,6 +737,9 @@ void BrowserWindow::config_bool_did_change(DeprecatedString const& domain, Depre
} else if (key == "EnableContentFilters") {
Browser::g_content_filters_enabled = value;
content_filters_changed();
} else if (key == "AllowAutoplayOnAllWebsites") {
Browser::g_autoplay_allowed_on_all_websites = value;
autoplay_allowlist_changed();
}
// NOTE: CloseDownloadWidgetOnFinish is read each time in DownloadWindow