In-process CDP bridge for the command gateway (#57) - #12
Open
pplupo wants to merge 1 commit into
Open
Conversation
CCefView::SendGatewayDevToolsMessage sends a raw UTF8-JSON DevTools Protocol message to this view's browser via CefBrowserHost::SendDevToolsMessage/AddDevToolsMessageObserver -- no external --remote-debugging-port, no websocket, no CDP-target correlation problem, since we already hold the exact CefBrowser via the view. Replaces the earlier SetGatewaySupport/GetGatewaySupport + --remote-debugging-port=0 design (that commit has been dropped from this branch, not left in history as dead code) after investigation showed CefBrowserHost already exposes SendDevToolsMessage/ ExecuteDevToolsMethod/AddDevToolsMessageObserver, unconditionally available and explicitly documented as not requiring any external DevTools/remote-debugging session (cef/linux/include/cef_browser.h). See cdp-gateway-cli-plan.md. Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
This was referenced Aug 19, 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.
In-process CDP bridge for the command gateway
Implements the SDK-side piece of #57 (Local API / Daemon Mode): adds
CCefView::SendGatewayDevToolsMessage, driving CDP'sRuntime.evaluatein-process viaCefBrowserHost::SendDevToolsMessage— no external--remote-debugging-port, noWebSocket client. Since the gateway (implemented in the companion
desktop-appsPR)already holds the exact
CefBrowserfor a target document through the app's ownview-tracking, there is no CDP-target-correlation problem to solve; this method is
purely a thin bridge from that already-resolved view to CDP.
What's here
CCefView::SendGatewayDevToolsMessage(jsonMessage, messageId, callback)— takes acomplete UTF8-encoded DevTools Protocol request, fires
callbackexactly once on thebrowser process UI thread with the matching raw JSON response (or an error if the
view no longer exists). No CEF types appear in the signature, keeping
CCefView'spublic surface CEF-detail-free like the rest of the class.
CGatewayDevToolsObserver/CCefView_Private::EnsureGatewayDevToolsObserver()—internal plumbing for correlating DevTools responses back to the caller by message id.
Testing
Single self-contained addition to
CCefView; validated by building and exercising itthrough the actual gateway command suite in the companion
desktop-appsPR (46automated tests covering Word/Cell/Slide/PDF commands plus the CLI, all passing against
this bridge).
Companion PRs: desktop-apps#40 · DesktopEditors#72