#include "libcef_dll/ctocpp/views/box_layout_ctocpp.h"
#include "libcef_dll/ctocpp/views/fill_layout_ctocpp.h"
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
#include "libcef_dll/shutdown_checker.h"
NO_SANITIZE("cfi-icall")
void CefBoxLayoutCToCpp::SetFlexForView(CefRefPtr<CefView> view, int flex) {
shutdown_checker::AssertNotShutdown();
cef_box_layout_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_flex_for_view))
return;
DCHECK(view.get());
if (!view.get())
return;
_struct->set_flex_for_view(_struct, CefViewCToCpp::Unwrap(view), flex);
}
NO_SANITIZE("cfi-icall")
void CefBoxLayoutCToCpp::ClearFlexForView(CefRefPtr<CefView> view) {
shutdown_checker::AssertNotShutdown();
cef_box_layout_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, clear_flex_for_view))
return;
DCHECK(view.get());
if (!view.get())
return;
_struct->clear_flex_for_view(_struct, CefViewCToCpp::Unwrap(view));
}
NO_SANITIZE("cfi-icall")
CefRefPtr<CefBoxLayout> CefBoxLayoutCToCpp::AsBoxLayout() {
shutdown_checker::AssertNotShutdown();
cef_layout_t* _struct = reinterpret_cast<cef_layout_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, as_box_layout))
return nullptr;
cef_box_layout_t* _retval = _struct->as_box_layout(_struct);
return CefBoxLayoutCToCpp::Wrap(_retval);
}
NO_SANITIZE("cfi-icall")
CefRefPtr<CefFillLayout> CefBoxLayoutCToCpp::AsFillLayout() {
shutdown_checker::AssertNotShutdown();
cef_layout_t* _struct = reinterpret_cast<cef_layout_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, as_fill_layout))
return nullptr;
cef_fill_layout_t* _retval = _struct->as_fill_layout(_struct);
return CefFillLayoutCToCpp::Wrap(_retval);
}
NO_SANITIZE("cfi-icall") bool CefBoxLayoutCToCpp::IsValid() {
shutdown_checker::AssertNotShutdown();
cef_layout_t* _struct = reinterpret_cast<cef_layout_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, is_valid))
return false;
int _retval = _struct->is_valid(_struct);
return _retval ? true : false;
}
CefBoxLayoutCToCpp::CefBoxLayoutCToCpp() {}
CefBoxLayoutCToCpp::~CefBoxLayoutCToCpp() {
shutdown_checker::AssertNotShutdown();
}
template <>
cef_box_layout_t*
CefCToCppRefCounted<CefBoxLayoutCToCpp, CefBoxLayout, cef_box_layout_t>::
UnwrapDerived(CefWrapperType type, CefBoxLayout* c) {
NOTREACHED() << "Unexpected class type: " << type;
return nullptr;
}
template <>
CefWrapperType CefCToCppRefCounted<CefBoxLayoutCToCpp,
CefBoxLayout,
cef_box_layout_t>::kWrapperType =
WT_BOX_LAYOUT;