2024-03-05 13:29:14 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2024, Andrew Kaster <akaster@serenityos.org>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/String.h>
|
|
|
|
|
#include <LibIPC/Forward.h>
|
2024-10-04 23:33:34 -03:00
|
|
|
#include <LibURL/Origin.h>
|
2024-03-18 00:22:27 -03:00
|
|
|
#include <LibURL/URL.h>
|
2024-11-25 11:30:12 -03:00
|
|
|
#include <LibWeb/HTML/SerializedPolicyContainer.h>
|
2024-03-05 13:29:14 -03:00
|
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
|
|
|
|
|
enum class CanUseCrossOriginIsolatedAPIs {
|
|
|
|
|
No,
|
|
|
|
|
Yes,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct SerializedEnvironmentSettingsObject {
|
|
|
|
|
String id;
|
2024-03-18 00:22:27 -03:00
|
|
|
URL::URL creation_url;
|
2025-04-21 01:57:31 -03:00
|
|
|
Optional<URL::URL> top_level_creation_url;
|
2025-05-25 01:47:37 -03:00
|
|
|
Optional<URL::Origin> top_level_origin;
|
2024-03-05 13:29:14 -03:00
|
|
|
|
|
|
|
|
String api_url_character_encoding;
|
2024-03-18 00:22:27 -03:00
|
|
|
URL::URL api_base_url;
|
2024-10-04 23:33:34 -03:00
|
|
|
URL::Origin origin;
|
2025-08-07 11:03:05 -03:00
|
|
|
bool has_cross_site_ancestor;
|
2024-11-25 11:30:12 -03:00
|
|
|
SerializedPolicyContainer policy_container;
|
2024-03-05 13:29:14 -03:00
|
|
|
CanUseCrossOriginIsolatedAPIs cross_origin_isolated_capability;
|
2025-01-07 07:08:14 -03:00
|
|
|
double time_origin;
|
2024-03-05 13:29:14 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace IPC {
|
|
|
|
|
|
|
|
|
|
template<>
|
|
|
|
|
ErrorOr<void> encode(Encoder&, Web::HTML::SerializedEnvironmentSettingsObject const&);
|
|
|
|
|
|
|
|
|
|
template<>
|
|
|
|
|
ErrorOr<Web::HTML::SerializedEnvironmentSettingsObject> decode(Decoder&);
|
|
|
|
|
|
|
|
|
|
}
|