cefsimple: CefRenderProcessHandler ::OnContextCreated

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

cefsimple: CefRenderProcessHandler ::OnContextCreated

Postby ari37086 » Thu Feb 19, 2015 11:50 am

hi,

I work with cefsimple application.
If I use CefBrowserProcessHandler ::OnContextInitialized method, I just add my functionality in SimpleApp::OnContextInitialized and it works thanks to flow that already implemented in cefsimple :
CEFInitialize --> new CEFContex --> CefContex ::CefContexInitialize --> CefContex::OnContexInitialized --> GetBrowserProcessHandler--> SimpleApp::OnContextInitialized

as appear in callstack:
cefsimple.exe!SimpleApp::OnContextInitialized() Line 20 C++
cefsimple.exe!browser_process_handler_on_context_initialized(_cef_browser_process_handler_t * self) Line 30 C++
libcef.dll!CefBrowserProcessHandlerCToCpp::OnContextInitialized() Line 28 C++
libcef.dll!CefContext::OnContextInitialized() Line 364 C++
libcef.dll!CefContext::Initialize(const CefMainArgs & args, const CefStructBase<CefSettingsTraits> & settings, CefRefPtr<CefApp> application, void * windows_sandbox_info) Line 298 C++
libcef.dll!CefInitialize(const CefMainArgs & args, const CefStructBase<CefSettingsTraits> & settings, CefRefPtr<CefApp> application, void * windows_sandbox_info) Line 124 C++
libcef.dll!cef_initialize(const _cef_main_args_t * args, const _cef_settings_t * settings, _cef_app_t * application, void * windows_sandbox_info) Line 173 C++
cefsimple.exe!CefInitialize(const CefMainArgs & args, const CefStructBase<CefSettingsTraits> & settings, CefRefPtr<CefApp> application, void * windows_sandbox_info) Line 165 C++
cefsimple.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 65 C++

BUT If I do not manage to use CefRenderProcessHandler ::OnContextCreated method (for v8 bindings ).

I don't need to run render as different process ,so I defined settings.single_process = true
and I added SimpleApp::OnContextCreated .
But when I run with debugger this function is never called.

What I'm missing ? What should be the callstack for CefRenderProcessHandler ::OnContextCreated ?

THANK YOU
ari37086
Techie
 
Posts: 28
Joined: Thu Feb 19, 2015 10:50 am

Re: cefsimple: CefRenderProcessHandler ::OnContextCreated

Postby magreenblatt » Tue Feb 24, 2015 5:11 pm

ari37086 wrote:I don't need to run render as different process ,so I defined settings.single_process = true
and I added SimpleApp::OnContextCreated .
But when I run with debugger this function is never called.

What OS and CEF version? single_process mode is generally unsupported. You should use multi-process mode instead.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: cefsimple: CefRenderProcessHandler ::OnContextCreated

Postby ari37086 » Thu Feb 26, 2015 6:48 am

I resolved this problem, thanks to your question posted 4 years ago :-)
ari37086
Techie
 
Posts: 28
Joined: Thu Feb 19, 2015 10:50 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 69 guests