mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:37:34 +00:00
Ladybird: Add WebContentService for Android port
This will let us spawn a new process for an Android Service to handle all our WebContent needs. The ServiceConnection is manged by each WebView. The lifecycle of the Service is not quite clear yet, but each bindService call will get a unique Messenger that can be used to transfer the WebContent side of the LibIPC socketpair we use in other ports.
This commit is contained in:
parent
ffc0046d74
commit
6952de73dc
9 changed files with 334 additions and 40 deletions
|
@ -29,8 +29,11 @@ if (ENABLE_QT)
|
|||
target_link_libraries(WebContent PRIVATE Qt::Core Qt::Network Qt::Multimedia)
|
||||
target_compile_definitions(WebContent PRIVATE HAVE_QT=1)
|
||||
else()
|
||||
# FIXME: Remove when chromes are upstreamed
|
||||
add_library(webcontent STATIC ${WEBCONTENT_SOURCES})
|
||||
set(LIB_TYPE STATIC)
|
||||
if (ANDROID)
|
||||
set(LIB_TYPE SHARED)
|
||||
endif()
|
||||
add_library(webcontent ${LIB_TYPE} ${WEBCONTENT_SOURCES})
|
||||
target_include_directories(webcontent PRIVATE ${SERENITY_SOURCE_DIR}/Userland/Services/)
|
||||
target_include_directories(webcontent PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/..)
|
||||
target_link_libraries(webcontent PRIVATE LibAudio LibCore LibFileSystem LibGfx LibIPC LibJS LibMain LibWeb LibWebSocket LibProtocol LibWebView)
|
||||
|
@ -49,6 +52,11 @@ else()
|
|||
${WEBCONTENT_SOURCE_DIR}/WebDriverConnection.h
|
||||
)
|
||||
|
||||
if (ANDROID)
|
||||
target_sources(webcontent PRIVATE ../Android/src/main/cpp/WebContentService.cpp)
|
||||
target_link_libraries(webcontent PRIVATE log)
|
||||
endif()
|
||||
|
||||
add_executable(WebContent main.cpp)
|
||||
target_link_libraries(WebContent PRIVATE webcontent)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue