Flutter Engine
flutter_main.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 SHELL_PLATFORM_ANDROID_FLUTTER_MAIN_H_
6 #define SHELL_PLATFORM_ANDROID_FLUTTER_MAIN_H_
7 
8 #include <jni.h>
9 
10 #include "flutter/common/settings.h"
11 #include "flutter/fml/macros.h"
12 #include "flutter/runtime/dart_service_isolate.h"
13 
14 namespace flutter {
15 
16 class FlutterMain {
17  public:
18  ~FlutterMain();
19 
20  static bool Register(JNIEnv* env);
21 
22  static FlutterMain& Get();
23 
24  const flutter::Settings& GetSettings() const;
25 
26  private:
27  const flutter::Settings settings_;
28  DartServiceIsolate::CallbackHandle observatory_uri_callback_;
29 
31 
32  static void Init(JNIEnv* env,
33  jclass clazz,
34  jobject context,
35  jobjectArray jargs,
36  jstring kernelPath,
37  jstring appStoragePath,
38  jstring engineCachesPath,
39  jlong initTimeMillis);
40 
41  void SetupObservatoryUriCallback(JNIEnv* env);
42 
43  FML_DISALLOW_COPY_AND_ASSIGN(FlutterMain);
44 };
45 
46 } // namespace flutter
47 
48 #endif // SHELL_PLATFORM_ANDROID_FLUTTER_MAIN_H_
const flutter::Settings & GetSettings() const
Definition: flutter_main.cc:55
static FlutterMain & Get()
Definition: flutter_main.cc:49
static bool Register(JNIEnv *env)