Handles inspector protocol requests by delegating to the appropriate inspector component. More...
#include <domain_handler.hpp>
Public Member Functions | |
| DomainHandler ()=default | |
| void | set_root_view (view::View *root) |
| void | set_agent_context_source (InspectorAgentContextSource *source) |
| void | set_capture_source (InspectorCaptureSource *source) |
| void | set_skp_capture_source (SkpCaptureSource *source) |
| void | set_overlay (InspectorOverlay *overlay) |
| Attach the overlay. | |
| void | set_state_inspector (StateInspector *state) |
| void | set_console_capture (ConsoleCapture *console) |
| void | set_runtime_evaluator (RuntimeEvaluator *evaluator) |
| Inject the separately linked arbitrary-execution component. | |
| InspectorMessage | handle_runtime_with_evaluator (const InspectorMessage &request, RuntimeEvaluator *evaluator) |
| Dispatch one Runtime request with a scoped borrowed evaluator. | |
| void | set_runtime_eval_enabled (bool enabled) |
| Opt in to Runtime.evaluate / Runtime.interrupt. | |
| void | set_runtime_eval_denied (std::string reason) |
| Fail-closed runtime-eval state with an exact host-owned diagnostic. | |
| void | set_audio_inspector (AudioInspector *audio) |
| void | set_motion_inspector (MotionInspector *motion) |
| void | set_motion_scrubber (MotionScrubber *scrubber) |
| void | set_trace_inspector (std::shared_ptr< TraceInspector > trace) |
| Wire and retain the Perfetto tracing bridge used by Trace.* dispatch. | |
| void | set_trace_inspector (TraceInspector *trace) |
| Source-compatible dispatch-only wiring. | |
| void | set_render_pass_manager (render::RenderPassManager *rpm) |
| void | set_tweak_store (TweakStore *store) |
| void | set_test_input_source (InspectorTestInputSource *source) |
| InspectorTestInputSource * | test_input_source () const |
| void | release_test_input (TestInputReleaseReason reason) noexcept |
| void | set_dirty_tracker (render::DirtyTracker *dirty) |
| Wire the per-frame dirty tracker so the inspector's Performance tab can toggle DirtyTracker::set_debug_overlay() at runtime. | |
| void | set_config (InspectorConfig config) |
| Replace the runtime config. | |
| const InspectorConfig & | config () const |
| InspectorConfig & | mutable_config () |
| InspectorMessage | handle (const InspectorMessage &request) |
| Handle a protocol request. Returns a response message. | |
Handles inspector protocol requests by delegating to the appropriate inspector component.
All data sources are optional — missing sources return error responses for their domain's methods.
|
default |
|
inline |
| InspectorMessage pulp::inspect::DomainHandler::handle | ( | const InspectorMessage & | request | ) |
Handle a protocol request. Returns a response message.
| InspectorMessage pulp::inspect::DomainHandler::handle_runtime_with_evaluator | ( | const InspectorMessage & | request, |
| RuntimeEvaluator * | evaluator ) |
Dispatch one Runtime request with a scoped borrowed evaluator.
The previous binding is restored on every exit, including exceptions.
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
| void pulp::inspect::DomainHandler::set_config | ( | InspectorConfig | config | ) |
Replace the runtime config.
Mutating accessors below (e.g. Inspector.setEditorUrlTemplate) update this in place. Also pushes the config to the attached overlay (if any) so the J source-jump hotkey and the protocol Inspector.jumpToSource share one template. Defined out-of-line so the header doesn't need the overlay's definition.
|
inline |
|
inline |
Wire the per-frame dirty tracker so the inspector's Performance tab can toggle DirtyTracker::set_debug_overlay() at runtime.
The host installs the tracker once during plugin / app init; if unset, the toggle silently no-ops.
|
inline |
|
inline |
| void pulp::inspect::DomainHandler::set_overlay | ( | InspectorOverlay * | overlay | ) |
Attach the overlay.
Also seeds the overlay's source-jump config with the handler's current config so the J hotkey matches Inspector.jumpToSource. Out-of-line for the same reason as set_config().
|
inline |
|
inline |
|
inline |
Fail-closed runtime-eval state with an exact host-owned diagnostic.
This does not alter the attached JS realm or mask any of its globals.
|
inline |
Opt in to Runtime.evaluate / Runtime.interrupt.
OFF by default: evaluate is arbitrary code execution in the plugin's JS context, and the authenticated inspector transport does not make arbitrary evaluation safe to expose merely because a debug console was wired. A host enables this only for a trusted development session. Runtime.getCapabilities reflects the flag via canEvaluate; read-only surfaces (logs, DOM, state) are unaffected.
|
inline |
Inject the separately linked arbitrary-execution component.
Without it, Runtime status remains available but evaluation reports no engine.
|
inline |
|
inline |
|
inline |
| void pulp::inspect::DomainHandler::set_trace_inspector | ( | std::shared_ptr< TraceInspector > | trace | ) |
Wire and retain the Perfetto tracing bridge used by Trace.* dispatch.
|
inline |
Source-compatible dispatch-only wiring.
|
inline |
|
inline |