#include "third_party/blink/renderer/core/execution_context/security_context_init.h"
#include <optional>
#include "base/metrics/histogram_macros.h"
#include "services/network/public/cpp/web_sandbox_flags.h"
#include "third_party/blink/public/common/frame/fenced_frame_permissions_policies.h"
#include "third_party/blink/public/common/permissions_policy/permissions_policy.h"
#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/execution_context/agent.h"
#include "third_party/blink/renderer/core/frame/csp/content_security_policy.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_client.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/inspector/console_message.h"
#include "third_party/blink/renderer/core/loader/document_loader.h"
#include "third_party/blink/renderer/core/origin_trials/origin_trial_context.h"
#include "third_party/blink/renderer/core/page/chrome_client.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/permissions_policy/document_policy_parser.h"
#include "third_party/blink/renderer/core/permissions_policy/permissions_policy_parser.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
namespace blink {
namespace {
DocumentPolicy::ParsedDocumentPolicy FilterByOriginTrial(
const DocumentPolicy::ParsedDocumentPolicy& parsed_policy,
ExecutionContext* context) { … }
}
SecurityContextInit::SecurityContextInit(ExecutionContext* context)
: … { … }
void SecurityContextInit::ApplyDocumentPolicy(
DocumentPolicy::ParsedDocumentPolicy& document_policy,
const String& report_only_document_policy_header) { … }
void SecurityContextInit::ApplyPermissionsPolicy(
LocalFrame& frame,
const ResourceResponse& response,
const FramePolicy& frame_policy,
const std::optional<ParsedPermissionsPolicy>& isolated_app_policy,
const base::optional_ref<const FencedFrame::RedactedFencedFrameProperties>
fenced_frame_properties) { … }
void SecurityContextInit::InitPermissionsPolicyFrom(
const SecurityContext& other) { … }
void SecurityContextInit::InitDocumentPolicyFrom(const SecurityContext& other) { … }
}