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

21 lines
628 B
C#

using TweetImpl.CefGlue.Handlers.Resource;
using TweetLib.Browser.CEF.Data;
using TweetLib.Browser.CEF.Interfaces;
using Xilium.CefGlue;
namespace TweetImpl.CefGlue.Adapters {
sealed class CefResourceHandlerFactory : IResourceHandlerFactory<CefResourceHandler> {
public static CefResourceHandlerFactory Instance { get; } = new ();
private CefResourceHandlerFactory() {}
public CefResourceHandler CreateResourceHandler(ByteArrayResource resource) {
return new ByteArrayResourceHandler(resource);
}
public string GetMimeTypeFromExtension(string extension) {
return CefRuntime.GetMimeType(extension);
}
}
}