mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
LibWeb: Provide some properties to inspectors of ResourceLoader
This commit is contained in:
parent
d582c03233
commit
790915da54
Notes:
sideshowbarker
2024-07-19 06:05:21 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/790915da540 Pull-request: https://github.com/SerenityOS/serenity/pull/2398 Reviewed-by: https://github.com/awesomekling
2 changed files with 10 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/Base64.h>
|
||||
#include <AK/JsonObject.h>
|
||||
#include <AK/SharedBuffer.h>
|
||||
#include <LibCore/EventLoop.h>
|
||||
#include <LibCore/File.h>
|
||||
|
@ -157,4 +158,11 @@ bool ResourceLoader::is_port_blocked(int port)
|
|||
return false;
|
||||
}
|
||||
|
||||
void ResourceLoader::save_to(JsonObject& object)
|
||||
{
|
||||
Object::save_to(object);
|
||||
object.set("pending_loads", m_pending_loads);
|
||||
object.set("user_agent", m_user_agent);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -56,6 +56,8 @@ private:
|
|||
ResourceLoader();
|
||||
static bool is_port_blocked(int port);
|
||||
|
||||
virtual void save_to(JsonObject&) override;
|
||||
|
||||
int m_pending_loads { 0 };
|
||||
|
||||
RefPtr<Protocol::Client> m_protocol_client;
|
||||
|
|
Loading…
Add table
Reference in a new issue