Flutter Engine
 
Loading...
Searching...
No Matches
handle_waiter.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_SHELL_PLATFORM_FUCHSIA_DART_PKG_ZIRCON_SDK_EXT_HANDLE_WAITER_H_
6#define FLUTTER_SHELL_PLATFORM_FUCHSIA_DART_PKG_ZIRCON_SDK_EXT_HANDLE_WAITER_H_
7
8#include <lib/async/cpp/wait.h>
9#include <lib/zx/handle.h>
10
13
14namespace tonic {
15class DartLibraryNatives;
16} // namespace tonic
17
18namespace zircon {
19namespace dart {
20
21class Handle;
22
23class HandleWaiter : public fml::RefCountedThreadSafe<HandleWaiter>,
25 DEFINE_WRAPPERTYPEINFO();
28
29 public:
31 zx_signals_t signals,
32 Dart_Handle callback);
33
34 void Cancel();
35
36 bool is_pending() { return wait_.is_pending(); }
37
38 static void RegisterNatives(tonic::DartLibraryNatives* natives);
39
40 private:
41 explicit HandleWaiter(Handle* handle,
42 zx_signals_t signals,
43 Dart_Handle callback);
45
46 void OnWaitComplete(async_dispatcher_t* dispatcher,
47 async::WaitBase* wait,
48 zx_status_t status,
49 const zx_packet_signal_t* signal);
50
51 void RetainDartWrappableReference() const override { AddRef(); }
52
53 void ReleaseDartWrappableReference() const override { Release(); }
54
55 async::WaitMethod<HandleWaiter, &HandleWaiter::OnWaitComplete> wait_;
56 Handle* handle_;
58};
59
60} // namespace dart
61} // namespace zircon
62
63#endif // FLUTTER_SHELL_PLATFORM_FUCHSIA_DART_PKG_ZIRCON_SDK_EXT_HANDLE_WAITER_H_
static void RegisterNatives(tonic::DartLibraryNatives *natives)
static fml::RefPtr< HandleWaiter > Create(Handle *handle, zx_signals_t signals, Dart_Handle callback)
static guint signals[LAST_SIGNAL]
FlutterDesktopBinaryReply callback
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via dart
#define FML_FRIEND_REF_COUNTED_THREAD_SAFE(T)
#define FML_FRIEND_MAKE_REF_COUNTED(T)