Add CefMediaSink::GetIconType (see issue #2900)

This attribute is useful for identifying different classes of cast devices
without first requiring a connection (CAST, CAST_AUDIO, CAST_AUDIO_GROUP, etc).
This commit is contained in:
Marshall Greenblatt
2020-04-29 15:01:09 -04:00
parent dafce45e49
commit ff0c36b465
11 changed files with 126 additions and 16 deletions

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=bb39ec5e546482b707c1e01a83fc1b064d96a4e6$
// $hash=63071af2d949b451ad0e7273ca0f5d7bfec425db$
//
#include "libcef_dll/ctocpp/media_sink_ctocpp.h"
@@ -88,6 +88,23 @@ NO_SANITIZE("cfi-icall") CefString CefMediaSinkCToCpp::GetDescription() {
return _retvalStr;
}
NO_SANITIZE("cfi-icall")
CefMediaSink::IconType CefMediaSinkCToCpp::GetIconType() {
shutdown_checker::AssertNotShutdown();
cef_media_sink_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_icon_type))
return CEF_MSIT_GENERIC;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_media_sink_icon_type_t _retval = _struct->get_icon_type(_struct);
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall") bool CefMediaSinkCToCpp::IsCastSink() {
shutdown_checker::AssertNotShutdown();

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=d69c0bdadc802bc7cb970c316f3a0ed8529c5f9c$
// $hash=c57a82e66fdcd26f70a69fbd92554ca8aa38495c$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_MEDIA_SINK_CTOCPP_H_
@@ -38,6 +38,7 @@ class CefMediaSinkCToCpp : public CefCToCppRefCounted<CefMediaSinkCToCpp,
bool IsValid() OVERRIDE;
CefString GetName() OVERRIDE;
CefString GetDescription() OVERRIDE;
IconType GetIconType() OVERRIDE;
bool IsCastSink() OVERRIDE;
bool IsDialSink() OVERRIDE;
bool IsCompatibleWith(CefRefPtr<CefMediaSource> source) OVERRIDE;