7#include <lib/async/default.h>
27#define FOR_EACH_BINDING(V) V(HandleWaiter, Cancel)
41HandleWaiter::HandleWaiter(
Handle* handle,
44 : wait_(this, handle->handle(),
signals),
50 zx_status_t status = wait_.Begin(async_get_default_dispatcher());
54HandleWaiter::~HandleWaiter() {
71void HandleWaiter::OnWaitComplete(async_dispatcher_t* dispatcher,
72 async::WaitBase* wait,
74 const zx_packet_signal_t* signal) {
90 DartState::Scope scope(
state);
101 std::vector<Dart_Handle> owc_args{callback_.
Release(),
ToDart(status),
102 ToDart(signal->observed)};
114 std::vector<Dart_Handle> sm_args{
closure};
116 sm_args.size(), sm_args.data());
const std::weak_ptr< DartState > & dart_state() const
static fml::RefPtr< HandleWaiter > Create(Handle *handle, zx_signals_t signals, Dart_Handle callback)
void ReleaseWaiter(HandleWaiter *waiter)
struct _Dart_Handle * Dart_Handle
DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_Invoke(Dart_Handle target, Dart_Handle name, int number_of_arguments, Dart_Handle *arguments)
DART_EXPORT Dart_Handle Dart_LookupLibrary(Dart_Handle url)
DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_New(Dart_Handle type, Dart_Handle constructor_name, int number_of_arguments, Dart_Handle *arguments)
DART_EXPORT Dart_Handle Dart_Null(void)
DART_EXPORT Dart_Handle Dart_GetClass(Dart_Handle library, Dart_Handle class_name)
DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_GetField(Dart_Handle container, Dart_Handle name)
#define DART_NATIVE_NO_UI_CHECK_CALLBACK(CLASS, METHOD)
#define DART_REGISTER_NATIVE(CLASS, METHOD)
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
static guint signals[kSignalLastSignal]
#define FML_CHECK(condition)
#define FML_DCHECK(condition)
#define FOR_EACH_BINDING(V)
std::function< void()> closure
Dart_Handle ToDart(const T &object)
bool CheckAndHandleError(Dart_Handle handle)
Dart_Handle DartInvokeField(Dart_Handle target, const char *name, std::initializer_list< Dart_Handle > args)
IMPLEMENT_WRAPPERTYPEINFO(zircon, Handle)