Skip to content

Commit 4956514

Browse files
committed
Ladybird/Android: Make bind_service helper public in WebContentService
We'll need to call this from other Ladybird files for future services.
1 parent 5b03135 commit 4956514

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Ladybird/Android/src/main/cpp/WebContentService.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@
3131
#include <WebContent/ConnectionFromClient.h>
3232
#include <WebContent/PageHost.h>
3333

34-
template<typename Client>
35-
static ErrorOr<NonnullRefPtr<Client>> bind_service(void (*bind_method)(int, int));
36-
3734
static ErrorOr<NonnullRefPtr<Protocol::RequestClient>> bind_request_server_service()
3835
{
3936
return bind_service<Protocol::RequestClient>(&bind_request_server_java);
@@ -92,7 +89,7 @@ ErrorOr<int> service_main(int ipc_socket, int fd_passing_socket)
9289
}
9390

9491
template<typename Client>
95-
static ErrorOr<NonnullRefPtr<Client>> bind_service(void (*bind_method)(int, int))
92+
ErrorOr<NonnullRefPtr<Client>> bind_service(void (*bind_method)(int, int))
9693
{
9794
int socket_fds[2] {};
9895
TRY(Core::System::socketpair(AF_LOCAL, SOCK_STREAM, 0, socket_fds));

Ladybird/Android/src/main/cpp/WebContentService.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,10 @@
66

77
#pragma once
88

9+
#include <AK/NonnullRefPtr.h>
10+
11+
template<typename Client>
12+
ErrorOr<NonnullRefPtr<Client>> bind_service(void (*bind_method)(int, int));
13+
914
void bind_request_server_java(int ipc_socket, int fd_passing_socket);
1015
void bind_web_socket_java(int ipc_socket, int fd_passing_socket);

0 commit comments

Comments
 (0)