mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +00:00
LibWebView+RequestServer: Add some UI for DNS settings
This commit is contained in:
parent
e1369aa7d6
commit
2c13504bfc
Notes:
github-actions[bot]
2025-04-22 22:06:21 +00:00
Author: https://github.com/alimpfard
Commit: 2c13504bfc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4278
Reviewed-by: https://github.com/trflynn89 ✅
12 changed files with 284 additions and 14 deletions
|
@ -63,6 +63,10 @@ void SettingsUI::register_interfaces()
|
|||
register_interface("setDoNotTrack"sv, [this](auto const& data) {
|
||||
set_do_not_track(data);
|
||||
});
|
||||
|
||||
register_interface("setDNSSettings"sv, [this](auto const& data) {
|
||||
set_dns_settings(data);
|
||||
});
|
||||
}
|
||||
|
||||
void SettingsUI::load_current_settings()
|
||||
|
@ -263,4 +267,9 @@ void SettingsUI::set_do_not_track(JsonValue const& do_not_track)
|
|||
WebView::Application::settings().set_do_not_track(do_not_track.as_bool() ? DoNotTrack::Yes : DoNotTrack::No);
|
||||
}
|
||||
|
||||
void SettingsUI::set_dns_settings(JsonValue const& dns_settings)
|
||||
{
|
||||
Application::settings().set_dns_settings(Settings::parse_dns_settings(dns_settings));
|
||||
load_current_settings();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,8 @@ private:
|
|||
void remove_all_site_setting_filters(JsonValue const&);
|
||||
|
||||
void set_do_not_track(JsonValue const&);
|
||||
|
||||
void set_dns_settings(JsonValue const&);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue