HI,
I'm trying to prevent page navigation based on policies according the the suggestion in below link:
viewtopic.php?f=6&t=10394
Which suggests:
1. Cancel all requests on OnBeforeNavigation.
2. Send a message to the browser process with the relevant request information (URL, headers, etc).
3. Evaluate the information in the browser process and either:
A. Open the link in an external browser, or
B. Ignore the request, or
C. Call CefBrowser::LoadRequest to re-start the request.
The default address is "about:blank", and if navigating to "https://www.google.com", it actually creates two renderer process, and sending BeforeNavigationMessage back to browser process (from log below its in the google renderer process), however it seems when the browser process trying to send a confirmation message back to renderer process, it always goes to the "about:blank" renderer process:
[1016/143235.495:INFO:client_app_renderer.cc(104)] OnBrowserCreated id: 2 ProcessId:18272
[1016/143235.495:INFO:client_app_renderer.cc(104)] OnBrowserCreated id: 2 ProcessId:10900
[1016/143235.499:INFO:client_app_renderer.cc(120)] OnBeforeNavigation process id: 10900 URL:about:blank
[1016/143235.500:INFO:client_app_renderer.cc(120)] OnBeforeNavigation process id: 18272 URL:https://www.google.com
[1016/143235.500:INFO:client_app_renderer.cc(137)] Sending Before Navigation Message: Current Process Id: 18272 BrowserId: 2
[1016/143235.502:INFO:client_app_renderer.cc(587)] Receiving message in: 10900 for:18272
I'm using CEF Version: 3.3163.1671.g700dc25
Thanks
Jim