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

@ -0,0 +1,28 @@
/*
* Copyright (c) 2025, Tim Flynn <trflynn89@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWebView/Application.h>
#include <LibWebView/ProcessManager.h>
#include <LibWebView/WebUI/ProcessesUI.h>
namespace WebView {
void ProcessesUI::register_interfaces()
{
register_interface("updateProcessStatistics"sv, [this](auto const&) {
update_process_statistics();
});
}
void ProcessesUI::update_process_statistics()
{
auto& process_manager = Application::process_manager();
process_manager.update_all_process_statistics();
async_send_message("loadProcessStatistics"sv, process_manager.serialize_json());
}
}