mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWebView: Add autocomplete settings to about:settings
This implements an autocomplete engine inside LibWebView, to replace the engine currently used by Qt. Whereas Qt uses the Qt Network framework to perform autocomplete requests, LibWebView uses RequestServer. This moves downloading this untrusted data out of the browser process. This patch only implements the persisted settings and their UI. It does not integrate this engine into the browser UI.
This commit is contained in:
parent
92e1d297be
commit
5d2e6ffe30
Notes:
github-actions[bot]
2025-04-02 12:53:55 +00:00
Author: https://github.com/trflynn89
Commit: 5d2e6ffe30
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4156
9 changed files with 432 additions and 66 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <AK/JsonValue.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <LibURL/URL.h>
|
||||
#include <LibWebView/Autocomplete.h>
|
||||
#include <LibWebView/Forward.h>
|
||||
#include <LibWebView/SearchEngine.h>
|
||||
|
||||
|
@ -30,6 +31,7 @@ public:
|
|||
|
||||
virtual void new_tab_page_url_changed() { }
|
||||
virtual void search_engine_changed() { }
|
||||
virtual void autocomplete_engine_changed() { }
|
||||
virtual void autoplay_settings_changed() { }
|
||||
};
|
||||
|
||||
|
@ -47,6 +49,9 @@ public:
|
|||
Optional<SearchEngine> const& search_engine() const { return m_search_engine; }
|
||||
void set_search_engine(Optional<StringView> search_engine_name);
|
||||
|
||||
Optional<AutocompleteEngine> const& autocomplete_engine() const { return m_autocomplete_engine; }
|
||||
void set_autocomplete_engine(Optional<StringView> autocomplete_engine_name);
|
||||
|
||||
SiteSetting const& autoplay_settings() const { return m_autoplay; }
|
||||
void set_autoplay_enabled_globally(bool);
|
||||
void add_autoplay_site_filter(String const&);
|
||||
|
@ -65,6 +70,7 @@ private:
|
|||
|
||||
URL::URL m_new_tab_page_url;
|
||||
Optional<SearchEngine> m_search_engine;
|
||||
Optional<AutocompleteEngine> m_autocomplete_engine;
|
||||
SiteSetting m_autoplay;
|
||||
|
||||
Vector<SettingsObserver&> m_observers;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue