chromium/third_party/blink/renderer/core/permissions_policy/permissions_policy_devtools_support.h

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PERMISSIONS_POLICY_PERMISSIONS_POLICY_DEVTOOLS_SUPPORT_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_PERMISSIONS_POLICY_PERMISSIONS_POLICY_DEVTOOLS_SUPPORT_H_

#include <optional>

#include "third_party/blink/public/mojom/permissions_policy/permissions_policy_feature.mojom-forward.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"

namespace blink {
class Frame;

// The reason for a feature to be disallowed.
enum class PermissionsPolicyBlockReason {};

struct PermissionsPolicyBlockLocator {};

// Traces the root reason for a feature to be disabled in a frame.
// Returns std::nullopt when the feature is enabled in the frame.
CORE_EXPORT std::optional<PermissionsPolicyBlockLocator>
TracePermissionsPolicyBlockSource(Frame*, mojom::PermissionsPolicyFeature);

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_PERMISSIONS_POLICY_PERMISSIONS_POLICY_DEVTOOLS_SUPPORT_H_