feat: expose client delegate hooks required by embedding hosts - #44
Merged
Merged
Conversation
tishion
enabled auto-merge (rebase)
September 22, 2026 00:10
The browser-side find result is currently discarded before the embedder can observe match count or final-update state. Add a default no-op onFindResult to the delegate and forward from the find handler. Co-Authored-By: Claude Code <noreply@anthropic.com>
Embedders can only filter explicit host-side navigation today; in-page navigations, redirects and iframes bypass the policy entirely, and renderer crashes are invisible: only the message router and the implicit URL reload observe them. Add default no-op hooks on the delegate and forward from the request handler, preserving the existing reload behavior. Co-Authored-By: Claude Code <noreply@anthropic.com>
CEF 126+ provides accept_extensions and accept_descriptions but the delegate only receives display filters, so embedders cannot rebuild native file dialogs. Add onFileDialogEx with the extra information; the default implementation falls back to onFileDialog so existing delegates keep working. Co-Authored-By: Claude Code <noreply@anthropic.com>
The bare name does not resolve at the delegate header level; with the 142 SDK the 4-argument declaration fails to parse (C2061) and the request handler call site no longer matches. Co-Authored-By: Claude Code <noreply@anthropic.com>
The 142.0.15 headers were rolled back on this machine per the preset criteria (OSR renderer alive but no paint callback ever arrives; see DependencyBaseline notes). The local clone's checkout drifts to 142 when repointed at upstream main; committing the 127.3.5 pin keeps the working tree consistent with the deployed/validated baseline. Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
tishion
force-pushed
the
feat/unity-callbacks
branch
from
September 22, 2026 00:15
971fb9d to
79a4736
Compare
tishion
self-requested a review
September 22, 2026 00:23
tishion
approved these changes
Sep 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds four virtual hooks to
CefViewBrowserClientDelegatethat embedding hosts currently have no way to observe. All have default implementations and are purely additive — no existing override changes behavior.onBeforeBrowsemessage_router_->OnBeforeBrowseonRenderProcessTerminatedonFindResultOnFindResultbody)onFileDialogExonFileDialog, existing subclasses unaffectedWhy these four
window.open— hosts cannot implement a navigation policy without it.onFileDialogcannot carry them.Compatibility
onFileDialogExguardsCEF_VERSION_MAJOR >= 126;onRenderProcessTerminatedkeeps a two-arg path for CEF < 124.0bba10b(CefVersion.h pin) is fork-local (127.3.5 rollback baseline) — exclude it from the merge or I can rebase it out.Validation
Downstream consumer (Unity embedding) runs these hooks through a pfn callback ABI with machine-verified regressions: navigation-policy rejections observable end-to-end (
javascript:blocked with machine-readable reasons), renderer kill injection → termination + auto-reload, find results streamed to host UI, file dialog extensions/descriptions crossing the ABI as JSON.🤖 Generated with Claude Code