@@ -50,15 +50,29 @@ void CefPythonApp::OnContextInitialized() {
5050void CefPythonApp::OnBeforeChildProcessLaunch (
5151 CefRefPtr<CefCommandLine> command_line) {}
5252
53+ // /
54+ // Called on the browser process IO thread after the main thread has been
55+ // created for a new render process. Provides an opportunity to specify extra
56+ // information that will be passed to
57+ // CefRenderProcessHandler::OnRenderThreadCreated() in the render process. Do
58+ // not keep a reference to |extra_info| outside of this method.
59+ // /
5360void CefPythonApp::OnRenderProcessThreadCreated (
5461 CefRefPtr<CefListValue> extra_info) {
5562 REQUIRE_IO_THREAD ();
63+ printf (" OnRenderProcessThreadCreated()\n " );
5664}
5765
5866// -----------------------------------------------------------------------------
5967// CefRenderProcessHandler
6068// -----------------------------------------------------------------------------
6169
70+ // /
71+ // Called after the render process main thread has been created. |extra_info|
72+ // is a read-only value originating from
73+ // CefBrowserProcessHandler::OnRenderProcessThreadCreated(). Do not keep a
74+ // reference to |extra_info| outside of this method.
75+ // /
6276void CefPythonApp::OnRenderThreadCreated (CefRefPtr<CefListValue> extra_info) {
6377}
6478
@@ -105,8 +119,15 @@ void CefPythonApp::OnFocusedNodeChanged(CefRefPtr<CefBrowser> browser,
105119 CefRefPtr<CefDOMNode> node) {
106120}
107121
122+ // /
123+ // Called when a new message is received from a different process. Return true
124+ // if the message was handled or false otherwise. Do not keep a reference to
125+ // or attempt to access the message outside of this callback.
126+ // /
108127bool CefPythonApp::OnProcessMessageReceived (CefRefPtr<CefBrowser> browser,
109128 CefProcessId source_process,
110129 CefRefPtr<CefProcessMessage> message) {
130+ std::string name = message.get ()->GetName ().ToString ();
131+ printf (" Renderer: OnProcessMessageReceived(): %s\n " , name.c_str ());
111132 return false ;
112133}
0 commit comments