LibWebView+LibCore: Move IPCProcess into WebView::Process

Ladybird's HelperProcess.cpp was the only user of the IPCProcess class.
Moving the helper class from LibCore allows for some more interesting
LibIPC changes in the upcoming commits.
This commit is contained in:
Andrew Kaster 2024-10-22 13:27:15 -06:00 committed by Andrew Kaster
commit 9a6eccc590
Notes: github-actions[bot] 2024-10-23 19:14:21 +00:00
6 changed files with 144 additions and 151 deletions

View file

@ -29,9 +29,9 @@ ErrorOr<ChromeProcess::ProcessDisposition> ChromeProcess::connect(Vector<ByteStr
{
static constexpr auto process_name = "Ladybird"sv;
auto [socket_path, pid_path] = TRY(Core::IPCProcess::paths_for_process(process_name));
auto [socket_path, pid_path] = TRY(Process::paths_for_process(process_name));
if (auto pid = TRY(Core::IPCProcess::get_process_pid(process_name, pid_path)); pid.has_value()) {
if (auto pid = TRY(Process::get_process_pid(process_name, pid_path)); pid.has_value()) {
TRY(connect_as_client(socket_path, raw_urls, new_window));
return ProcessDisposition::ExitProcess;
}
@ -63,7 +63,7 @@ ErrorOr<void> ChromeProcess::connect_as_client(ByteString const& socket_path, Ve
ErrorOr<void> ChromeProcess::connect_as_server(ByteString const& socket_path)
{
auto socket_fd = TRY(Core::IPCProcess::create_ipc_socket(socket_path));
auto socket_fd = TRY(Process::create_ipc_socket(socket_path));
m_socket_path = socket_path;
auto local_server = TRY(Core::LocalServer::try_create());
TRY(local_server->take_over_fd(socket_fd));