Flutter Engine
Loading...
Searching...
No Matches
message_loop_darwin.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_FML_PLATFORM_DARWIN_MESSAGE_LOOP_DARWIN_H_
6
#define FLUTTER_FML_PLATFORM_DARWIN_MESSAGE_LOOP_DARWIN_H_
7
8
#include <CoreFoundation/CoreFoundation.h>
9
10
#include <atomic>
11
12
#include "
flutter/fml/macros.h
"
13
#include "
flutter/fml/message_loop_impl.h
"
14
#include "
flutter/fml/platform/darwin/cf_utils.h
"
15
16
namespace
fml
{
17
18
class
MessageLoopDarwin
:
public
MessageLoopImpl
{
19
public
:
20
// A custom CFRunLoop mode used when processing flutter messages,
21
// so that the CFRunLoop can be run without being interrupted by UIKit,
22
// while still being able to receive and be interrupted by framework messages.
23
static
CFStringRef
kMessageLoopCFRunLoopMode
;
24
25
private
:
26
std::atomic_bool running_;
27
CFRef<CFRunLoopTimerRef>
delayed_wake_timer_;
28
CFRef<CFRunLoopRef>
loop_;
29
30
MessageLoopDarwin
();
31
32
~MessageLoopDarwin
()
override
;
33
34
// |fml::MessageLoopImpl|
35
void
Run()
override
;
36
37
// |fml::MessageLoopImpl|
38
void
Terminate()
override
;
39
40
// |fml::MessageLoopImpl|
41
void
WakeUp(
fml::TimePoint
time_point)
override
;
42
43
static
void
OnTimerFire(CFRunLoopTimerRef timer,
MessageLoopDarwin
* loop);
44
45
FML_FRIEND_MAKE_REF_COUNTED
(
MessageLoopDarwin
);
46
FML_FRIEND_REF_COUNTED_THREAD_SAFE
(
MessageLoopDarwin
);
47
FML_DISALLOW_COPY_AND_ASSIGN
(
MessageLoopDarwin
);
48
};
49
50
}
// namespace fml
51
52
#endif
// FLUTTER_FML_PLATFORM_DARWIN_MESSAGE_LOOP_DARWIN_H_
cf_utils.h
fml::CFRef
Definition
cf_utils.h:27
fml::MessageLoopDarwin
Definition
message_loop_darwin.h:18
fml::MessageLoopDarwin::kMessageLoopCFRunLoopMode
static CFStringRef kMessageLoopCFRunLoopMode
Definition
message_loop_darwin.h:23
fml::MessageLoopImpl
Definition
message_loop_impl.h:32
fml::TimePoint
Definition
time_point.h:22
macros.h
FML_DISALLOW_COPY_AND_ASSIGN
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition
macros.h:27
message_loop_impl.h
fml
Definition
ascii_trie.cc:9
FML_FRIEND_REF_COUNTED_THREAD_SAFE
#define FML_FRIEND_REF_COUNTED_THREAD_SAFE(T)
Definition
ref_counted.h:126
FML_FRIEND_MAKE_REF_COUNTED
#define FML_FRIEND_MAKE_REF_COUNTED(T)
Definition
ref_counted.h:132
fml
platform
darwin
message_loop_darwin.h
Generated on Thu Nov 6 2025 16:11:22 for Flutter Engine by
1.9.8