1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2024-11-23 17:42:46 +01:00
TweetDuck/linux/TweetImpl.CefGlue/Handlers/ResourceRequestHandlerFactory.cs
2022-02-19 18:19:13 +01:00

21 lines
1.0 KiB
C#

using TweetImpl.CefGlue.Adapters;
using TweetImpl.CefGlue.Utils;
using TweetLib.Browser.CEF.Data;
using TweetLib.Browser.CEF.Logic;
using TweetLib.Browser.Interfaces;
using Xilium.CefGlue;
namespace TweetImpl.CefGlue.Handlers {
sealed class ResourceRequestHandlerFactory {
private readonly ResourceRequestHandlerFactoryLogic<ResourceRequestHandler, CefResourceHandler, CefRequest> logic;
public ResourceRequestHandlerFactory(IResourceRequestHandler? resourceRequestHandler, ResourceHandlerRegistry<CefResourceHandler> resourceHandlerRegistry, BridgeObjectRegistry bridgeObjectRegistry) {
this.logic = new ResourceRequestHandlerFactoryLogic<ResourceRequestHandler, CefResourceHandler, CefRequest>(CefRequestAdapter.Instance, new ResourceRequestHandler(resourceHandlerRegistry, bridgeObjectRegistry, resourceRequestHandler), resourceHandlerRegistry);
}
public CefResourceRequestHandler GetResourceRequestHandler(CefRequest request, ref bool disableDefaultHandling) {
return logic.GetResourceRequestHandler(request, ref disableDefaultHandling);
}
}
}