Chromium Embedded Framework (CEF)  131.2.1+ge081753+chromium-131.0.6778.13
cef_helpers.h File Reference
#include <cstring>
#include <string>
#include <vector>
#include "include/base/cef_bind.h"
#include "include/base/cef_logging.h"
#include "include/cef_task.h"

Classes

struct  CefDeleteOnThread< thread >
 Use this struct in conjuction with refcounted types to ensure that an object is deleted on the specified thread. More...
 
struct  CefDeleteOnUIThread
 
struct  CefDeleteOnIOThread
 
struct  CefDeleteOnFileBackgroundThread
 
struct  CefDeleteOnFileUserVisibleThread
 
struct  CefDeleteOnFileUserBlockingThread
 
struct  CefDeleteOnRendererThread
 
class  CefScopedArgArray
 Helper class to manage a scoped copy of |argv|. More...
 

Macros

#define CEF_REQUIRE_UI_THREAD()   DCHECK(CefCurrentlyOn(TID_UI));
 
#define CEF_REQUIRE_IO_THREAD()   DCHECK(CefCurrentlyOn(TID_IO));
 
#define CEF_REQUIRE_FILE_BACKGROUND_THREAD()    DCHECK(CefCurrentlyOn(TID_FILE_BACKGROUND));
 
#define CEF_REQUIRE_FILE_USER_VISIBLE_THREAD()    DCHECK(CefCurrentlyOn(TID_FILE_USER_VISIBLE));
 
#define CEF_REQUIRE_FILE_USER_BLOCKING_THREAD()    DCHECK(CefCurrentlyOn(TID_FILE_USER_BLOCKING));
 
#define CEF_REQUIRE_RENDERER_THREAD()   DCHECK(CefCurrentlyOn(TID_RENDERER));
 
#define IMPLEMENT_REFCOUNTING_EX(ClassName, Destructor)
 
#define IMPLEMENT_REFCOUNTING_DELETE_ON_UIT(ClassName)    IMPLEMENT_REFCOUNTING_EX(ClassName, CefDeleteOnUIThread)
 
#define IMPLEMENT_REFCOUNTING_DELETE_ON_IOT(ClassName)    IMPLEMENT_REFCOUNTING_EX(ClassName, CefDeleteOnIOThread)
 

Macro Definition Documentation

◆ CEF_REQUIRE_FILE_BACKGROUND_THREAD

#define CEF_REQUIRE_FILE_BACKGROUND_THREAD ( )     DCHECK(CefCurrentlyOn(TID_FILE_BACKGROUND));

◆ CEF_REQUIRE_FILE_USER_BLOCKING_THREAD

#define CEF_REQUIRE_FILE_USER_BLOCKING_THREAD ( )     DCHECK(CefCurrentlyOn(TID_FILE_USER_BLOCKING));

◆ CEF_REQUIRE_FILE_USER_VISIBLE_THREAD

#define CEF_REQUIRE_FILE_USER_VISIBLE_THREAD ( )     DCHECK(CefCurrentlyOn(TID_FILE_USER_VISIBLE));

◆ CEF_REQUIRE_IO_THREAD

#define CEF_REQUIRE_IO_THREAD ( )    DCHECK(CefCurrentlyOn(TID_IO));

◆ CEF_REQUIRE_RENDERER_THREAD

#define CEF_REQUIRE_RENDERER_THREAD ( )    DCHECK(CefCurrentlyOn(TID_RENDERER));

◆ CEF_REQUIRE_UI_THREAD

#define CEF_REQUIRE_UI_THREAD ( )    DCHECK(CefCurrentlyOn(TID_UI));

◆ IMPLEMENT_REFCOUNTING_DELETE_ON_IOT

#define IMPLEMENT_REFCOUNTING_DELETE_ON_IOT (   ClassName)     IMPLEMENT_REFCOUNTING_EX(ClassName, CefDeleteOnIOThread)

◆ IMPLEMENT_REFCOUNTING_DELETE_ON_UIT

#define IMPLEMENT_REFCOUNTING_DELETE_ON_UIT (   ClassName)     IMPLEMENT_REFCOUNTING_EX(ClassName, CefDeleteOnUIThread)

◆ IMPLEMENT_REFCOUNTING_EX

#define IMPLEMENT_REFCOUNTING_EX (   ClassName,
  Destructor 
)
Value:
public: \
void AddRef() const override { \
ref_count_.AddRef(); \
} \
bool Release() const override { \
if (ref_count_.Release()) { \
Destructor::Destruct(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_