BorjaPascual wrote:
Yeah, it seems to be CefInitialize. Here's the code, which I copypasted fromm cefsimple:
- Code: Select all
CefRefPtr<CefApp> app(new CCefSimpleApp(std::string(url.GetBuffer())));
int exit_code = CefExecuteProcess(main_args, app, sandbox_info);
if (exit_code >= 0) {
// The sub-process has completed so return here.
return;
}
// Parse command-line arguments for use in this method.
CefRefPtr<CefCommandLine> command_line = CefCommandLine::CreateCommandLine();
command_line->InitFromString(::GetCommandLineW());
// Create the singleton manager instance.
ClientManager manager;
// Specify CEF global settings here.
CefSettings settings;
if (command_line->HasSwitch("enable-chrome-runtime")) {
// Enable experimental Chrome runtime. See issue #2969 for details.
settings.chrome_runtime = true;
}
// Initialize CEF.
CefInitialize(main_args, settings, app, sandbox_info);
CefInitialize is not calling CreateBrowser. If you are basing your code on the cefsimple app provided from CEF, then what is calling CreateBrowser is SimpleApp::OnContextInitialized.
In your code snippet, CefInitialize(main_args, settings, app /* This will implement OnContextInitialized */, sandbox_info);