mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 10:12:25 -05:00
LibDesktop: Add Launcher::ensure_connection()
This can be use force connection at startup and not to leave 'unix' pledge all the time.
This commit is contained in:
parent
3022baddc2
commit
07cf2218cb
Notes:
sideshowbarker
2024-07-17 20:32:43 +09:00
Author: https://github.com/sppmacd Commit: https://github.com/SerenityOS/serenity/commit/07cf2218cb3 Pull-request: https://github.com/SerenityOS/serenity/pull/11488 Reviewed-by: https://github.com/awesomekling
2 changed files with 6 additions and 0 deletions
|
@ -50,6 +50,11 @@ static LaunchServerConnection& connection()
|
|||
return connection;
|
||||
}
|
||||
|
||||
void Launcher::ensure_connection()
|
||||
{
|
||||
[[maybe_unused]] auto& conn = connection();
|
||||
}
|
||||
|
||||
ErrorOr<void> Launcher::add_allowed_url(URL const& url)
|
||||
{
|
||||
auto response_or_error = connection().try_add_allowed_url(url);
|
||||
|
|
|
@ -31,6 +31,7 @@ public:
|
|||
static NonnullRefPtr<Details> from_details_str(const String&);
|
||||
};
|
||||
|
||||
static void ensure_connection();
|
||||
static ErrorOr<void> add_allowed_url(URL const&);
|
||||
static ErrorOr<void> add_allowed_handler_with_any_url(String const& handler);
|
||||
static ErrorOr<void> add_allowed_handler_with_only_specific_urls(String const& handler, Vector<URL> const&);
|
||||
|
|
Loading…
Add table
Reference in a new issue