5#define FML_USED_ON_EMBEDDER
7#include "flutter/fml/message_loop_impl.h"
12#include "flutter/fml/build_config.h"
13#include "flutter/fml/logging.h"
16#include "flutter/fml/platform/darwin/message_loop_darwin.h"
18#include "flutter/fml/platform/android/message_loop_android.h"
20#include "flutter/fml/platform/fuchsia/message_loop_fuchsia.h"
22#include "flutter/fml/platform/linux/message_loop_linux.h"
24#include "flutter/fml/platform/win/message_loop_win.h"
31 return fml::MakeRefCounted<MessageLoopDarwin>();
33 return fml::MakeRefCounted<MessageLoopAndroid>();
35 return fml::MakeRefCounted<MessageLoopFuchsia>();
37 return fml::MakeRefCounted<MessageLoopLinux>();
39 return fml::MakeRefCounted<MessageLoopWin>();
47 queue_id_(task_queue_->CreateTaskQueue()),
53 task_queue_->
Dispose(queue_id_);
71 <<
"Message loop task observer must be added on the same thread as the "
82 <<
"Message loop task observer must be removed from the same thread as "
127 std::vector<fml::closure> observers =
129 for (
const auto& observer : observers) {
135 }
while (invocation);
virtual TaskQueueId GetTaskQueueId() const
virtual void Terminate()=0
void RunExpiredTasksNow()
void AddTaskObserver(intptr_t key, const fml::closure &callback)
void PostTask(const fml::closure &task, fml::TimePoint target_time)
void RemoveTaskObserver(intptr_t key)
static fml::RefPtr< MessageLoopImpl > Create()
virtual ~MessageLoopImpl()
void RunSingleExpiredTaskNow()
fml::closure GetNextTaskToRun(TaskQueueId queue_id, fml::TimePoint from_time)
void DisposeTasks(TaskQueueId queue_id)
void RegisterTask(TaskQueueId queue_id, const fml::closure &task, fml::TimePoint target_time, fml::TaskSourceGrade task_source_grade=fml::TaskSourceGrade::kUnspecified)
std::vector< fml::closure > GetObserversToNotify(TaskQueueId queue_id) const
void AddTaskObserver(TaskQueueId queue_id, intptr_t key, const fml::closure &callback)
void RemoveTaskObserver(TaskQueueId queue_id, intptr_t key)
void SetWakeable(TaskQueueId queue_id, fml::Wakeable *wakeable)
void Dispose(TaskQueueId queue_id)
static FML_EMBEDDER_ONLY MessageLoop & GetCurrent()
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
#define FML_LOG(severity)
#define FML_DCHECK(condition)
std::function< void()> closure
const myers::Point & get(const myers::Segment &)