mirror of
https://github.com/zebrajr/ladybird.git
synced 2026-01-15 12:15:15 +00:00
LibWebView: Port to Windows
This commit is contained in:
@@ -40,15 +40,15 @@ ErrorOr<BrowserProcess::ProcessDisposition> BrowserProcess::connect(Vector<ByteS
|
||||
|
||||
m_pid_path = pid_path;
|
||||
m_pid_file = TRY(Core::File::open(pid_path, Core::File::OpenMode::Write));
|
||||
TRY(m_pid_file->write_until_depleted(ByteString::number(::getpid())));
|
||||
TRY(m_pid_file->write_until_depleted(ByteString::number(Core::System::getpid())));
|
||||
|
||||
return ProcessDisposition::ContinueMainProcess;
|
||||
}
|
||||
|
||||
ErrorOr<void> BrowserProcess::connect_as_client(ByteString const& socket_path, Vector<ByteString> const& raw_urls, NewWindow new_window)
|
||||
{
|
||||
// TODO: Mach IPC
|
||||
auto socket = TRY(Core::LocalSocket::connect(socket_path));
|
||||
static_assert(IsSame<IPC::Transport, IPC::TransportSocket>, "Need to handle other IPC transports here");
|
||||
auto client = UIProcessClient::construct(IPC::Transport(move(socket)));
|
||||
|
||||
if (new_window == NewWindow::Yes) {
|
||||
@@ -64,8 +64,7 @@ ErrorOr<void> BrowserProcess::connect_as_client(ByteString const& socket_path, V
|
||||
|
||||
ErrorOr<void> BrowserProcess::connect_as_server(ByteString const& socket_path)
|
||||
{
|
||||
static_assert(IsSame<IPC::Transport, IPC::TransportSocket>, "Need to handle other IPC transports here");
|
||||
|
||||
// TODO: Mach IPC
|
||||
auto socket_fd = TRY(Process::create_ipc_socket(socket_path));
|
||||
m_socket_path = socket_path;
|
||||
auto local_server = TRY(Core::LocalServer::try_create());
|
||||
|
||||
Reference in New Issue
Block a user