mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-17 07:41:54 +00:00
LibWeb+LibWebView+WebContent: Convert about:processes to a WebUI
This commit is contained in:
parent
41aeb9e63a
commit
c75e40180c
Notes:
github-actions[bot]
2025-03-28 11:32:11 +00:00
Author: https://github.com/trflynn89
Commit: c75e40180c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4068
22 changed files with 96 additions and 140 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <LibCore/System.h>
|
||||
#include <LibWebView/WebContentClient.h>
|
||||
#include <LibWebView/WebUI.h>
|
||||
#include <LibWebView/WebUI/ProcessesUI.h>
|
||||
|
||||
namespace WebView {
|
||||
|
||||
|
@ -31,10 +32,13 @@ static ErrorOr<NonnullRefPtr<WebUIType>> create_web_ui(WebContentClient& client,
|
|||
return web_ui;
|
||||
}
|
||||
|
||||
ErrorOr<RefPtr<WebUI>> WebUI::create(WebContentClient&, String)
|
||||
ErrorOr<RefPtr<WebUI>> WebUI::create(WebContentClient& client, String host)
|
||||
{
|
||||
RefPtr<WebUI> web_ui;
|
||||
|
||||
if (host == "processes"sv)
|
||||
web_ui = TRY(create_web_ui<ProcessesUI>(client, move(host)));
|
||||
|
||||
if (web_ui)
|
||||
web_ui->register_interfaces();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue