chromium/components/permissions/permission_request_queue.h

// 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.

#ifndef COMPONENTS_PERMISSIONS_PERMISSION_REQUEST_QUEUE_H_
#define COMPONENTS_PERMISSIONS_PERMISSION_REQUEST_QUEUE_H_

#include <cstddef>
#include <vector>

#include "base/containers/circular_deque.h"
#include "components/permissions/permission_request.h"

namespace permissions {

// Provides a container for holding pending PermissionRequest objects and
// provides access methods respecting the currently applicable feature flag
// configuration.
// The queue of permission requests is always held in the order of:
// High Priority Requests > Normal Priority Requests > Low Priority Requests.
// Using the |PushFront| and |PushBack| functions will push the new request in
// the front or back of the section of the queue that corresponds to that
// request's priority.

// High Priority Requests are requests that come from an Page-Embedded
// Permission Control.
// Low Priority Requests are requests for non-urgent permission types
// (notifications, geolocation) if the current platform supports the permission
// chip. If the permission chip is not supported, there are no low priority
// requests.
// Normal Priority Requests are all other requests.
class PermissionRequestQueue {};

}  // namespace permissions

#endif  // COMPONENTS_PERMISSIONS_PERMISSION_REQUEST_QUEUE_H_