#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_PERMISSIONS_PERMISSION_UTILS_H_
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_PERMISSIONS_PERMISSION_UTILS_H_
#include <optional>
#include <string>
#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/mojom/permissions/permission.mojom-forward.h"
#include "third_party/blink/public/mojom/permissions/permission_status.mojom-shared.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy_feature.mojom-forward.h"
namespace blink {
enum class PermissionType { … };
BLINK_COMMON_EXPORT mojom::PermissionStatus ToPermissionStatus(
const std::string& status);
BLINK_COMMON_EXPORT std::string GetPermissionString(PermissionType permission);
BLINK_COMMON_EXPORT const std::vector<PermissionType>& GetAllPermissionTypes();
BLINK_COMMON_EXPORT std::optional<PermissionType>
PermissionDescriptorToPermissionType(
const mojom::PermissionDescriptorPtr& descriptor);
BLINK_COMMON_EXPORT std::optional<PermissionType>
PermissionDescriptorInfoToPermissionType(
mojom::PermissionName name,
bool midi_sysex,
bool camera_ptz,
bool clipboard_will_be_sanitized,
bool clipboard_has_user_gesture,
bool fullscreen_allow_without_user_gesture);
BLINK_COMMON_EXPORT std::optional<mojom::PermissionsPolicyFeature>
PermissionTypeToPermissionsPolicyFeature(PermissionType permission);
}
#endif