mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-04 10:18:51 +00:00
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
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:
parent
c75e40180c
commit
f05b0bfd5f
Notes:
github-actions[bot]
2025-03-28 11:32:05 +00:00
Author: https://github.com/trflynn89
Commit: f05b0bfd5f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4068
23 changed files with 151 additions and 264 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue