mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibDevTools: Implement enough of the protocol to see a tab list
Previously, we could connect to our DevTools server from Firefox, but could not see any information on Ladybird's opened tabs. This implements enough of the protocol to see a tab list, but we cannot yet inspect the tabs.
This commit is contained in:
parent
58bc44ba2a
commit
b974e91731
Notes:
github-actions[bot]
2025-02-19 13:47:18 +00:00
Author: https://github.com/trflynn89
Commit: b974e91731
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3589
Reviewed-by: https://github.com/ADKaster
9 changed files with 168 additions and 2 deletions
|
@ -13,6 +13,7 @@
|
|||
#include <LibDevTools/Actors/DeviceActor.h>
|
||||
#include <LibDevTools/Actors/PreferenceActor.h>
|
||||
#include <LibDevTools/Actors/ProcessActor.h>
|
||||
#include <LibDevTools/Actors/TabActor.h>
|
||||
#include <LibDevTools/Connection.h>
|
||||
#include <LibDevTools/DevToolsServer.h>
|
||||
|
||||
|
@ -43,6 +44,18 @@ DevToolsServer::DevToolsServer(DevToolsDelegate& delegate, NonnullRefPtr<Core::T
|
|||
|
||||
DevToolsServer::~DevToolsServer() = default;
|
||||
|
||||
void DevToolsServer::refresh_tab_list()
|
||||
{
|
||||
if (!m_root_actor)
|
||||
return;
|
||||
|
||||
m_actor_registry.remove_all_matching([](auto const&, auto const& actor) {
|
||||
return is<TabActor>(*actor);
|
||||
});
|
||||
|
||||
m_root_actor->send_tab_list_changed_message();
|
||||
}
|
||||
|
||||
ErrorOr<void> DevToolsServer::on_new_client()
|
||||
{
|
||||
if (m_connection)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue