mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:37:34 +00:00
LibWeb: Make context menus work in WebContentView
As usual, this was just a matter of plumbing the PageClient calls from the WebContent side over to the WebContentView side. :^)
This commit is contained in:
parent
81ea9d1ef6
commit
92374fc942
7 changed files with 40 additions and 0 deletions
|
@ -159,4 +159,14 @@ void PageHost::page_did_start_loading(const URL& url)
|
|||
m_client.post_message(Messages::WebContentClient::DidStartLoading(url));
|
||||
}
|
||||
|
||||
void PageHost::page_did_request_context_menu(const Gfx::IntPoint& content_position)
|
||||
{
|
||||
m_client.post_message(Messages::WebContentClient::DidRequestContextMenu(content_position));
|
||||
}
|
||||
|
||||
void PageHost::page_did_request_link_context_menu(const Gfx::IntPoint& content_position, const URL& url, const String& target, unsigned modifiers)
|
||||
{
|
||||
m_client.post_message(Messages::WebContentClient::DidRequestLinkContextMenu(content_position, url, target, modifiers));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -60,6 +60,8 @@ private:
|
|||
virtual void page_did_unhover_link() override;
|
||||
virtual void page_did_click_link(const URL&, const String& target, unsigned modifiers) override;
|
||||
virtual void page_did_middle_click_link(const URL&, const String& target, unsigned modifiers) override;
|
||||
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;
|
||||
|
||||
explicit PageHost(ClientConnection&);
|
||||
|
|
|
@ -12,4 +12,6 @@ endpoint WebContentClient = 90
|
|||
DidClickLink(URL url, String target, unsigned modifiers) =|
|
||||
DidMiddleClickLink(URL url, String target, unsigned modifiers) =|
|
||||
DidStartLoading(URL url) =|
|
||||
DidRequestContextMenu(Gfx::IntPoint content_position) =|
|
||||
DidRequestLinkContextMenu(Gfx::IntPoint content_position, URL url, String target, unsigned modifiers) =|
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue