mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +00:00
LibWebView: Define the list of built-in search engines in LibWebView
These engines and their query URLs are duplicated in several places. Before implementing search support in the AppKit chrome, let's move these engines to LibWebView.
This commit is contained in:
parent
10428fc7ce
commit
b770ed03ac
4 changed files with 74 additions and 0 deletions
23
Userland/Libraries/LibWebView/SearchEngine.h
Normal file
23
Userland/Libraries/LibWebView/SearchEngine.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Span.h>
|
||||
#include <AK/StringView.h>
|
||||
|
||||
namespace WebView {
|
||||
|
||||
struct SearchEngine {
|
||||
StringView name;
|
||||
StringView query_url;
|
||||
};
|
||||
|
||||
ReadonlySpan<SearchEngine> search_engines();
|
||||
SearchEngine const& default_search_engine();
|
||||
Optional<SearchEngine const&> find_search_engine(StringView name);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue