CefRenderProcessHandler doesnt work!!

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.

CefRenderProcessHandler doesnt work!!

Postby kj91024 » Fri Aug 17, 2018 12:20 pm

Hello, i am new in cef 3 library.
I undestand that CefRenderProcessHandler should be in SimpleApp so i put it in there and put

Code: Select all
virtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() OVERRIDE {
    return this;
}


too, because i found that in internet... also i add this

Code: Select all
virtual void OnContextCreated(CefRefPtr<CefBrowser> browser,
                                CefRefPtr<CefFrame> frame,
                                CefRefPtr<CefV8Context> context);
...
void SimpleApp::OnContextCreated(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context){
  CEF_REQUIRE_UI_THREAD();
  std::cout << "COUT: OnContextCreated\n";
}



but i has been 2 hours think if that is wrong, because i dont see the message : "COUT: OnContextCreated" in the console
Please i need help x]
kj91024
Newbie
 
Posts: 2
Joined: Fri Mar 23, 2018 5:14 pm

Re: CefRenderProcessHandler doesnt work!!

Postby Czarek » Fri Aug 17, 2018 2:39 pm

OnContextCreated callback runs in the Renderer process. See General Usage wiki > Processes:
https://bitbucket.org/chromiumembedded/ ... -processes
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: CefRenderProcessHandler doesnt work!!

Postby kj91024 » Sun Aug 19, 2018 8:05 pm

Thanks for your answer.
I want you to give me an example please, because I do not know how to do it now
kj91024
Newbie
 
Posts: 2
Joined: Fri Mar 23, 2018 5:14 pm

Re: CefRenderProcessHandler doesnt work!!

Postby Czarek » Mon Aug 20, 2018 2:16 am

What OS and what are you trying to accomplish? On Windows you do not see output from subprocesses and that includes the Renderer process in which your code runs. Instead log stuff to a file using CEF's LOG() macro defined in "include/base/cef_logging.h". E.g. LOG(INFO) << "Some text"; and set CefSettings.log_file and log_severity before that.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: CefRenderProcessHandler doesnt work!!

Postby ndesktop » Mon Aug 20, 2018 4:54 am

Run your executable from a console using <yourexename>.exe --enable-logging --v=1
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am


Return to Support Forum

Who is online

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