/* * Copyright (c) 2023, Tim Flynn * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace Web::PermissionsPolicy { class AutoplayAllowlist { public: static AutoplayAllowlist& the(); Decision is_allowed_for_origin(DOM::Document const&, HTML::Origin const&) const; void enable_globally(); ErrorOr enable_for_origins(ReadonlySpan); private: AutoplayAllowlist(); ~AutoplayAllowlist(); using Patterns = Vector; struct Global { }; Optional> m_allowlist; }; }