#include "content/browser/media/captured_surface_control_permission_manager.h"
#include "base/command_line.h"
#include "base/functional/callback.h"
#include "base/memory/weak_ptr.h"
#include "base/task/bind_post_task.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/permission_controller.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/common/content_features.h"
#include "media/base/media_switches.h"
#include "third_party/blink/public/common/permissions/permission_utils.h"
#include "third_party/blink/public/mojom/permissions/permission_status.mojom.h"
namespace content {
namespace {
PermissionStatus;
PermissionResult;
bool IsFocused(WebContentsImpl& web_contents) { … }
base::OnceCallback<void(PermissionStatus)> WrapCallback(
base::OnceCallback<void(PermissionResult)> callback) { … }
void CheckPermissionOnUIThread(
bool sticky_permissions,
GlobalRenderFrameHostId capturer_rfh_id,
base::OnceCallback<void(PermissionResult)> callback) { … }
}
CapturedSurfaceControlPermissionManager::
CapturedSurfaceControlPermissionManager(
GlobalRenderFrameHostId capturer_rfh_id)
: … { … }
CapturedSurfaceControlPermissionManager::
~CapturedSurfaceControlPermissionManager() = default;
void CapturedSurfaceControlPermissionManager::CheckPermission(
base::OnceCallback<void(PermissionResult)> callback) { … }
void CapturedSurfaceControlPermissionManager::OnCheckResultStatic(
base::WeakPtr<CapturedSurfaceControlPermissionManager> manager,
base::OnceCallback<void(PermissionResult)> callback,
PermissionResult result) { … }
void CapturedSurfaceControlPermissionManager::OnCheckResult(
base::OnceCallback<void(PermissionResult)> callback,
PermissionResult result) { … }
}