mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWebView+UI: Introduce a persistent settings object
This adds a WebView::Settings class to own persistent browser settings. In this first pass, it now owns the new tab page URL and search engine settings. For simplicitly, we currently use a JSON format for these settings. They are stored alongside the cookie database. As of this commit, the saved JSON will have the form: { "newTabPageURL": "about:blank", "searchEngine": { "name": "Google" } } (The search engine is an object to allow room for a future patch to implement custom search engine URLs.) For Qt, this replaces the management of these particular settings in the Qt settings UI. We will have an internal browser page to control these settings instead. In the future, we will want to port all settings to this new class. We will also want to allow UI-specific settings (such as whether the hamburger menu is displayed in Qt).
This commit is contained in:
parent
b4fde1ef64
commit
e084a86861
Notes:
github-actions[bot]
2025-03-22 16:28:56 +00:00
Author: https://github.com/trflynn89
Commit: e084a86861
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4036
28 changed files with 313 additions and 246 deletions
|
@ -117,13 +117,13 @@ void UIProcessConnectionFromClient::die()
|
|||
void UIProcessConnectionFromClient::create_new_tab(Vector<ByteString> urls)
|
||||
{
|
||||
if (on_new_tab)
|
||||
on_new_tab(sanitize_urls(urls, Application::browser_options().new_tab_page_url));
|
||||
on_new_tab(sanitize_urls(urls, Application::settings().new_tab_page_url()));
|
||||
}
|
||||
|
||||
void UIProcessConnectionFromClient::create_new_window(Vector<ByteString> urls)
|
||||
{
|
||||
if (on_new_window)
|
||||
on_new_window(sanitize_urls(urls, Application::browser_options().new_tab_page_url));
|
||||
on_new_window(sanitize_urls(urls, Application::settings().new_tab_page_url()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue