#ifndef FLUTTER_INAPPWEBVIEW_PLUGIN_WEBVIEW_ENVIRONMENT_H_ #define FLUTTER_INAPPWEBVIEW_PLUGIN_WEBVIEW_ENVIRONMENT_H_ #include #include #include #include "../flutter_inappwebview_windows_plugin.h" #include "webview_environment_channel_delegate.h" #include "webview_environment_settings.h" namespace flutter_inappwebview_plugin { class WebViewEnvironment { public: static inline const wchar_t* CLASS_NAME = L"WebViewEnvironment"; static inline const std::string METHOD_CHANNEL_NAME_PREFIX = "com.pichillilorenzo/flutter_webview_environment_"; const FlutterInappwebviewWindowsPlugin* plugin; std::string id; std::unique_ptr channelDelegate; WebViewEnvironment(const FlutterInappwebviewWindowsPlugin* plugin, const std::string& id); ~WebViewEnvironment(); void create(const std::unique_ptr settings, const std::function completionHandler); wil::com_ptr getEnvironment() { return environment_; } wil::com_ptr getWebViewController() { return webViewController_; } wil::com_ptr getWebView() { return webView_; } private: wil::com_ptr environment_; wil::com_ptr webViewController_; wil::com_ptr webView_; WNDCLASS windowClass_ = {}; }; } #endif //FLUTTER_INAPPWEBVIEW_PLUGIN_WEBVIEW_ENVIRONMENT_H_