Hello CEF-forum,
I am in the middle of integrating cef into a mfc-application and i do actually face the problem, that
the virtual method OnContextCreated(CefRefPtr<CefBrowser> browser,CefRefPtr<CefFrame> frame,CefRefPtr<CefV8Context> context),
which gets overridden by my CefApp-derived class "MyCefApp" is NOT getting called at all.
MyCefApp indeed is derived from CefBrowserProcessHandler and from CefRenderProcessHandler,
and also contains the foll. lines in its header-file:
virtual CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler() OVERRIDE { return this; }
virtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() OVERRIDE {return this;}
// CefBrowserProcessHandler methods:
virtual void OnContextInitialized() OVERRIDE;
== so MyCefApp declares/sets itself as BrowserProcessHandler / RenderProcessHandler.
I am loading a simple html-test-page, that should execute a small Javascript, which should result in a (alert()-) Message-Box being shown.
As i load the same html-test-page in the context of another smaller Test-CEF-application, i can exclude the possibility, that this html-test-page does contains an error.
The two applications are differing in the fact, that the one where OnContextCreated gets not called
uses the subprocess - approach.
CefString(&settings.browser_subprocess_path).FromASCII("SubProcessFactory.exe");
Transferring the subprocess - approach to the smaller Test-CEF-application (... where OnContextCreated was getting called before )
- everything else unchanged - the result was: OnContextCreated was not getting called anymore.
To me It seems, that using a subprocess prevents that OnContextCreated gets called.?!?
So my question is, what can i do, that OnContextCreated gets called using the subprocess-approach.
(We need to user the subprocess-approach...)