Flutter Engine
The Flutter Engine
flutter_windows_engine_builder.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_WINDOWS_TESTING_FLUTTER_WINDOWS_ENGINE_BUILDER_H_
6#define FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_FLUTTER_WINDOWS_ENGINE_BUILDER_H_
7
8#include <memory>
9
10#include "flutter/fml/macros.h"
11#include "flutter/shell/platform/windows/flutter_windows_engine.h"
12#include "flutter/shell/platform/windows/keyboard_key_embedder_handler.h"
13#include "flutter/shell/platform/windows/public/flutter_windows.h"
14#include "flutter/shell/platform/windows/testing/windows_test_context.h"
15
16namespace flutter {
17namespace testing {
18
20 public:
23
24 void SetDartEntrypoint(std::string entrypoint);
25
26 void AddDartEntrypointArgument(std::string arg);
27
31
32 void SetSwitches(std::vector<std::string> switches);
33
35 std::shared_ptr<WindowsProcTable> windows_proc_table);
36
37 std::unique_ptr<FlutterWindowsEngine> Build();
38
39 private:
40 WindowsTestContext& context_;
41 FlutterDesktopEngineProperties properties_ = {};
42 std::string dart_entrypoint_;
43 std::vector<std::string> dart_entrypoint_arguments_;
44 std::vector<std::string> switches_;
47 std::shared_ptr<WindowsProcTable> windows_proc_table_;
48
49 FML_DISALLOW_COPY_AND_ASSIGN(FlutterWindowsEngineBuilder);
50};
51
52} // namespace testing
53} // namespace flutter
54
55#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_FLUTTER_WINDOWS_ENGINE_BUILDER_H_
std::function< SHORT(UINT, bool)> MapVirtualKeyToScanCode
void SetCreateKeyboardHandlerCallbacks(KeyboardKeyEmbedderHandler::GetKeyStateHandler get_key_state, KeyboardKeyEmbedderHandler::MapVirtualKeyToScanCode map_vk_to_scan)
std::unique_ptr< FlutterWindowsEngine > Build()
void SetSwitches(std::vector< std::string > switches)
void SetWindowsProcTable(std::shared_ptr< WindowsProcTable > windows_proc_table)