mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
LibWeb+LibWebView+WebContent: Add an about:processes page
The intent is that this will replace the separate Task Manager window. This will allow us to more easily add features such as actual process management, better rendering of the process table, etc. Included in this page is the ability to sort table rows. This also lays the ground work for more internal `about` pages, such as about:config.
This commit is contained in:
parent
9dcbf5562a
commit
843209c6a9
Notes:
github-actions[bot]
2025-03-19 14:04:39 +00:00
Author: https://github.com/trflynn89
Commit: 843209c6a9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3967
Reviewed-by: https://github.com/shannonbooth
21 changed files with 322 additions and 3 deletions
|
@ -60,6 +60,7 @@
|
|||
#include <LibWeb/HighResolutionTime/TimeOrigin.h>
|
||||
#include <LibWeb/Infra/CharacterTypes.h>
|
||||
#include <LibWeb/Internals/Internals.h>
|
||||
#include <LibWeb/Internals/Processes.h>
|
||||
#include <LibWeb/Layout/Viewport.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
#include <LibWeb/Painting/PaintableBox.h>
|
||||
|
@ -721,7 +722,7 @@ void Window::set_internals_object_exposed(bool exposed)
|
|||
s_internals_object_exposed = exposed;
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<void> Window::initialize_web_interfaces(Badge<WindowEnvironmentSettingsObject>)
|
||||
WebIDL::ExceptionOr<void> Window::initialize_web_interfaces(Badge<WindowEnvironmentSettingsObject>, URL::URL const& url)
|
||||
{
|
||||
auto& realm = this->realm();
|
||||
add_window_exposed_interfaces(*this);
|
||||
|
@ -734,6 +735,14 @@ WebIDL::ExceptionOr<void> Window::initialize_web_interfaces(Badge<WindowEnvironm
|
|||
if (s_internals_object_exposed)
|
||||
define_direct_property("internals", realm.create<Internals::Internals>(realm), JS::default_attributes);
|
||||
|
||||
if (url.scheme() == "about"sv && url.paths().size() == 1) {
|
||||
auto const& path = url.paths().first();
|
||||
|
||||
if (path == "processes"sv) {
|
||||
define_direct_property("processes", realm.create<Internals::Processes>(realm), JS::default_attributes);
|
||||
}
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue