Chromium Embedded Framework (CEF)  126.2.0+g5c56e98+chromium-126.0.6478.62
cef_base.h File Reference

Classes

class  CefBaseRefCounted
 All ref-counted framework classes must extend this class. More...
 
class  CefBaseScoped
 All scoped framework classes must extend this class. More...
 
class  CefRefCount
 Class that implements atomic reference counting. More...
 

Macros

#define IMPLEMENT_REFCOUNTING(ClassName)
 Macro that provides a reference counting implementation for classes extending CefBase. More...
 

Macro Definition Documentation

◆ IMPLEMENT_REFCOUNTING

#define IMPLEMENT_REFCOUNTING (   ClassName)
Value:
public: \
void AddRef() const override { \
ref_count_.AddRef(); \
} \
bool Release() const override { \
if (ref_count_.Release()) { \
delete static_cast<const ClassName*>(this); \
return true; \
} \
return false; \
} \
bool HasOneRef() const override { \
return ref_count_.HasOneRef(); \
} \
bool HasAtLeastOneRef() const override { \
return ref_count_.HasAtLeastOneRef(); \
} \
\
private: \
CefRefCount ref_count_

Macro that provides a reference counting implementation for classes extending CefBase.