1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:07:36 +00:00

LaunchServer+LibDesktop: Add ability to allow URL without handler

This lets clients say they want to be able to open a specific URL
without specifying which handler to use.
This commit is contained in:
Andreas Kling 2021-01-03 12:03:13 +01:00
parent 43c2b66b18
commit 70c59dcbf8
5 changed files with 48 additions and 18 deletions

View file

@ -51,9 +51,10 @@ public:
static NonnullRefPtr<Details> from_details_str(const String&);
};
[[nodiscard]] static bool add_allowed_url(const URL&);
[[nodiscard]] static bool add_allowed_handler_with_any_url(const String& handler);
[[nodiscard]] static bool add_allowed_handler_with_only_specific_urls(const String& handler, const Vector<URL>&);
[[nodiscard]] static bool seal_allowed_handler_list();
[[nodiscard]] static bool seal_allowlist();
static bool open(const URL&, const String& handler_name = {});
static bool open(const URL&, const Details& details);
static Vector<String> get_handlers_for_url(const URL&);