5#include "flutter/shell/platform/windows/testing/flutter_windows_engine_builder.h"
7#include "flutter/fml/macros.h"
8#include "flutter/shell/platform/windows/windows_proc_table.h"
21 get_key_state_(
std::move(get_key_state)),
22 map_vk_to_scan_(
std::move(map_vk_to_scan)) {}
30 get_key_state = get_key_state_;
33 if (map_vk_to_scan_) {
34 map_vk_to_scan = map_vk_to_scan_;
38 messenger, get_key_state, map_vk_to_scan);
59 dart_entrypoint_ = std::move(entrypoint);
64 dart_entrypoint_arguments_.emplace_back(std::move(arg));
68 std::vector<std::string> switches) {
69 switches_ = std::move(switches);
75 get_key_state_ = std::move(get_key_state);
76 map_vk_to_scan_ = std::move(map_vk_to_scan);
80 std::shared_ptr<WindowsProcTable> windows_proc_table) {
81 windows_proc_table_ = std::move(windows_proc_table);
85 std::vector<const char*> dart_args;
86 dart_args.reserve(dart_entrypoint_arguments_.size());
88 for (
const auto& arg : dart_entrypoint_arguments_) {
89 dart_args.push_back(arg.c_str());
92 if (!dart_args.empty()) {
103 return std::make_unique<TestFlutterWindowsEngine>(
104 project, get_key_state_, map_vk_to_scan_, std::move(windows_proc_table_));
void SetSwitches(const std::vector< std::string > &switches)
FlutterDesktopMessengerRef messenger()
std::shared_ptr< WindowsProcTable > windows_proc_table()
virtual std::unique_ptr< KeyboardHandlerBase > CreateKeyboardKeyHandler(BinaryMessenger *messenger, KeyboardKeyEmbedderHandler::GetKeyStateHandler get_key_state, KeyboardKeyEmbedderHandler::MapVirtualKeyToScanCode map_vk_to_scan)
std::function< SHORT(UINT, bool)> MapVirtualKeyToScanCode
std::function< SHORT(int)> GetKeyStateHandler
void SetCreateKeyboardHandlerCallbacks(KeyboardKeyEmbedderHandler::GetKeyStateHandler get_key_state, KeyboardKeyEmbedderHandler::MapVirtualKeyToScanCode map_vk_to_scan)
void SetDartEntrypoint(std::string entrypoint)
void AddDartEntrypointArgument(std::string arg)
FlutterWindowsEngineBuilder(WindowsTestContext &context)
~FlutterWindowsEngineBuilder()
std::unique_ptr< FlutterWindowsEngine > Build()
void SetSwitches(std::vector< std::string > switches)
void SetWindowsProcTable(std::shared_ptr< WindowsProcTable > windows_proc_table)
std::unique_ptr< KeyboardHandlerBase > CreateKeyboardKeyHandler(BinaryMessenger *messenger, KeyboardKeyEmbedderHandler::GetKeyStateHandler get_key_state, KeyboardKeyEmbedderHandler::MapVirtualKeyToScanCode map_vk_to_scan)
TestFlutterWindowsEngine(const FlutterProjectBundle &project, KeyboardKeyEmbedderHandler::GetKeyStateHandler get_key_state, KeyboardKeyEmbedderHandler::MapVirtualKeyToScanCode map_vk_to_scan, std::shared_ptr< WindowsProcTable > windows_proc_table=nullptr)
const std::wstring & GetIcuDataPath() const
const std::wstring & GetAssetsPath() const
const std::wstring & GetAotLibraryPath() const
const char * dart_entrypoint
const char * aot_library_path
const char * icu_data_path
const char ** dart_entrypoint_argv