LibWeb+LibWebView+WebContent: Convert about:processes to a WebUI

This commit is contained in:
Timothy Flynn 2025-03-24 09:50:12 -04:00 committed by Tim Flynn
parent 41aeb9e63a
commit c75e40180c
Notes: github-actions[bot] 2025-03-28 11:32:11 +00:00
22 changed files with 96 additions and 140 deletions

View file

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