mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-06 10:22:57 +00:00
This is required to store Content Security Policies, as their Directives are implemented as subclasses with overridden virtual functions. Thus, they cannot be stored as generic Directive classes, as it'll lose the ability to call overridden functions when they are copied.
29 lines
548 B
C++
29 lines
548 B
C++
/*
|
|
* Copyright (c) 2025, Luke Wilde <luke@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibWeb/HTML/EmbedderPolicy.h>
|
|
#include <LibWeb/ReferrerPolicy/ReferrerPolicy.h>
|
|
|
|
namespace Web::HTML {
|
|
|
|
struct SerializedPolicyContainer {
|
|
EmbedderPolicy embedder_policy;
|
|
ReferrerPolicy::ReferrerPolicy referrer_policy;
|
|
};
|
|
|
|
}
|
|
|
|
namespace IPC {
|
|
|
|
template<>
|
|
ErrorOr<void> encode(Encoder&, Web::HTML::SerializedPolicyContainer const&);
|
|
|
|
template<>
|
|
ErrorOr<Web::HTML::SerializedPolicyContainer> decode(Decoder&);
|
|
|
|
}
|