[chromedriver] Bidi WebSocket connection(I)
Re-organize (ChromeDriver) http server into its own class so that http handler can be a friend of http server. Then we can handle the http server methods by posting on cmd thread to call http handler methods. The reason to post on cmd thread is that we can ensure thread safety when manipulating session map. Also, pass cmd task runner and pointer to session map to InitSessionParams so that session_commands can manipulate the session map upon ExecuteInitSession. Will make follow up CL to add condition check before manipulating the session map. Follow up CL will also need to parse user WebSocketUrl parameter. There is also pending discussion about the behavior WebSocket connection if the session terminates in the CL code review comments. Bug: chromedriver:3588 Change-Id: Ibbd8b12842cf2e5b93d67bf68e1b869bb93f20c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2382299 Commit-Queue: Shengfa Lin <shengfa@google.com> Reviewed-by:John Chen <johnchen@chromium.org> Cr-Commit-Position: refs/heads/master@{#803644}
Showing
This diff is collapsed.
Please register or sign in to comment