mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add NUM_VALUES for enums and size for structs (see #3836)
API versioning requires that enumerations end with a count value (`*_NUM_VALUES`) and structs begin with a size value (`size_t size`). Wrapper templates are updated to support structs with different size values indicating different versions. To test: Run `ceftests --gtest_filter=ApiVersionTest.StructVersion*`
This commit is contained in:
@@ -105,9 +105,10 @@ CefString CefMediaSinkImpl::GetName() {
|
||||
|
||||
CefMediaSink::IconType CefMediaSinkImpl::GetIconType() {
|
||||
// Verify that our enum matches Chromium's values.
|
||||
static_assert(static_cast<int>(CEF_MSIT_TOTAL_COUNT) ==
|
||||
static_assert(static_cast<int>(CEF_MSIT_NUM_VALUES) ==
|
||||
static_cast<int>(media_router::SinkIconType::TOTAL_COUNT),
|
||||
"enum mismatch");
|
||||
"Enum values in cef_media_sink_icon_type_t must match "
|
||||
"media_router::SinkIconType");
|
||||
|
||||
return static_cast<CefMediaSink::IconType>(sink_.icon_type());
|
||||
}
|
||||
|
Reference in New Issue
Block a user