Hi,
I would like to know if it would be possible -only using CEF mecanisms- to SYNCHRONOUSLY retrieve browser data in a JS function executed in the renderer.
Steps:
-S1:Renderer process executes JS :
...
result = nativeSynchronousFunction(); /// this function should get data from browser and return it
...
-S2:Renderer process enters C++ coded CefV8Handler::Execute for nativeSynchronousFunction:
C++ uses a mecanism to SYNCHONOUSLY retrieve data from browser
-S3:Browser process synchronously returns the data
-S4:Renderer process receives the browser data
C++ returns the retrieved data
I tried using an URLRequest but the CefURLRequestClient callbacks are only called if we go out of the nativeSynchronousFunction
I tried to create a dedicated thread (using OS-specific thread creation) but the CefURLRequest cannot be created on an invalid CEF thread
I'd like to know if:
-using a synchronous message IPC_SYNC_MESSAGE_CONTROL1_1 would be a working solution
-another mecanism/solution exist
Thanks for your help.
PS1: the existing JS code 'result = nativeSynchronousFunction();' cannot be changed to make it work in an asynchronous way.
PS2: I have a fallback solution consisting in using TCP communications but I would prefer using CEF mecanisms that do not break the sandboxing ones