mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
17 lines
642 B
C#
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();
|
|
}
|
|
}
|
|
} |