mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-22 23:55:12 +00:00
Inspector: Make properties editable :^)
This patch makes it possible to live-edit remote object properties by simply double clicking on them in the property table view. This is pretty neat! :^)
This commit is contained in:
@@ -31,11 +31,19 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
RemoteProcess* s_the;
|
||||
|
||||
RemoteProcess& RemoteProcess::the()
|
||||
{
|
||||
return *s_the;
|
||||
}
|
||||
|
||||
RemoteProcess::RemoteProcess(pid_t pid)
|
||||
: m_pid(pid)
|
||||
, m_object_graph_model(RemoteObjectGraphModel::create(*this))
|
||||
, m_socket(Core::LocalSocket::construct())
|
||||
{
|
||||
s_the = this;
|
||||
}
|
||||
|
||||
void RemoteProcess::handle_identify_response(const JsonObject& response)
|
||||
@@ -104,6 +112,16 @@ void RemoteProcess::set_inspected_object(uintptr_t address)
|
||||
send_request(request);
|
||||
}
|
||||
|
||||
void RemoteProcess::set_property(uintptr_t object, const StringView& name, const JsonValue& value)
|
||||
{
|
||||
JsonObject request;
|
||||
request.set("type", "SetProperty");
|
||||
request.set("address", object);
|
||||
request.set("name", JsonValue(name));
|
||||
request.set("value", value);
|
||||
send_request(request);
|
||||
}
|
||||
|
||||
void RemoteProcess::update()
|
||||
{
|
||||
m_socket->on_connected = [this] {
|
||||
|
||||
Reference in New Issue
Block a user