mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-08-17 00:31:42 +02:00
.github
.idea
bld
lib
linux
resources
windows
TweetDuck
TweetDuck.Browser
TweetDuck.Video
TweetImpl.CefSharp
Adapters
CefAdapter.cs
CefBrowserAdapter.cs
CefDragDataAdapter.cs
CefErrorCodeAdapter.cs
CefFileDialogCallbackAdapter.cs
CefFrameAdapter.cs
CefJsDialogCallbackAdapter.cs
CefMenuModelAdapter.cs
CefRequestAdapter.cs
CefResponseAdapter.cs
Component
Dialogs
Handlers
Properties
TweetImpl.CefSharp.csproj
TweetLib.WinForms.Legacy
.gitattributes
.gitignore
LICENSE.md
README.md
TweetDuck.sln
TweetDuck.sln.DotSettings
Version.cs
global.json
27 lines
636 B
C#
27 lines
636 B
C#
using CefSharp;
|
|
using TweetLib.Browser.CEF.Interfaces;
|
|
|
|
namespace TweetImpl.CefSharp.Adapters {
|
|
sealed class CefFrameAdapter : IFrameAdapter<IFrame> {
|
|
public static CefFrameAdapter Instance { get; } = new ();
|
|
|
|
private CefFrameAdapter() {}
|
|
|
|
public bool IsValid(IFrame frame) {
|
|
return frame.IsValid;
|
|
}
|
|
|
|
public bool IsMain(IFrame frame) {
|
|
return frame.IsMain;
|
|
}
|
|
|
|
public void LoadUrl(IFrame frame, string url) {
|
|
frame.LoadUrl(url);
|
|
}
|
|
|
|
public void ExecuteJavaScriptAsync(IFrame frame, string script, string identifier, int startLine = 1) {
|
|
frame.ExecuteJavaScriptAsync(script, identifier, startLine);
|
|
}
|
|
}
|
|
}
|