Files
RobustToolbox/Robust.Client.WebView/Cef/CefBeforeBrowseContext.cs
Pieter-Jan Briers dae6424667 Allow swapping out internal WebViewManager implementation.
Everything moved to interfaces.
2021-11-03 15:12:49 +01:00

33 lines
786 B
C#

using Xilium.CefGlue;
namespace Robust.Client.WebView.Cef
{
internal sealed class CefBeforeBrowseContext : IBeforeBrowseContext
{
internal readonly CefRequest CefRequest;
public string Url => CefRequest.Url;
public string Method => CefRequest.Method;
public bool IsRedirect { get; }
public bool UserGesture { get; }
public bool IsCancelled { get; private set; }
internal CefBeforeBrowseContext(
bool isRedirect,
bool userGesture,
CefRequest cefRequest)
{
CefRequest = cefRequest;
IsRedirect = isRedirect;
UserGesture = userGesture;
}
public void DoCancel()
{
IsCancelled = true;
}
}
}