blob: 1dd1f823dbb373ea647d60ea03ebd66034e890db [file] [log] [blame]
Avi Drissman8ba1bad2022-09-13 19:22:361// Copyright 2015 The Chromium Authors
mlamouri4e372022015-03-29 14:51:062// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Clark DuVall6b73c742020-03-11 19:00:155#ifndef COMPONENTS_PERMISSIONS_PERMISSION_MANAGER_H_
6#define COMPONENTS_PERMISSIONS_PERMISSION_MANAGER_H_
mlamouri4e372022015-03-29 14:51:067
Lei Zhang998100f2021-06-25 17:58:198#include <map>
raymese3afee6b2016-04-18 02:00:509#include <unordered_map>
10
James Hollyerd281a7312021-04-29 21:07:5911#include "base/containers/flat_map.h"
Brett Wilsonf976d3f2017-08-18 17:23:3912#include "base/containers/id_map.h"
Avi Drissman12be0312023-01-11 09:16:0913#include "base/functional/callback_forward.h"
Keishi Hattori0e45c022021-11-27 09:25:5214#include "base/memory/raw_ptr.h"
mlamouri23957a22015-04-01 10:37:5615#include "components/content_settings/core/browser/content_settings_observer.h"
lalitm27583e92015-10-02 11:34:1716#include "components/content_settings/core/common/content_settings.h"
mlamouri4e372022015-03-29 14:51:0617#include "components/keyed_service/core/keyed_service.h"
James Hollyerd281a7312021-04-29 21:07:5918#include "components/permissions/permission_context_base.h"
Andy Paicu1b5011a2022-09-20 15:44:5819#include "components/permissions/permission_decision_auto_blocker.h"
Balazs Engedye15473b2021-04-14 09:09:2120#include "components/permissions/permission_request_id.h"
Clark DuVall732778e2020-01-27 18:13:5821#include "components/permissions/permission_util.h"
Andrey Lushnikovf3500102018-07-16 19:55:2222#include "content/public/browser/permission_controller_delegate.h"
Illia Klimov15550f752022-08-11 19:33:1023#include "content/public/browser/permission_result.h"
Rohan Pavonefaf64572019-07-30 17:50:2024#include "url/origin.h"
mlamouri4e372022015-03-29 14:51:0625
Illia Klimov2c6138b2023-08-14 09:39:2526using PermissionStatus = blink::mojom::PermissionStatus;
27
Andy Paicua6d6d852022-04-28 18:08:3628namespace blink {
29enum class PermissionType;
30}
31
Clark DuVall6b73c742020-03-11 19:00:1532namespace content {
33class BrowserContext;
Robbie McElrath8d5602a2022-04-01 17:39:1834class RenderFrameHost;
35class RenderProcessHost;
Thomas Nguyen583f07e2023-07-19 17:45:3736class WebContents;
Andy Paicu0a6d4b502023-08-29 15:13:0937struct PermissionRequestDescription;
Clark DuVall6b73c742020-03-11 19:00:1538}
39
Illia Klimov770b145f2022-04-20 17:19:0940class GeolocationPermissionContextDelegateTests;
41class SubscriptionInterceptingPermissionManager;
42
Clark DuVall484c2562020-01-23 22:05:0943namespace permissions {
Clark DuVall