#ifndef FLUTTER_PLUGIN_WEBVIEW_CEF_PLUGIN_H_ #define FLUTTER_PLUGIN_WEBVIEW_CEF_PLUGIN_H_ #include #include #include #include namespace webview_cef { class WebviewCefPlugin : public flutter::Plugin { public: static void RegisterWithRegistrar(FlutterDesktopPluginRegistrarRef registrar); static void handleMessageProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); WebviewCefPlugin(); virtual ~WebviewCefPlugin(); // Disallow copy and assign. WebviewCefPlugin(const WebviewCefPlugin&) = delete; WebviewCefPlugin& operator=(const WebviewCefPlugin&) = delete; private: // Called when a method is called on this plugin's channel from Dart. void HandleMethodCall( const flutter::MethodCall &method_call, std::shared_ptr> result); std::shared_ptr m_plugin; FlutterDesktopTextureRegistrarRef m_textureRegistrar; std::unique_ptr< flutter::MethodChannel, std::default_delete>> m_channel = nullptr; DWORD m_mainThreadId; HWND m_hwnd; }; } // namespace webview_cef #endif // FLUTTER_PLUGIN_WEBVIEW_CEF_PLUGIN_H_