chore(browser): sync current working implementation
Rollback tag: pre-current-browser-sync-20260818
This commit is contained in:
@@ -126,45 +126,6 @@ namespace Lskj.Control
|
||||
cefBrowserSettings.GetMainFrame().LoadUrl(webResponse.ResponseUri.AbsoluteUri);
|
||||
}
|
||||
}
|
||||
|
||||
internal bool BrowserClosing(CefBrowser browser)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
internal void BrowserClosed(CefBrowser browser)
|
||||
{
|
||||
var currentBrowser = cefBrowserSettings;
|
||||
if (currentBrowser == null || browser == null)
|
||||
return;
|
||||
|
||||
bool sameBrowser = ReferenceEquals(currentBrowser, browser);
|
||||
if (!sameBrowser)
|
||||
{
|
||||
try
|
||||
{
|
||||
sameBrowser = currentBrowser.IsSame(browser);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
if (sameBrowser)
|
||||
Interlocked.CompareExchange(ref cefBrowserSettings, null, currentBrowser);
|
||||
}
|
||||
|
||||
internal void CloseBrowser()
|
||||
{
|
||||
var browser = cefBrowserSettings;
|
||||
if (browser != null)
|
||||
browser.GetHost().CloseBrowser();
|
||||
}
|
||||
|
||||
private void CloseBrowserForDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public static string ToEnUrl(string url)
|
||||
{
|
||||
string[] urlParams = url.Split('?');
|
||||
|
||||
Reference in New Issue
Block a user