summaryrefslogtreecommitdiff
path: root/Userland/Services/WebContent
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2021-03-26 10:41:25 -0400
committerAndreas Kling <kling@serenityos.org>2021-03-26 16:55:51 +0100
commit557927f25b9d0b9b3f5e4596b4640524050b9ca7 (patch)
treeb8f55f8196dd3a8bbad5cc189aff17361e5a7cb1 /Userland/Services/WebContent
parentff0d4c6f7c5ab4f9adbf5ba1c8f0ba24221b5b62 (diff)
downloadserenity-557927f25b9d0b9b3f5e4596b4640524050b9ca7.zip
LibWeb+WebContent: Support displaying favicons in OOPWV
In single process mode, the browser will display a page's favicon in both the location bar and tab. This adds the same support for multi- process mode.
Diffstat (limited to 'Userland/Services/WebContent')
-rw-r--r--Userland/Services/WebContent/PageHost.cpp5
-rw-r--r--Userland/Services/WebContent/PageHost.h1
-rw-r--r--Userland/Services/WebContent/WebContentClient.ipc1
3 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Services/WebContent/PageHost.cpp b/Userland/Services/WebContent/PageHost.cpp
index 46a9c0c09e..97aa69ff03 100644
--- a/Userland/Services/WebContent/PageHost.cpp
+++ b/Userland/Services/WebContent/PageHost.cpp
@@ -188,4 +188,9 @@ String PageHost::page_did_request_prompt(const String& message, const String& de
return m_client.send_sync<Messages::WebContentClient::DidRequestPrompt>(message, default_)->response();
}
+void PageHost::page_did_change_favicon(const Gfx::Bitmap& favicon)
+{
+ m_client.post_message(Messages::WebContentClient::DidChangeFavicon(favicon.to_shareable_bitmap()));
+}
+
}
diff --git a/Userland/Services/WebContent/PageHost.h b/Userland/Services/WebContent/PageHost.h
index 066dd69481..0bbb20fe3e 100644
--- a/Userland/Services/WebContent/PageHost.h
+++ b/Userland/Services/WebContent/PageHost.h
@@ -72,6 +72,7 @@ private:
virtual void page_did_request_alert(const String&) override;
virtual bool page_did_request_confirm(const String&) override;
virtual String page_did_request_prompt(const String&, const String&) override;
+ virtual void page_did_change_favicon(const Gfx::Bitmap&) override;
explicit PageHost(ClientConnection&);
diff --git a/Userland/Services/WebContent/WebContentClient.ipc b/Userland/Services/WebContent/WebContentClient.ipc
index 6d1b7ebd3a..6e96fa94ba 100644
--- a/Userland/Services/WebContent/WebContentClient.ipc
+++ b/Userland/Services/WebContent/WebContentClient.ipc
@@ -21,4 +21,5 @@ endpoint WebContentClient = 90
DidRequestPrompt(String message, String default_) => (String response)
DidGetSource(URL url, String source) =|
DidJSConsoleOutput(String method, String line) =|
+ DidChangeFavicon(Gfx::ShareableBitmap favicon) =|
}