1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:48:12 +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:
Andreas Kling 2020-05-12 18:43:55 +02:00
parent 3775983dfe
commit 512c04c64f
7 changed files with 48 additions and 0 deletions

View file

@ -59,4 +59,12 @@ OwnPtr<Messages::LaunchServer::OpenUrlResponse> ClientConnection::handle(const M
auto result = Launcher::the().open_url(url);
return make<Messages::LaunchServer::OpenUrlResponse>(result);
}
OwnPtr<Messages::LaunchServer::GetHandlersForURLResponse> ClientConnection::handle(const Messages::LaunchServer::GetHandlersForURL& request)
{
URL url(request.url());
auto result = Launcher::the().handlers_for_url(url);
return make<Messages::LaunchServer::GetHandlersForURLResponse>(result);
}
}