mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
abb06171b6
(Means that ISchemeHandler had to be removed - which is an unfortunate breaking change, better to be done now though)
17 lines
625 B
C#
17 lines
625 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("debug.log", System.StringComparison.OrdinalIgnoreCase))
|
|
{
|
|
//Display the debug.log file in the browser
|
|
return ResourceHandler.FromFileName("Debug.log", ".txt");
|
|
}
|
|
return new CefSharpSchemeHandler();
|
|
}
|
|
}
|
|
} |