1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:07:36 +00:00

LibWeb: Support window.alert() in multi-process context

Alerts are now delegated to the embedding GUI process.
This commit is contained in:
Andreas Kling 2020-09-12 11:56:13 +02:00
parent aba793fb3e
commit d9e39cb82d
11 changed files with 33 additions and 2 deletions

View file

@ -169,4 +169,9 @@ void PageHost::page_did_request_link_context_menu(const Gfx::IntPoint& content_p
m_client.post_message(Messages::WebContentClient::DidRequestLinkContextMenu(content_position, url, target, modifiers));
}
void PageHost::page_did_request_alert(const String& message)
{
m_client.send_sync<Messages::WebContentClient::DidRequestAlert>(message);
}
}

View file

@ -63,6 +63,7 @@ private:
virtual void page_did_request_context_menu(const Gfx::IntPoint&) override;
virtual void page_did_request_link_context_menu(const Gfx::IntPoint&, const URL&, const String& target, unsigned modifiers) override;
virtual void page_did_start_loading(const URL&) override;
virtual void page_did_request_alert(const String&) override;
explicit PageHost(ClientConnection&);

View file

@ -14,4 +14,5 @@ endpoint WebContentClient = 90
DidStartLoading(URL url) =|
DidRequestContextMenu(Gfx::IntPoint content_position) =|
DidRequestLinkContextMenu(Gfx::IntPoint content_position, URL url, String target, unsigned modifiers) =|
DidRequestAlert(String message) => ()
}