#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_TRUSTEDTYPES_TRUSTED_TYPES_UTIL_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_TRUSTEDTYPES_TRUSTED_TYPES_UTIL_H_
#include "third_party/blink/renderer/bindings/core/v8/v8_typedefs.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/script/script_element_base.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
namespace blink {
class ExceptionState;
class ExecutionContext;
class QualifiedName;
class ScriptValue;
class ScriptState;
class V8UnionStringOrTrustedScript;
class V8UnionStringLegacyNullToEmptyStringOrTrustedScript;
enum class SpecificTrustedType { … };
[[nodiscard]] CORE_EXPORT String
TrustedTypesCheckFor(SpecificTrustedType type,
const V8TrustedType* trusted,
const ExecutionContext* execution_context,
ExceptionState& exception_state);
[[nodiscard]] CORE_EXPORT String
TrustedTypesCheckForScript(const V8UnionStringOrTrustedScript* value,
const ExecutionContext* execution_context,
ExceptionState& exception_state);
[[nodiscard]] CORE_EXPORT String TrustedTypesCheckForScript(
const V8UnionStringLegacyNullToEmptyStringOrTrustedScript* value,
const ExecutionContext* execution_context,
ExceptionState& exception_state);
[[nodiscard]] String TrustedTypesCheckFor(SpecificTrustedType,
String,
const ExecutionContext*,
ExceptionState&);
[[nodiscard]] CORE_EXPORT String
TrustedTypesCheckForHTML(const String&,
const ExecutionContext*,
ExceptionState&);
[[nodiscard]] CORE_EXPORT String
TrustedTypesCheckForScript(const String&,
const ExecutionContext*,
ExceptionState&);
[[nodiscard]] CORE_EXPORT String
TrustedTypesCheckForScriptURL(const String&,
const ExecutionContext*,
ExceptionState&);
String TrustedTypesCheckForJavascriptURLinNavigation(const String&,
ExecutionContext*);
CORE_EXPORT String GetStringForScriptExecution(const String&,
ScriptElementBase::Type,
ExecutionContext*);
[[nodiscard]] CORE_EXPORT String
TrustedTypesCheckForExecCommand(const String&,
const ExecutionContext*,
ExceptionState&);
CORE_EXPORT bool RequireTrustedTypesCheck(const ExecutionContext*);
bool IsTrustedTypesEventHandlerAttribute(const QualifiedName&);
String GetTrustedTypesLiteral(const ScriptValue&, ScriptState*);
}
#endif