diff options
author | Andreas Kling <kling@serenityos.org> | 2020-07-05 16:59:20 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-05 16:59:20 +0200 |
commit | 58b1ba2545a46b5f672ad370c88eddddf1accfc0 (patch) | |
tree | 5915a7dcf506308a7b0096fc8e32d6eaba2c1d6f /Services | |
parent | aac362b8839e3bfac1d620ff0f4e64a8e52a8251 (diff) | |
download | serenity-58b1ba2545a46b5f672ad370c88eddddf1accfc0.zip |
WebContent: Plumb hovered links from WebContent process over to widget
Also add a little GUI::StatusBar to the demo app so we can see the
hovered link URL's live. :^)
Diffstat (limited to 'Services')
-rw-r--r-- | Services/WebContent/PageHost.cpp | 10 | ||||
-rw-r--r-- | Services/WebContent/PageHost.h | 2 | ||||
-rw-r--r-- | Services/WebContent/WebContentClient.ipc | 2 |
3 files changed, 14 insertions, 0 deletions
diff --git a/Services/WebContent/PageHost.cpp b/Services/WebContent/PageHost.cpp index d72a4bc945..7f35aea60d 100644 --- a/Services/WebContent/PageHost.cpp +++ b/Services/WebContent/PageHost.cpp @@ -134,4 +134,14 @@ void PageHost::page_did_request_scroll_into_view(const Gfx::IntRect& rect) m_client.post_message(Messages::WebContentClient::DidRequestScrollIntoView(rect)); } +void PageHost::page_did_hover_link(const URL& url) +{ + m_client.post_message(Messages::WebContentClient::DidHoverLink(url)); +} + +void PageHost::page_did_unhover_link() +{ + m_client.post_message(Messages::WebContentClient::DidUnhoverLink()); +} + } diff --git a/Services/WebContent/PageHost.h b/Services/WebContent/PageHost.h index 14b2e41b2f..eef6d5918e 100644 --- a/Services/WebContent/PageHost.h +++ b/Services/WebContent/PageHost.h @@ -56,6 +56,8 @@ private: virtual void page_did_layout() override; virtual void page_did_change_title(const String&) override; virtual void page_did_request_scroll_into_view(const Gfx::IntRect&) override; + virtual void page_did_hover_link(const URL&) override; + virtual void page_did_unhover_link() override; explicit PageHost(ClientConnection&); diff --git a/Services/WebContent/WebContentClient.ipc b/Services/WebContent/WebContentClient.ipc index 8ea47bf9f0..906978a6f4 100644 --- a/Services/WebContent/WebContentClient.ipc +++ b/Services/WebContent/WebContentClient.ipc @@ -7,4 +7,6 @@ endpoint WebContentClient = 90 DidLayout(Gfx::IntSize content_size) =| DidChangeTitle(String title) =| DidRequestScrollIntoView(Gfx::IntRect rect) =| + DidHoverLink(URL url) =| + DidUnhoverLink() =| } |