Add OnMediaAccessChange notification (fixes issue #3310)

This commit is contained in:
Marshall Greenblatt
2022-06-30 12:22:28 +00:00
parent 0c6c44ba0b
commit daa89115d5
14 changed files with 347 additions and 34 deletions

View File

@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=7e03d64dfcefc287c083e35e5ef9b3fa4f762b1b$
// $hash=03ae4ba9762510e2b0c19ea29322c20ebaf2e683$
//
#ifndef CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_
@ -141,8 +141,7 @@ typedef struct _cef_client_t {
struct _cef_client_t* self);
///
// Return the handler for permission requests. If no handler is provided
// requests be denied by default.
// Return the handler for permission requests.
///
struct _cef_permission_handler_t*(CEF_CALLBACK* get_permission_handler)(
struct _cef_client_t* self);

View File

@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=142637539a094a03adc71d2f3f5b711ba64918b1$
// $hash=5e52ae520b7eda3595683d428aa578bbc776956b$
//
#ifndef CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_
@ -154,6 +154,16 @@ typedef struct _cef_display_handler_t {
cef_cursor_handle_t cursor,
cef_cursor_type_t type,
const struct _cef_cursor_info_t* custom_cursor_info);
///
// Called when the browser's access to an audio and/or video source has
// changed.
///
void(CEF_CALLBACK* on_media_access_change)(
struct _cef_display_handler_t* self,
struct _cef_browser_t* browser,
int has_video_access,
int has_audio_access);
} cef_display_handler_t;
#ifdef __cplusplus

View File

@ -42,13 +42,13 @@
// way that may cause binary incompatibility with other builds. The universal
// hash value will change if any platform is affected whereas the platform hash
// values will change only if that particular platform is affected.
#define CEF_API_HASH_UNIVERSAL "f0b6806a3e15f849013e58992ef11c99e5cfeb60"
#define CEF_API_HASH_UNIVERSAL "794a4cf2ad83db17558bd2ca2d721487875a37e8"
#if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "55ba6603a77fcbf93d58a44fbeae9ea52d000153"
#define CEF_API_HASH_PLATFORM "aa627f71c1cbdf13beeb3fe740337f4cc1cb5dc5"
#elif defined(OS_MAC)
#define CEF_API_HASH_PLATFORM "4028739577ee54f7049f354acd724ecee071aa22"
#define CEF_API_HASH_PLATFORM "6bda80f2ee107a22780193a7af9101eb5a4db8a0"
#elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "7464b32d2ed43a15d68a651199fda0c0fe040a8d"
#define CEF_API_HASH_PLATFORM "c83b942ce72835d0ea01bfc4cab3928b92abdb85"
#endif
#ifdef __cplusplus

View File

@ -148,6 +148,15 @@ class CefDisplayHandler : public virtual CefBaseRefCounted {
const CefCursorInfo& custom_cursor_info) {
return false;
}
///
// Called when the browser's access to an audio and/or video source has
// changed.
///
/*--cef()--*/
virtual void OnMediaAccessChange(CefRefPtr<CefBrowser> browser,
bool has_video_access,
bool has_audio_access) {}
};
#endif // CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_