mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Ladybird/Android: Make bind_service helper public in WebContentService
We'll need to call this from other Ladybird files for future services.
This commit is contained in:
parent
5b03135c46
commit
4956514dfb
Notes:
sideshowbarker
2024-07-17 23:07:41 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/4956514dfb Pull-request: https://github.com/SerenityOS/serenity/pull/21721
2 changed files with 6 additions and 4 deletions
|
@ -31,9 +31,6 @@
|
|||
#include <WebContent/ConnectionFromClient.h>
|
||||
#include <WebContent/PageHost.h>
|
||||
|
||||
template<typename Client>
|
||||
static ErrorOr<NonnullRefPtr<Client>> bind_service(void (*bind_method)(int, int));
|
||||
|
||||
static ErrorOr<NonnullRefPtr<Protocol::RequestClient>> bind_request_server_service()
|
||||
{
|
||||
return bind_service<Protocol::RequestClient>(&bind_request_server_java);
|
||||
|
@ -92,7 +89,7 @@ ErrorOr<int> service_main(int ipc_socket, int fd_passing_socket)
|
|||
}
|
||||
|
||||
template<typename Client>
|
||||
static ErrorOr<NonnullRefPtr<Client>> bind_service(void (*bind_method)(int, int))
|
||||
ErrorOr<NonnullRefPtr<Client>> bind_service(void (*bind_method)(int, int))
|
||||
{
|
||||
int socket_fds[2] {};
|
||||
TRY(Core::System::socketpair(AF_LOCAL, SOCK_STREAM, 0, socket_fds));
|
||||
|
|
|
@ -6,5 +6,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
|
||||
template<typename Client>
|
||||
ErrorOr<NonnullRefPtr<Client>> bind_service(void (*bind_method)(int, int));
|
||||
|
||||
void bind_request_server_java(int ipc_socket, int fd_passing_socket);
|
||||
void bind_web_socket_java(int ipc_socket, int fd_passing_socket);
|
||||
|
|
Loading…
Reference in a new issue