#include "chrome/browser/ui/exclusive_access/exclusive_access_permission_manager.h"
#include "base/time/time.h"
#include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/global_routing_id.h"
#include "content/public/browser/media_session.h"
#include "content/public/browser/permission_controller.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "third_party/blink/public/common/permissions/permission_utils.h"
#include "third_party/blink/public/mojom/permissions/permission_status.mojom.h"
namespace {
constexpr int kRequestDelayMs = …;
}
ExclusiveAccessPermissionManager::ExclusiveAccessPermissionManager(
ExclusiveAccessContext* exclusive_access_context)
: … { … }
ExclusiveAccessPermissionManager::~ExclusiveAccessPermissionManager() = default;
void ExclusiveAccessPermissionManager::QueuePermissionRequest(
blink::PermissionType permission_type,
base::OnceClosure granted_callback,
base::OnceClosure denied_callback,
content::WebContents* web_contents) { … }
ExclusiveAccessPermissionManager::PermissionRequest::PermissionRequest(
blink::PermissionType type,
base::OnceClosure granted_callback,
base::OnceClosure denied_callback)
: … { … }
ExclusiveAccessPermissionManager::PermissionRequest::PermissionRequest(
PermissionRequest&& other)
: … { … }
ExclusiveAccessPermissionManager::PermissionRequest::~PermissionRequest() =
default;
ExclusiveAccessPermissionManager::PendingRequests::PendingRequests() = default;
ExclusiveAccessPermissionManager::PendingRequests::~PendingRequests() = default;
void ExclusiveAccessPermissionManager::RequestPermissions(
content::GlobalRenderFrameHostId rfh_id,
base::WeakPtr<content::WebContents> web_contents) { … }
void ExclusiveAccessPermissionManager::HandleRequestResult(
content::GlobalRenderFrameHostId rfh_id,
base::WeakPtr<content::WebContents> web_contents,
base::OnceClosure granted_callback,
base::OnceClosure denied_callback,
const std::vector<blink::mojom::PermissionStatus>& status) { … }
content::PermissionController*
ExclusiveAccessPermissionManager::GetPermissionController(
content::WebContents* web_contents) { … }