Hello!
I'm trying to write a function to get the state of render process. I only need to know whether the render process is dead or alive, then I found following codes in chromium:
file: chromium\src\content\browser\frame_host\render_frame_host_manager.cc
code:
RenderFrameHostImpl* RenderFrameHostManager::Navigate(...)
{
...
// If the renderer isn't live, then try to create a new one to satisfy this
// navigation request.
if (!dest_render_frame_host->IsRenderFrameLive()) {
// Instruct the destination render frame host to set up a Mojo connection
// with the new render frame if necessary. Note that this call needs to
// occur before initializing the RenderView; the flow of creating the
// RenderView can cause browser-side code to execute that expects the this
// RFH's ServiceRegistry to be initialized (e.g., if the site is a WebUI
// site that is handled via Mojo, then Mojo WebUI code in //chrome will
// add a service to this RFH's ServiceRegistry).
....
}
}
The function 'IsRenderFrameLive' is exactly what I need, but I don't know how to get it from CEF interface.
By the way, in file src\content\browser\renderer_host\render_process_host_impl.cc, RenderProcessHostImpl::ProcessDied() will be called if render process crashed. Can I get a callback through CEF interface?