|
29 | 29 | #include <QSocketNotifier>
|
30 | 30 | #include <QTimer>
|
31 | 31 | #include <WebContent/ConnectionFromClient.h>
|
| 32 | +#include <WebContent/WebDriverConnection.h> |
32 | 33 |
|
33 | 34 | static ErrorOr<void> load_content_filters();
|
34 | 35 |
|
@@ -89,14 +90,21 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
89 | 90 | dbgln("Failed to load content filters: {}", maybe_content_filter_error.error());
|
90 | 91 |
|
91 | 92 | int webcontent_fd_passing_socket { -1 };
|
| 93 | + int webdriver_fd_passing_socket { -1 }; |
92 | 94 |
|
93 | 95 | Core::ArgsParser args_parser;
|
94 | 96 | args_parser.add_option(webcontent_fd_passing_socket, "File descriptor of the passing socket for the WebContent connection", "webcontent-fd-passing-socket", 'c', "webcontent_fd_passing_socket");
|
| 97 | + 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"); |
95 | 98 | args_parser.parse(arguments);
|
96 | 99 |
|
97 | 100 | QSocketNotifier webcontent_notifier(QSocketNotifier::Type::Read);
|
98 | 101 | auto webcontent_client = TRY(create_connection_from_passed_socket<WebContent::ConnectionFromClient>(webcontent_fd_passing_socket, "WebContent"sv, webcontent_notifier));
|
99 | 102 |
|
| 103 | + QSocketNotifier webdriver_notifier(QSocketNotifier::Type::Read); |
| 104 | + RefPtr<WebContent::WebDriverConnection> webdriver_client; |
| 105 | + if (webdriver_fd_passing_socket >= 0) |
| 106 | + webdriver_client = TRY(create_connection_from_passed_socket<WebContent::WebDriverConnection>(webdriver_fd_passing_socket, "WebDriver"sv, webdriver_notifier, *webcontent_client, webcontent_client->page_host())); |
| 107 | + |
100 | 108 | return app.exec();
|
101 | 109 | }
|
102 | 110 |
|
|
0 commit comments