Truly independent web browser
// Copyright (c) 2026-present, the Ladybird developers.
// NB: The IPC compiler cannot check that each struct here lists every field of its C++ type. A field left out
// here does not cross IPC.
#include <LibWebCommon/WebDriver/BiDi.h>
[ExistingCpp]
struct Web::WebDriver::Network::UrlPattern {
Optional<String> protocol;
Optional<String> hostname;
Optional<String> port;
Optional<String> pathname;
Optional<String> search;
}
[ExistingCpp]
struct Web::WebDriver::Network::Intercept {
String id;
Vector<Web::WebDriver::Network::UrlPattern> url_patterns;
Vector<String> phases;
Optional<Vector<String>> browsing_contexts;
}
[ExistingCpp]
struct Web::WebDriver::BiDiPreloadScript {
String id;
String function_declaration;
JsonValue arguments;
Optional<Vector<String>> contexts;
Optional<String> sandbox;
Vector<String> user_contexts;
}
[ExistingCpp]
struct Web::WebDriver::BiDiSessionState {
bool is_active;
Vector<String> enabled_events;
HashMap<String, Optional<Vector<String>>> enabled_event_contexts;
Vector<Web::WebDriver::BiDiPreloadScript> preload_scripts;
Vector<Web::WebDriver::Network::Intercept> network_intercepts;
Vector<HTTP::Header> network_default_headers;
HashMap<String, Vector<HTTP::Header>> network_user_context_headers;
HashMap<String, Vector<HTTP::Header>> network_navigable_headers;
String network_default_cache_behavior;
HashMap<String, String> network_navigable_cache_behavior;
}