LibWebView: Support custom search engines

This allows the user to store custom search engines via about:settings.
Custom engines will be displayed below the builtin engines in the drop-
down to select the default engine.

A couple of edge cases here:

1. We currently reject a custom engine if one with the same name already
   exists. In the future, we should allow editing custom engines.

2. If a custom engine which was the default engine is removed, we will
   disable search rather than falling back to any other engine.
This commit is contained in:
Timothy Flynn 2025-04-04 18:12:32 -04:00 committed by Andreas Kling
commit 2810071a9c
Notes: github-actions[bot] 2025-04-06 11:46:03 +00:00
7 changed files with 317 additions and 28 deletions

View file

@ -20,7 +20,6 @@ struct SearchEngine {
String query_url;
};
ReadonlySpan<SearchEngine> search_engines();
Optional<SearchEngine> find_search_engine_by_name(StringView name);
ReadonlySpan<SearchEngine> builtin_search_engines();
}