
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
/*
|
|
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/DeprecatedString.h>
|
|
|
|
namespace Web::HTML {
|
|
|
|
// https://html.spec.whatwg.org/multipage/origin.html#cross-origin-opener-policy-value
|
|
enum class CrossOriginOpenerPolicyValue {
|
|
UnsafeNone,
|
|
SameOriginAllowPopups,
|
|
SameOrigin,
|
|
SameOriginPlusCOEP,
|
|
};
|
|
|
|
// https://html.spec.whatwg.org/multipage/origin.html#cross-origin-opener-policy
|
|
struct CrossOriginOpenerPolicy {
|
|
// A value, which is a cross-origin opener policy value, initially "unsafe-none".
|
|
CrossOriginOpenerPolicyValue value { CrossOriginOpenerPolicyValue::UnsafeNone };
|
|
|
|
// A reporting endpoint, which is string or null, initially null.
|
|
Optional<DeprecatedString> reporting_endpoint;
|
|
|
|
// A report-only value, which is a cross-origin opener policy value, initially "unsafe-none".
|
|
CrossOriginOpenerPolicyValue report_only_value { CrossOriginOpenerPolicyValue::UnsafeNone };
|
|
|
|
// A report-only reporting endpoint, which is a string or null, initially null.
|
|
Optional<DeprecatedString> report_only_reporting_endpoint;
|
|
};
|
|
|
|
}
|