mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 16:24:57 +00:00
Ladybird/Android: Move common service functionality to a base class
Create LadybirdServiceBase to hold the standard "set resource dir" and "init ipc sockets" service functionality that will be common between the WebContent, RequestServer, and WebSocket services. Refactor the handler class slightly to avoid the HandlerLeak lint by making the class a static class inside the companion object and use a WeakReference to the service instead of a strong one.
This commit is contained in:
parent
315ad2d391
commit
da8f450335
8 changed files with 117 additions and 91 deletions
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "WebContentService.h"
|
||||
#include "LadybirdServiceBase.h"
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <Ladybird/FontPlugin.h>
|
||||
#include <Ladybird/HelperProcess.h>
|
||||
|
@ -38,7 +38,7 @@ class NullResourceConnector : public Web::ResourceLoaderConnector {
|
|||
}
|
||||
};
|
||||
|
||||
ErrorOr<int> web_content_main(int ipc_socket, int fd_passing_socket)
|
||||
ErrorOr<int> service_main(int ipc_socket, int fd_passing_socket)
|
||||
{
|
||||
Core::EventLoop event_loop;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue