Chromium Embedded Framework (CEF)  122.1.5+gf09a9bc+chromium-122.0.6261.29
base::ScopedClosureRunner Class Reference

ScopedClosureRunner is akin to std::unique_ptr<> for Closures. More...

#include "include/base/cef_callback_helpers.h"

Public Member Functions

 ScopedClosureRunner ()
 
 ScopedClosureRunner (OnceClosure closure)
 
 ScopedClosureRunner (ScopedClosureRunner &&other)
 
ScopedClosureRunneroperator= (ScopedClosureRunner &&other)
 
 ~ScopedClosureRunner ()
 
 operator bool () const
 
void RunAndReset ()
 
void ReplaceClosure (OnceClosure closure)
 
OnceClosure Release ()
 

Detailed Description

ScopedClosureRunner is akin to std::unique_ptr<> for Closures.

It ensures that the Closure is executed no matter how the current scope exits. If you are looking for "ScopedCallback", "CallbackRunner", or "CallbackScoper" this is the class you want.

Constructor & Destructor Documentation

◆ ScopedClosureRunner() [1/3]

base::ScopedClosureRunner::ScopedClosureRunner ( )

◆ ScopedClosureRunner() [2/3]

base::ScopedClosureRunner::ScopedClosureRunner ( OnceClosure  closure)
explicit

◆ ScopedClosureRunner() [3/3]

base::ScopedClosureRunner::ScopedClosureRunner ( ScopedClosureRunner &&  other)

◆ ~ScopedClosureRunner()

base::ScopedClosureRunner::~ScopedClosureRunner ( )

Member Function Documentation

◆ operator bool()

base::ScopedClosureRunner::operator bool ( ) const
inlineexplicit

◆ operator=()

ScopedClosureRunner& base::ScopedClosureRunner::operator= ( ScopedClosureRunner &&  other)

◆ Release()

OnceClosure base::ScopedClosureRunner::Release ( )

◆ ReplaceClosure()

void base::ScopedClosureRunner::ReplaceClosure ( OnceClosure  closure)

◆ RunAndReset()

void base::ScopedClosureRunner::RunAndReset ( )

The documentation for this class was generated from the following file: