#include "libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h"
#include "libcef_dll/shutdown_checker.h"
namespace {
void CEF_CALLBACK web_plugin_unstable_callback_is_unstable(
struct _cef_web_plugin_unstable_callback_t* self,
const cef_string_t* path,
int unstable) {
shutdown_checker::AssertNotShutdown();
DCHECK(self);
if (!self)
return;
DCHECK(path);
if (!path)
return;
CefWebPluginUnstableCallbackCppToC::Get(self)->IsUnstable(
CefString(path), unstable ? true : false);
}
}
CefWebPluginUnstableCallbackCppToC::CefWebPluginUnstableCallbackCppToC() {
GetStruct()->is_unstable = web_plugin_unstable_callback_is_unstable;
}
CefWebPluginUnstableCallbackCppToC::~CefWebPluginUnstableCallbackCppToC() {
shutdown_checker::AssertNotShutdown();
}
template <>
CefRefPtr<CefWebPluginUnstableCallback>
CefCppToCRefCounted<CefWebPluginUnstableCallbackCppToC,
CefWebPluginUnstableCallback,
cef_web_plugin_unstable_callback_t>::
UnwrapDerived(CefWrapperType type, cef_web_plugin_unstable_callback_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return nullptr;
}
template <>
CefWrapperType
CefCppToCRefCounted<CefWebPluginUnstableCallbackCppToC,
CefWebPluginUnstableCallback,
cef_web_plugin_unstable_callback_t>::kWrapperType =
WT_WEB_PLUGIN_UNSTABLE_CALLBACK;