mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:27:35 +00:00
Ladybird/WebDriver: Move to using local socket files for WebDriver IPC
This allows us to use standard Serenity IPC infrastructure rather than manually creating FD-passing sockets. This also lets us use Serenity's WebDriver Session class, removing the copy previously used in Ladybird. This ensures any changes to Session in the future will be picked up by Ladybird for free.
This commit is contained in:
parent
ea26e45594
commit
e5192073d9
12 changed files with 95 additions and 231 deletions
|
@ -67,17 +67,17 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
Gfx::FontDatabase::set_fixed_width_font_query("Csilla 10 400 0");
|
||||
|
||||
StringView raw_url;
|
||||
int webdriver_fd_passing_socket { -1 };
|
||||
StringView webdriver_content_ipc_path;
|
||||
|
||||
Core::ArgsParser args_parser;
|
||||
args_parser.set_general_help("The Ladybird web browser :^)");
|
||||
args_parser.add_positional_argument(raw_url, "URL to open", "url", Core::ArgsParser::Required::No);
|
||||
args_parser.add_option(webdriver_fd_passing_socket, "File descriptor of the passing socket for the WebDriver connection", "webdriver-fd-passing-socket", 'd', "webdriver_fd_passing_socket");
|
||||
args_parser.add_option(webdriver_content_ipc_path, "Path to WebDriver IPC for WebContent", "webdriver-content-path", 0, "path");
|
||||
args_parser.parse(arguments);
|
||||
|
||||
auto cookie_jar = TRY(Browser::CookieJar::create(*database));
|
||||
|
||||
BrowserWindow window(cookie_jar, webdriver_fd_passing_socket);
|
||||
BrowserWindow window(cookie_jar, webdriver_content_ipc_path);
|
||||
s_settings = new Browser::Settings(&window);
|
||||
window.setWindowTitle("Ladybird");
|
||||
window.resize(800, 600);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue