mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:58:11 +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:
parent
add15a5f04
commit
11fe34ce0f
5 changed files with 155 additions and 736 deletions
|
@ -65,17 +65,11 @@ static ErrorOr<pid_t> launch_browser(DeprecatedString const& socket_path)
|
|||
static ErrorOr<pid_t> launch_headless_browser(DeprecatedString const& socket_path)
|
||||
{
|
||||
auto resources = DeprecatedString::formatted("{}/res", s_serenity_resource_root);
|
||||
auto error_page = DeprecatedString::formatted("{}/res/html/error.html", s_serenity_resource_root);
|
||||
auto certs = DeprecatedString::formatted("{}/etc/ca_certs.ini", s_serenity_resource_root);
|
||||
|
||||
char const* argv[] = {
|
||||
"headless-browser",
|
||||
"--resources",
|
||||
resources.characters(),
|
||||
"--error-page",
|
||||
error_page.characters(),
|
||||
"--certs",
|
||||
certs.characters(),
|
||||
"--webdriver-ipc-path",
|
||||
socket_path.characters(),
|
||||
"about:blank",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue