using Moli.Desktop.Plugins; using System.Windows; namespace Moli.Desktop.WebView; /// Runtime wrapper around a WebView2 instance owned by one plugin surface. public interface IWebViewHost : IAsyncDisposable { string HostId { get; } PluginId PluginId { get; } PluginType PluginType { get; } FrameworkElement View { get; } Task InitializeAsync(WebViewHostOptions options, CancellationToken cancellationToken = default); Task NavigateAsync(Uri entryUri, CancellationToken cancellationToken = default); Task InjectBridgeAsync(PluginBridgeContext context, CancellationToken cancellationToken = default); Task DispatchLifecycleEventAsync(string eventName, object? payload, CancellationToken cancellationToken = default); Task ReloadAsync(CancellationToken cancellationToken = default); Task NotifyParentWindowPositionChangedAsync(CancellationToken cancellationToken = default); }