mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +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
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/JsonArraySerializer.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/Environment.h>
|
||||
#include <LibCore/StandardPaths.h>
|
||||
|
@ -324,35 +323,6 @@ Optional<Process&> Application::find_process(pid_t pid)
|
|||
return m_process_manager.find_process(pid);
|
||||
}
|
||||
|
||||
void Application::send_current_settings_to_view(ViewImplementation& view)
|
||||
{
|
||||
auto settings = m_settings.serialize_json();
|
||||
|
||||
StringBuilder builder;
|
||||
builder.append("settings.loadSettings(\""sv);
|
||||
builder.append_escaped_for_json(settings);
|
||||
builder.append("\");"sv);
|
||||
|
||||
view.run_javascript(MUST(builder.to_string()));
|
||||
}
|
||||
|
||||
void Application::send_available_search_engines_to_view(ViewImplementation& view)
|
||||
{
|
||||
StringBuilder engines;
|
||||
|
||||
auto serializer = MUST(JsonArraySerializer<>::try_create(engines));
|
||||
for (auto const& engine : search_engines())
|
||||
MUST(serializer.add(engine.name));
|
||||
MUST(serializer.finish());
|
||||
|
||||
StringBuilder builder;
|
||||
builder.append("settings.loadSearchEngines(\""sv);
|
||||
builder.append_escaped_for_json(engines.string_view());
|
||||
builder.append("\");"sv);
|
||||
|
||||
view.run_javascript(MUST(builder.to_string()));
|
||||
}
|
||||
|
||||
void Application::process_did_exit(Process&& process)
|
||||
{
|
||||
if (m_in_shutdown)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue