Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | List of all members
zircon::dart::HandleWaiter Class Reference

#include <handle_waiter.h>

Inheritance diagram for zircon::dart::HandleWaiter:
fml::RefCountedThreadSafe< HandleWaiter > tonic::DartWrappable fml::internal::RefCountedThreadSafeBase

Public Member Functions

void Cancel ()
 
bool is_pending ()
 
- Public Member Functions inherited from fml::RefCountedThreadSafe< HandleWaiter >
void Release () const
 
- Public Member Functions inherited from fml::internal::RefCountedThreadSafeBase
void AddRef () const
 
bool HasOneRef () const
 
void AssertHasOneRef () const
 
- Public Member Functions inherited from tonic::DartWrappable
 DartWrappable ()
 
virtual const DartWrapperInfoGetDartWrapperInfo () const =0
 
virtual void RetainDartWrappableReference () const =0
 
virtual void ReleaseDartWrappableReference () const =0
 
Dart_Handle CreateDartWrapper (DartState *dart_state)
 
void AssociateWithDartWrapper (Dart_Handle wrappable)
 
void ClearDartWrapper ()
 
Dart_WeakPersistentHandle dart_wrapper () const
 

Static Public Member Functions

static fml::RefPtr< HandleWaiterCreate (Handle *handle, zx_signals_t signals, Dart_Handle callback)
 
static void RegisterNatives (tonic::DartLibraryNatives *natives)
 

Additional Inherited Members

- Public Types inherited from tonic::DartWrappable
enum  DartNativeFields { kPeerIndex , kNumberOfNativeFields }
 
- Protected Member Functions inherited from fml::RefCountedThreadSafe< HandleWaiter >
 RefCountedThreadSafe ()
 
 ~RefCountedThreadSafe ()
 
- Protected Member Functions inherited from fml::internal::RefCountedThreadSafeBase
 RefCountedThreadSafeBase ()
 
 ~RefCountedThreadSafeBase ()
 
bool Release () const
 
void Adopt ()
 
- Protected Member Functions inherited from tonic::DartWrappable
virtual ~DartWrappable ()
 
- Static Protected Member Functions inherited from tonic::DartWrappable
static Dart_PersistentHandle GetTypeForWrapper (tonic::DartState *dart_state, const tonic::DartWrapperInfo &wrapper_info)
 

Detailed Description

Definition at line 23 of file handle_waiter.h.

Member Function Documentation

◆ Cancel()

void zircon::dart::HandleWaiter::Cancel ( )

Definition at line 58 of file handle_waiter.cc.

58 {
59 FML_DCHECK(wait_.is_pending() == !!handle_);
60 if (handle_) {
61 // Cancel the wait.
62 wait_.Cancel();
63
64 // Release this object from the handle and clear handle_.
65 handle_->ReleaseWaiter(this);
66 handle_ = nullptr;
67 }
68 FML_DCHECK(!wait_.is_pending());
69}
void ReleaseWaiter(HandleWaiter *waiter)
Definition: handle.cc:76
#define FML_DCHECK(condition)
Definition: logging.h:103

◆ Create()

fml::RefPtr< HandleWaiter > zircon::dart::HandleWaiter::Create ( Handle handle,
zx_signals_t  signals,
Dart_Handle  callback 
)
static

Definition at line 35 of file handle_waiter.cc.

37 {
38 return fml::MakeRefCounted<HandleWaiter>(handle, signals, callback);
39}
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
static guint signals[kSignalLastSignal]
Definition: fl_settings.cc:16

◆ is_pending()

bool zircon::dart::HandleWaiter::is_pending ( )
inline

Definition at line 36 of file handle_waiter.h.

36{ return wait_.is_pending(); }

◆ RegisterNatives()

void zircon::dart::HandleWaiter::RegisterNatives ( tonic::DartLibraryNatives natives)
static

Definition at line 31 of file handle_waiter.cc.

31 {
33}
void Register(std::initializer_list< Entry > entries)
#define DART_REGISTER_NATIVE(CLASS, METHOD)
#define FOR_EACH_BINDING(V)

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