chromium/content/browser/media/captured_surface_control_permission_manager.cc

// Copyright 2023 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/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;

// Checks whether the app is focused.
// Note that this is different from requiring that the capturer RFH is focused.
// The check here starts at the primary main frame, and then cascades through
// the tree - which is the desired behavior.
bool IsFocused(WebContentsImpl& web_contents) {}

// Translate between callbacks expecting different types.
base::OnceCallback<void(PermissionStatus)> WrapCallback(
    base::OnceCallback<void(PermissionResult)> callback) {}

void CheckPermissionOnUIThread(
    bool sticky_permissions,
    GlobalRenderFrameHostId capturer_rfh_id,
    base::OnceCallback<void(PermissionResult)> callback) {}

}  // namespace

CapturedSurfaceControlPermissionManager::
    CapturedSurfaceControlPermissionManager(
        GlobalRenderFrameHostId capturer_rfh_id)
    :{}

CapturedSurfaceControlPermissionManager::
    ~CapturedSurfaceControlPermissionManager() = default;

void CapturedSurfaceControlPermissionManager::CheckPermission(
    base::OnceCallback<void(PermissionResult)> callback) {}

// static
void CapturedSurfaceControlPermissionManager::OnCheckResultStatic(
    base::WeakPtr<CapturedSurfaceControlPermissionManager> manager,
    base::OnceCallback<void(PermissionResult)> callback,
    PermissionResult result) {}

void CapturedSurfaceControlPermissionManager::OnCheckResult(
    base::OnceCallback<void(PermissionResult)> callback,
    PermissionResult result) {}

}  // namespace content