#include "libcef_dll/ctocpp/accessibility_handler_ctocpp.h"
#include "libcef_dll/cpptoc/value_cpptoc.h"
#include "libcef_dll/shutdown_checker.h"
NO_SANITIZE("cfi-icall")
void CefAccessibilityHandlerCToCpp::OnAccessibilityTreeChange(
CefRefPtr<CefValue> value) {
shutdown_checker::AssertNotShutdown();
cef_accessibility_handler_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_accessibility_tree_change))
return;
DCHECK(value.get());
if (!value.get())
return;
_struct->on_accessibility_tree_change(_struct, CefValueCppToC::Wrap(value));
}
NO_SANITIZE("cfi-icall")
void CefAccessibilityHandlerCToCpp::OnAccessibilityLocationChange(
CefRefPtr<CefValue> value) {
shutdown_checker::AssertNotShutdown();
cef_accessibility_handler_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_accessibility_location_change))
return;
DCHECK(value.get());
if (!value.get())
return;
_struct->on_accessibility_location_change(_struct,
CefValueCppToC::Wrap(value));
}
CefAccessibilityHandlerCToCpp::CefAccessibilityHandlerCToCpp() {}
CefAccessibilityHandlerCToCpp::~CefAccessibilityHandlerCToCpp() {
shutdown_checker::AssertNotShutdown();
}
template <>
cef_accessibility_handler_t* CefCToCppRefCounted<
CefAccessibilityHandlerCToCpp,
CefAccessibilityHandler,
cef_accessibility_handler_t>::UnwrapDerived(CefWrapperType type,
CefAccessibilityHandler* c) {
NOTREACHED() << "Unexpected class type: " << type;
return nullptr;
}
template <>
CefWrapperType CefCToCppRefCounted<CefAccessibilityHandlerCToCpp,
CefAccessibilityHandler,
cef_accessibility_handler_t>::kWrapperType =
WT_ACCESSIBILITY_HANDLER;