1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 10:47:34 +00:00

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.
This commit is contained in:
Timothy Flynn 2021-03-26 10:41:25 -04:00 committed by Andreas Kling
parent ff0d4c6f7c
commit 557927f25b
7 changed files with 24 additions and 0 deletions

View file

@ -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()));
}
}

View file

@ -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&);

View file

@ -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) =|
}