1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-08-18 13:31:41 +02:00
Files
.github
.idea
bld
lib
linux
.idea
TweetDuck
TweetImpl.CefGlue
Adapters
CefAdapter.cs
CefBrowserAdapter.cs
CefDragDataAdapter.cs
CefErrorCodeAdapter.cs
CefFileDialogCallbackAdapter.cs
CefFrameAdapter.cs
CefJsDialogCallbackAdapter.cs
CefMenuModelAdapter.cs
CefRequestAdapter.cs
CefResourceHandlerFactory.cs
CefResponseAdapter.cs
Component
Dialogs
Handlers
Resources
Utils
Lib.cs
TweetImpl.CefGlue.csproj
.gitignore
Directory.Build.props
TweetDuck.Linux.sln
global.json
publish.sh
resources
windows
.gitattributes
.gitignore
LICENSE.md
README.md
TweetDuck.sln
TweetDuck.sln.DotSettings
Version.cs
global.json
2022-02-19 18:19:13 +01:00

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);
}
}
}