- Code: Select all
bool OnProcessMessageReceived(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message)
{
//The renderer process will execute "frame->SendProcessMessage(PID_BROWSER, CefProcessMessage::Create("Test"));" at appropriate position.
frame->SendProcessMessage(PID_RENDERER, CefProcessMessage::Create(L"Test"));
return true;
}
The renderer process code:
- Code: Select all
bool OnProcessMessageReceived(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message)
{
printf("Test\n");
return true;
}
It cannot to receive process message and print "Test" on render process.