Chromium Embedded Framework (CEF)  145.0.1+g472e75d+chromium-145.0.7632.5
cef_callback_helpers.h File Reference
#include <atomic>
#include <memory>
#include <ostream>
#include <type_traits>
#include <utility>
#include <vector>
#include "include/base/cef_bind.h"
#include "include/base/cef_callback.h"
#include "include/base/cef_logging.h"
#include "include/base/internal/cef_callback_tags.h"

Classes

struct  base::cef_internal::IsBaseCallbackImpl< T >
 
struct  base::cef_internal::IsBaseCallbackImpl< OnceCallback< R(Args...)> >
 
struct  base::cef_internal::IsBaseCallbackImpl< RepeatingCallback< R(Args...)> >
 
class  base::cef_internal::OnceCallbackHolder< Args >
 
class  base::ScopedClosureRunner
 ScopedClosureRunner is akin to std::unique_ptr<> for Closures. More...
 

Namespaces

 base
 
 base::cef_internal
 

Functions

template<typename... Args>
void base::cef_internal::ForwardRepeatingCallbacksImpl (std::vector< RepeatingCallback< void(Args...)>> cbs, Args... args)
 
template<typename... Args>
RepeatingCallback< void(Args...)> base::ForwardRepeatingCallbacks (std::initializer_list< RepeatingCallback< void(Args...)>> &&cbs)
 Wraps the given RepeatingCallbacks and return one RepeatingCallbacks with an identical signature. More...
 
template<typename... Args>
std::pair< OnceCallback< void(Args...)>, OnceCallback< void(Args...)> > base::SplitOnceCallback (OnceCallback< void(Args...)> callback)
 Wraps the given OnceCallback and returns two OnceCallbacks with an identical signature. More...
 
template<typename... Preargs, typename... Args, typename R >
RepeatingCallback< R(Preargs..., Args...)> base::IgnoreArgs (RepeatingCallback< R(Args...)> callback)
 Adapts callback for use in a context which is expecting a callback with additional parameters. More...
 
template<typename... Preargs, typename... Args, typename R >
OnceCallback< R(Preargs..., Args...)> base::IgnoreArgs (OnceCallback< R(Args...)> callback)
 As above, but for OnceCallback. More...
 
constexpr auto base::NullCallback ()
 Returns a placeholder type that will implicitly convert into a null callback, similar to how std::nullopt / std::nullptr work in conjunction with std::optional and various smart pointer types. More...
 
constexpr auto base::DoNothing ()
 Returns a placeholder type that will implicitly convert into a callback that does nothing, similar to how std::nullopt / std::nullptr work in conjunction with std::optional and various smart pointer types. More...
 
template<typename Signature >
constexpr auto base::NullCallbackAs ()
 Similar to the above, but with a type hint. More...
 
template<typename Signature >
constexpr auto base::DoNothingAs ()
 
template<typename... Args>
constexpr auto base::DoNothingWithBoundArgs (Args &&... args)
 Similar to DoNothing above, but with bound arguments. More...
 
template<typename T >
constexpr OnceCallback< T(void)> base::ReturnValueOnce (T value)
 Creates a callback that returns value when invoked. More...
 
template<typename T >
void base::DeletePointer (T *obj)
 Useful for creating a Closure that will delete a pointer when invoked. More...
 
template<typename R , typename... Args>
auto base::CallbackToBlock (base::OnceCallback< R(Args...)> callback)
 Creates an Objective-C block with the same signature as the corresponding callback. More...
 
template<typename R , typename... Args>
auto base::CallbackToBlock (base::RepeatingCallback< R(Args...)> callback)
 

Variables

template<typename T >
concept base::IsBaseCallback
 IsBaseCallback<T> is satisfied if and only if T is an instantiation of base::OnceCallback<Signature> or base::RepeatingCallback<Signature>. More...