mirror of
https://github.com/chylex/TweetDuck.git
synced 2024-11-23 17:42:46 +01:00
27 lines
646 B
C#
27 lines
646 B
C#
using TweetLib.Browser.CEF.Interfaces;
|
|
using Xilium.CefGlue;
|
|
|
|
namespace TweetImpl.CefGlue.Adapters {
|
|
sealed class CefFrameAdapter : IFrameAdapter<CefFrame> {
|
|
public static CefFrameAdapter Instance { get; } = new ();
|
|
|
|
private CefFrameAdapter() {}
|
|
|
|
public bool IsValid(CefFrame frame) {
|
|
return frame.IsValid;
|
|
}
|
|
|
|
public bool IsMain(CefFrame frame) {
|
|
return frame.IsMain;
|
|
}
|
|
|
|
public void LoadUrl(CefFrame frame, string url) {
|
|
frame.LoadUrl(url);
|
|
}
|
|
|
|
public void ExecuteJavaScriptAsync(CefFrame frame, string script, string identifier, int startLine = 1) {
|
|
frame.ExecuteJavaScript(script, identifier, startLine);
|
|
}
|
|
}
|
|
}
|