#include <message_loop_impl.h>
An abstract class that represents the differences in implementation of a fml::MessageLoop
depending on the platform.
- See also
- fml::MessageLoop
-
fml::MessageLoopAndroid
-
fml::MessageLoopDarwin
Definition at line 31 of file message_loop_impl.h.
◆ ~MessageLoopImpl()
fml::MessageLoopImpl::~MessageLoopImpl |
( |
| ) |
|
|
virtual |
◆ MessageLoopImpl()
fml::MessageLoopImpl::MessageLoopImpl |
( |
| ) |
|
|
protected |
Definition at line 45 of file message_loop_impl.cc.
48 terminated_(false) {
50}
static MessageLoopTaskQueues * GetInstance()
TaskQueueId CreateTaskQueue()
void SetWakeable(TaskQueueId queue_id, fml::Wakeable *wakeable)
◆ AddTaskObserver()
void fml::MessageLoopImpl::AddTaskObserver |
( |
intptr_t |
key, |
|
|
const fml::closure & |
callback |
|
) |
| |
Definition at line 67 of file message_loop_impl.cc.
68 {
71 << "Message loop task observer must be added on the same thread as the "
72 "loop.";
75 } else {
77 }
78}
void AddTaskObserver(TaskQueueId queue_id, intptr_t key, const fml::closure &callback)
static FML_EMBEDDER_ONLY MessageLoop & GetCurrent()
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
#define FML_LOG(severity)
#define FML_DCHECK(condition)
const myers::Point & get(const myers::Segment &)
◆ Create()
Definition at line 29 of file message_loop_impl.cc.
29 {
30#if FML_OS_MACOSX
31 return fml::MakeRefCounted<MessageLoopDarwin>();
32#elif FML_OS_ANDROID
33 return fml::MakeRefCounted<MessageLoopAndroid>();
34#elif OS_FUCHSIA
35 return fml::MakeRefCounted<MessageLoopFuchsia>();
36#elif FML_OS_LINUX
37 return fml::MakeRefCounted<MessageLoopLinux>();
38#elif FML_OS_WIN
39 return fml::MakeRefCounted<MessageLoopWin>();
40#else
41 return nullptr;
42#endif
43}
◆ DoRun()
void fml::MessageLoopImpl::DoRun |
( |
| ) |
|
Definition at line 87 of file message_loop_impl.cc.
87 {
88 if (terminated_) {
89
90 return;
91 }
92
93
95
96
97
98
99 terminated_ = true;
100
101
102
103
105
106
107
108
109
111}
void RunExpiredTasksNow()
void DisposeTasks(TaskQueueId queue_id)
◆ DoTerminate()
void fml::MessageLoopImpl::DoTerminate |
( |
| ) |
|
◆ GetTaskQueueId()
TaskQueueId fml::MessageLoopImpl::GetTaskQueueId |
( |
| ) |
const |
|
virtual |
◆ PostTask()
Definition at line 56 of file message_loop_impl.cc.
57 {
59 if (terminated_) {
60
61
62 return;
63 }
65}
void RegisterTask(TaskQueueId queue_id, const fml::closure &task, fml::TimePoint target_time, fml::TaskSourceGrade task_source_grade=fml::TaskSourceGrade::kUnspecified)
◆ RemoveTaskObserver()
void fml::MessageLoopImpl::RemoveTaskObserver |
( |
intptr_t |
key | ) |
|
Definition at line 80 of file message_loop_impl.cc.
80 {
82 << "Message loop task observer must be removed from the same thread as "
83 "the loop.";
85}
void RemoveTaskObserver(TaskQueueId queue_id, intptr_t key)
◆ Run()
virtual void fml::MessageLoopImpl::Run |
( |
| ) |
|
|
pure virtual |
◆ RunExpiredTasksNow()
void fml::MessageLoopImpl::RunExpiredTasksNow |
( |
| ) |
|
|
protected |
◆ RunSingleExpiredTaskNow()
void fml::MessageLoopImpl::RunSingleExpiredTaskNow |
( |
| ) |
|
|
protected |
◆ Terminate()
virtual void fml::MessageLoopImpl::Terminate |
( |
| ) |
|
|
pure virtual |
◆ MessageLoop
The documentation for this class was generated from the following files: