mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:17:35 +00:00
LaunchServer+LibDesktop: Add API to list handlers for a given URL
You can now ask for a list of applications that can handle opening a given URL. This will be useful for creating context menus.
This commit is contained in:
parent
3775983dfe
commit
512c04c64f
7 changed files with 48 additions and 0 deletions
|
@ -39,11 +39,13 @@ public:
|
|||
|
||||
void load_config(const Core::ConfigFile&);
|
||||
bool open_url(const URL&);
|
||||
Vector<String> handlers_for_url(const URL&);
|
||||
|
||||
private:
|
||||
HashMap<String, String> m_protocol_handlers;
|
||||
HashMap<String, String> m_file_handlers;
|
||||
|
||||
Vector<String> handlers_for_path(const String&);
|
||||
bool open_file_url(const URL&);
|
||||
bool open_with_handlers(const HashMap<String, String>& handlers, const String key, const String argument, const String default_program);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue