mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 07:18:51 +00:00
LibWebView: Add do-not-track setting to about:settings
This commit is contained in:
parent
49dae536a7
commit
1be3e7fd8a
Notes:
github-actions[bot]
2025-04-02 18:17:25 +00:00
Author: https://github.com/trflynn89
Commit: 1be3e7fd8a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4194
Reviewed-by: https://github.com/AtkinsSJ
7 changed files with 66 additions and 0 deletions
|
@ -605,6 +605,7 @@ void ViewImplementation::initialize_client(CreateNewClient create_new_client)
|
|||
client().async_debug_request(m_client_state.page_index, "spoof-user-agent"sv, *user_agents.get(*user_agent_preset));
|
||||
|
||||
autoplay_settings_changed();
|
||||
do_not_track_changed();
|
||||
}
|
||||
|
||||
void ViewImplementation::handle_web_content_process_crash(LoadErrorPage load_error_page)
|
||||
|
@ -663,6 +664,12 @@ void ViewImplementation::autoplay_settings_changed()
|
|||
client().async_set_autoplay_allowlist(page_id(), autoplay_settings.site_filters.values());
|
||||
}
|
||||
|
||||
void ViewImplementation::do_not_track_changed()
|
||||
{
|
||||
auto do_not_track = Application::settings().do_not_track();
|
||||
client().async_set_enable_do_not_track(page_id(), do_not_track == DoNotTrack::Yes);
|
||||
}
|
||||
|
||||
static ErrorOr<LexicalPath> save_screenshot(Gfx::ShareableBitmap const& bitmap)
|
||||
{
|
||||
if (!bitmap.is_valid())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue