Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure base.OnBeforeDevToolsPopup is always called and remove unnecessary methods from CommonBrowserAdapter #127

Merged
merged 2 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions CefGlue.Common/CommonBrowserAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,16 +333,6 @@ public void ExitFullscreen(bool willCauseResize)
BrowserHost?.ExitFullscreen(willCauseResize);
}

public bool CanExecuteChromeCommand(int commandId)
{
return BrowserHost?.CanExecuteChromeCommand(commandId) ?? false;
}

public void ExecuteChromeCommand(int commandId, CefWindowOpenDisposition windowOpenDisposition)
{
BrowserHost?.ExecuteChromeCommand(commandId, windowOpenDisposition);
}

protected virtual CommonCefClient CreateCefClient()
{
return new CommonCefClient(this, null, _logger);
Expand Down
10 changes: 2 additions & 8 deletions CefGlue.Common/InternalHandlers/CommonCefLifeSpanHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,8 @@ protected override bool OnBeforePopup(CefBrowser browser, CefFrame frame, string

protected override void OnBeforeDevToolsPopup(CefBrowser browser, CefWindowInfo windowInfo, ref CefClient client, CefBrowserSettings settings, ref CefDictionaryValue extraInfo, ref bool useDefaultWindow)
{
if (_owner.LifeSpanHandler != null)
{
_owner.LifeSpanHandler?.HandleBeforeDevToolsPopup(browser, windowInfo, ref client, settings, ref extraInfo, ref useDefaultWindow);
}
else
{
base.OnBeforeDevToolsPopup(browser, windowInfo, ref client, settings, ref extraInfo, ref useDefaultWindow);
}
_owner.LifeSpanHandler?.HandleBeforeDevToolsPopup(browser, windowInfo, ref client, settings, ref extraInfo, ref useDefaultWindow);
base.OnBeforeDevToolsPopup(browser, windowInfo, ref client, settings, ref extraInfo, ref useDefaultWindow);
}
}
}
Loading