5 #define FML_USED_ON_EMBEDDER
11 #include "flutter/fml/make_copyable.h"
12 #include "flutter/fml/message_loop.h"
13 #include "flutter/shell/common/engine.h"
14 #include "flutter/shell/common/rasterizer.h"
15 #include "flutter/shell/common/run_configuration.h"
16 #include "flutter/shell/common/shell.h"
17 #include "flutter/shell/common/switches.h"
18 #include "flutter/shell/common/thread_host.h"
29 - (instancetype)initWithName:(NSString*)labelPrefix project:(
FlutterDartProject*)projectOrNil {
30 return [
self initWithName:labelPrefix project:projectOrNil allowHeadlessExecution:YES];
33 - (instancetype)initWithName:(NSString*)labelPrefix
35 allowHeadlessExecution:(BOOL)allowHeadlessExecution {
36 NSAssert(allowHeadlessExecution == YES,
37 @"Cannot initialize a FlutterHeadlessDartRunner without headless execution.");
38 return [
self initWithName:labelPrefix
40 allowHeadlessExecution:allowHeadlessExecution
41 restorationEnabled:NO];
44 - (instancetype)initWithName:(NSString*)labelPrefix
46 allowHeadlessExecution:(BOOL)allowHeadlessExecution
47 restorationEnabled:(BOOL)restorationEnabled {
48 NSAssert(allowHeadlessExecution == YES,
49 @"Cannot initialize a FlutterHeadlessDartRunner without headless execution.");
50 return [
super initWithName:labelPrefix
52 allowHeadlessExecution:allowHeadlessExecution
53 restorationEnabled:restorationEnabled];
56 - (instancetype)init {
57 return [
self initWithName:@"io.flutter.headless" project:nil];