1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2024-12-22 10:42:45 +01:00
TweetDuck/windows/TweetImpl.CefSharp/Handlers/CefResourceHandlerFactory.cs

20 lines
572 B
C#

using CefSharp;
using TweetLib.Browser.CEF.Data;
using TweetLib.Browser.CEF.Interfaces;
namespace TweetImpl.CefSharp.Handlers {
sealed class CefResourceHandlerFactory : IResourceHandlerFactory<IResourceHandler> {
public static CefResourceHandlerFactory Instance { get; } = new ();
private CefResourceHandlerFactory() {}
public IResourceHandler CreateResourceHandler(ByteArrayResource resource) {
return new CefByteArrayResourceHandler(resource);
}
public string GetMimeTypeFromExtension(string extension) {
return Cef.GetMimeType(extension);
}
}
}