mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-23 17:33:12 +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
28
Libraries/LibWebView/WebUI/ProcessesUI.cpp
Normal file
28
Libraries/LibWebView/WebUI/ProcessesUI.cpp
Normal 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());
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue