diff options
Diffstat (limited to 'Libraries/LibWeb')
-rw-r--r-- | Libraries/LibWeb/WebContentClient.cpp | 5 | ||||
-rw-r--r-- | Libraries/LibWeb/WebContentClient.h | 1 | ||||
-rw-r--r-- | Libraries/LibWeb/WebContentView.cpp | 6 | ||||
-rw-r--r-- | Libraries/LibWeb/WebContentView.h | 1 |
4 files changed, 13 insertions, 0 deletions
diff --git a/Libraries/LibWeb/WebContentClient.cpp b/Libraries/LibWeb/WebContentClient.cpp index 0042cc14db..8e5b892e84 100644 --- a/Libraries/LibWeb/WebContentClient.cpp +++ b/Libraries/LibWeb/WebContentClient.cpp @@ -124,3 +124,8 @@ void WebContentClient::handle(const Messages::WebContentClient::DidMiddleClickLi { m_view.notify_server_did_middle_click_link({}, message.url(), message.target(), message.modifiers()); } + +void WebContentClient::handle(const Messages::WebContentClient::DidStartLoading& message) +{ + m_view.notify_server_did_start_loading({}, message.url()); +} diff --git a/Libraries/LibWeb/WebContentClient.h b/Libraries/LibWeb/WebContentClient.h index 638cf22b40..72450ca421 100644 --- a/Libraries/LibWeb/WebContentClient.h +++ b/Libraries/LibWeb/WebContentClient.h @@ -55,6 +55,7 @@ private: virtual void handle(const Messages::WebContentClient::DidUnhoverLink&) override; virtual void handle(const Messages::WebContentClient::DidClickLink&) override; virtual void handle(const Messages::WebContentClient::DidMiddleClickLink&) override; + virtual void handle(const Messages::WebContentClient::DidStartLoading&) override; WebContentView& m_view; }; diff --git a/Libraries/LibWeb/WebContentView.cpp b/Libraries/LibWeb/WebContentView.cpp index f5851e50ac..739372f08a 100644 --- a/Libraries/LibWeb/WebContentView.cpp +++ b/Libraries/LibWeb/WebContentView.cpp @@ -150,6 +150,12 @@ void WebContentView::notify_server_did_middle_click_link(Badge<WebContentClient> on_link_middle_click(url, target, modifiers); } +void WebContentView::notify_server_did_start_loading(Badge<WebContentClient>, const URL& url) +{ + if (on_load_start) + on_load_start(url); +} + void WebContentView::did_scroll() { client().post_message(Messages::WebContentServer::SetViewportRect(visible_content_rect())); diff --git a/Libraries/LibWeb/WebContentView.h b/Libraries/LibWeb/WebContentView.h index a96d5316ce..30d69ccb4e 100644 --- a/Libraries/LibWeb/WebContentView.h +++ b/Libraries/LibWeb/WebContentView.h @@ -54,6 +54,7 @@ public: void notify_server_did_unhover_link(Badge<WebContentClient>); void notify_server_did_click_link(Badge<WebContentClient>, const URL&, const String& target, unsigned modifiers); void notify_server_did_middle_click_link(Badge<WebContentClient>, const URL&, const String& target, unsigned modifiers); + void notify_server_did_start_loading(Badge<WebContentClient>, const URL&); private: WebContentView(); |