Add CefPermissionHandler callback for media access (fixes issue #2582)

This commit is contained in:
Marshall Greenblatt
2022-06-30 07:31:18 +00:00
parent d3a2237a5a
commit 26e30b3859
29 changed files with 1852 additions and 83 deletions

View File

@@ -0,0 +1,33 @@
// Copyright 2022 The Chromium Embedded Framework Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file.
#ifndef CEF_LIBCEF_BROWSER_MEDIA_ACCESS_QUERY_H_
#define CEF_LIBCEF_BROWSER_MEDIA_ACCESS_QUERY_H_
#pragma once
#include "content/public/browser/media_stream_request.h"
namespace content {
class RenderFrameHost;
}
class CefBrowserHostBase;
class GURL;
namespace media_access_query {
// Called from WebContentsDelegate::CheckMediaAccessPermission.
bool CheckMediaAccessPermission(CefBrowserHostBase* browser,
content::RenderFrameHost* render_frame_host,
const GURL& security_origin,
blink::mojom::MediaStreamType type);
// Called from WebContentsDelegate::RequestMediaAccessPermission.
void RequestMediaAccessPermission(CefBrowserHostBase* browser,
const content::MediaStreamRequest& request,
content::MediaResponseCallback callback);
} // namespace media_access_query
#endif // CEF_LIBCEF_BROWSER_MEDIA_ACCESS_QUERY_H_