I'm developing a custom game launcher using CEF (Chromium Embedded Framework) on Windows.
The goal is to use CEF as a UI renderer only — not as a web browser.
However, I’m running into an issue:
Even though I’ve disabled most browser-related options, users can still trigger browser-like behavior such as:
Ctrl + Shift + I→ DevTools openingwindow.open()→ new blank popup windowsright-click → default context menu
hovering links → shows the URL in status bar
selectable text, clipboard access, etc.
I’ve already tried:
settings.windowless_rendering_enabled = true;
settings.command_line_args_disabled = true;
cmd->AppendSwitch("disable-dev-tools");
cmd->AppendSwitch("disable-extensions");
cmd->AppendSwitch("no-sandbox");
cmd->AppendSwitch("disable-popup-blocking");
And in my CefClient subclass (MiniClient), I’m handling:
OnBeforePopup→ returntrueOnOpenURLFromTab→ block non-current tabsOnBeforeBrowse→ blockchrome://,devtools://OnBeforeDevToolsPopup→ set*use_default_window = falseOnChromeCommand(IDC_DEV_TOOLS)→ returntrue
Despite this, new popup windows still open occasionally (blank window), and DevTools sometimes bypasses the handler.
What I want:
I want my CEF instance to behave like an embedded UI engine (for my game launcher), not like a browser at all —
no DevTools, no context menus, no new windows, no right-click, no shortcuts, etc.
Basically:
“CEF should behave like a sandboxed WebView — completely non-interactive outside of my app’s UI logic.”
What I’ve tried:
Overriding all handlers (
CefLifeSpanHandler,CefRequestHandler,CefContextMenuHandler, etc.)Returning
trueinOnBeforePopupUsing
windowInfo.SetAsWindowless(nullptr)Disabling everything through
OnBeforeCommandLineProcessing
Still, popups can appear or DevTools can open under some conditions.
Questions:
Is there a reliable way to disable all browser-level behaviors (popup, DevTools, context menus, etc.) in CEF 141?
Can I somehow enable or use
chrome_runtimeto gain stricter control over popup / DevTools creation?Is it possible to compile CEF in a true “UI-only” mode (no chrome://, no internal browser capabilities)?
Any guidance or minimal example that shows how to turn CEF into a pure renderer would be very helpful.