LibWeb+LibWebView+WebContent: Convert about:settings to a WebUI
Some checks are pending
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

This commit is contained in:
Timothy Flynn 2025-03-24 10:22:38 -04:00 committed by Tim Flynn
parent c75e40180c
commit f05b0bfd5f
Notes: github-actions[bot] 2025-03-28 11:32:05 +00:00
23 changed files with 151 additions and 264 deletions

View file

@ -669,39 +669,6 @@ Messages::WebContentClient::RequestWorkerAgentResponse WebContentClient::request
return IPC::File {};
}
void WebContentClient::request_current_settings(u64 page_id)
{
if (auto view = view_for_page_id(page_id); view.has_value())
WebView::Application::the().send_current_settings_to_view(*view);
}
void WebContentClient::restore_default_settings(u64 page_id)
{
WebView::Application::settings().restore_defaults();
request_current_settings(page_id);
}
void WebContentClient::set_new_tab_page_url(u64 page_id, URL::URL new_tab_page_url)
{
WebView::Application::settings().set_new_tab_page_url(move(new_tab_page_url));
request_current_settings(page_id);
}
void WebContentClient::request_available_search_engines(u64 page_id)
{
if (auto view = view_for_page_id(page_id); view.has_value())
WebView::Application::the().send_available_search_engines_to_view(*view);
}
void WebContentClient::set_search_engine(u64 page_id, Optional<String> search_engine)
{
WebView::Application::settings().set_search_engine(search_engine.map([](auto const& search_engine) {
return search_engine.bytes_as_string_view();
}));
request_current_settings(page_id);
}
Optional<ViewImplementation&> WebContentClient::view_for_page_id(u64 page_id, SourceLocation location)
{
// Don't bother logging anything for the spare WebContent process. It will only receive a load notification for about:blank.