mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +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:
@@ -57,4 +57,10 @@ bool Launcher::open(const URL& url)
|
||||
return connection->send_sync<Messages::LaunchServer::OpenUrl>(url.to_string())->response();
|
||||
}
|
||||
|
||||
Vector<String> Launcher::get_handlers_for_url(const URL& url)
|
||||
{
|
||||
auto connection = LaunchServerConnection::construct();
|
||||
return connection->send_sync<Messages::LaunchServer::GetHandlersForURL>(url.to_string())->handlers();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user