Files
cefsharp/CefSharp.Example/CefSharpSchemeHandlerFactory.cs
T

17 lines
642 B
C#

namespace CefSharp.Example
{
internal class CefSharpSchemeHandlerFactory : ISchemeHandlerFactory
{
public const string SchemeName = "custom";
public IResourceHandler Create(IBrowser browser, IFrame frame, string schemeName, IRequest request)
{
if (schemeName == SchemeName && request.Url.EndsWith("CefSharp.Core.xml", System.StringComparison.OrdinalIgnoreCase))
{
//Display the debug.log file in the browser
return ResourceHandler.FromFileName("CefSharp.Core.xml", ".xml");
}
return new CefSharpSchemeHandler();
}
}
}