chromium/content/browser/xr/service/xr_permission_results.cc

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

#include "content/browser/xr/service/xr_permission_results.h"

#include <optional>

#include "base/containers/contains.h"
#include "device/vr/public/mojom/xr_session.mojom-shared.h"
#include "third_party/blink/public/common/permissions/permission_utils.h"

namespace {

// Helper, creates a map from permission type to its permission status based
// on |permissions| and |permission_statuses|. Those 2 vectors must have equal
// length, and the permission status for permission at `permissions[i]` is
// assumed to be in `permission_statuses[i]`.
base::flat_map<blink::PermissionType, blink::mojom::PermissionStatus>
CreatePermissionTypeToStatusMap(
    const std::vector<blink::PermissionType>& permissions,
    const std::vector<blink::mojom::PermissionStatus>& permission_statuses) {}

}  // namespace

namespace content {

XrPermissionResults::XrPermissionResults(
    const std::vector<blink::PermissionType>& permission_types,
    const std::vector<blink::mojom::PermissionStatus>& permission_statuses)
    :{}

XrPermissionResults::~XrPermissionResults() = default;

bool XrPermissionResults::HasPermissionsFor(
    device::mojom::XRSessionMode mode) const {}

bool XrPermissionResults::HasPermissionsFor(
    device::mojom::XRSessionFeature feature) const {}

bool XrPermissionResults::HasPermissionsFor(
    blink::PermissionType permission_type) const {}

// static
std::optional<blink::PermissionType> XrPermissionResults::GetPermissionFor(
    device::mojom::XRSessionMode mode) {}

// static
std::optional<blink::PermissionType> XrPermissionResults::GetPermissionFor(
    device::mojom::XRSessionFeature feature) {}

}  // namespace content