1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:47:46 +00:00

headless-browser: Re-implement headless-browser using an OOPWV

headless-browser currently uses its own PageClient to load web pages
in-process. Due to this, it also needs to set up a whole bunch of other
objects needed to run LibWeb, e.g. image decoders, request servers, etc.

This changes headless-browser to instead implement a WebView to launch
WebContent out-of-process. This implementation is almost entirely empty,
but can be filled in as-needed. For example, we may want to print
JavaScript console messages.
This commit is contained in:
Timothy Flynn 2023-03-12 12:38:15 -04:00 committed by Linus Groh
parent add15a5f04
commit 11fe34ce0f
5 changed files with 155 additions and 736 deletions

View file

@ -103,6 +103,15 @@ target_include_directories(ladybird PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(ladybird PRIVATE ${SERENITY_SOURCE_DIR}/Userland/Applications/)
target_include_directories(ladybird PRIVATE ${SERENITY_SOURCE_DIR}/Userland/Services/)
qt_add_executable(headless-browser
${SERENITY_SOURCE_DIR}/Userland/Utilities/headless-browser.cpp
${SERENITY_SOURCE_DIR}/Userland/Services/WebContent/WebDriverConnection.cpp
HelperProcess.cpp
Utilities.cpp)
target_include_directories(headless-browser PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(headless-browser PRIVATE Qt::Core LibWeb LibWebView LibWebSocket LibCrypto LibGemini LibHTTP LibJS LibGfx LibMain LibTLS LibIPC LibJS)
set_target_properties(ladybird PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER org.serenityos.ladybird
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}