/* * Copyright (c) 2025, Tim Flynn * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include #include namespace WebView { struct WEBVIEW_API AttributeMutation { String attribute_name; Optional new_value; }; struct WEBVIEW_API CharacterDataMutation { String new_value; }; struct WEBVIEW_API ChildListMutation { Vector added; Vector removed; size_t target_child_count { 0 }; }; struct WEBVIEW_API Mutation { using Type = Variant; String type; Web::UniqueNodeID target { 0 }; String serialized_target; Type mutation; }; } namespace IPC { template<> ErrorOr encode(Encoder&, WebView::AttributeMutation const&); template<> ErrorOr decode(Decoder&); template<> ErrorOr encode(Encoder&, WebView::CharacterDataMutation const&); template<> ErrorOr decode(Decoder&); template<> ErrorOr encode(Encoder&, WebView::ChildListMutation const&); template<> ErrorOr decode(Decoder&); template<> WEBVIEW_API ErrorOr encode(Encoder&, WebView::Mutation const&); template<> WEBVIEW_API ErrorOr decode(Decoder&); }