Flutter macOS Embedder
engine_switches.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_SHELL_PLATFORM_COMMON_ENGINE_SWITCHES_H_
6 #define FLUTTER_SHELL_PLATFORM_COMMON_ENGINE_SWITCHES_H_
7 
8 #include <string>
9 #include <vector>
10 
11 namespace flutter {
12 
13 // Returns an array of engine switches suitable to pass to the embedder API
14 // in FlutterProjectArgs, based on parsing variables from the environment in
15 // the form:
16 // FLUTTER_ENGINE_SWITCHES=<count>
17 // FLUTTER_ENGINE_SWITCH_1=...
18 // FLUTTER_ENGINE_SWITCH_2=...
19 // ...
20 // Values should match those in shell/common/switches.h
21 //
22 // The returned array does not include the initial dummy argument expected by
23 // the embedder API, so command_line_argv should not be set directly from it.
24 //
25 // In release mode, not all switches from the environment will necessarily be
26 // returned. See the implementation for details.
27 std::vector<std::string> GetSwitchesFromEnvironment();
28 
29 } // namespace flutter
30 
31 #endif // FLUTTER_SHELL_PLATFORM_COMMON_ENGINE_SWITCHES_H_
flutter
Definition: AccessibilityBridgeMac.h:16
flutter::GetSwitchesFromEnvironment
std::vector< std::string > GetSwitchesFromEnvironment()
Definition: engine_switches.cc:14