chrome: Implement CefFocusHandler::OnTakeFocus callback (fixes #3897)

This commit is contained in:
Marshall Greenblatt
2025-03-21 13:03:53 -04:00
parent e88e98f061
commit 8cf30843f9
6 changed files with 55 additions and 35 deletions

View File

@@ -629,6 +629,17 @@ void CefBrowserContentsDelegate::OnFocusChangedInPage(
details->is_editable_node;
}
bool CefBrowserContentsDelegate::TakeFocus(content::WebContents* source,
bool reverse) {
if (auto c = client()) {
if (auto handler = c->GetFocusHandler()) {
handler->OnTakeFocus(browser(), !reverse);
}
}
return false;
}
void CefBrowserContentsDelegate::WebContentsDestroyed() {
auto wc = web_contents();
ObserveWebContents(nullptr);