@rouslan documented the process model in code review of crrev.com/c/905579. We should formalize it and add it into components/spellcheck/README.md.
The original code review comment:
Mac and Android builds of Chrome call into the system spellchecker. Because the renderer process is sandboxed, only the browser process can communicate with the system. Calling into the system spellchecker has to happen from the browser process. Hence, USE_BROWSER_SPELLCHECKER.
WebKit (Renderer) <--<IPC>--> Browser <---> System spellchecker
Linux, ChromeOS, and Windows builds of Chrome have hunspell library compiled into them for spellchecking. This library is known to be unstable, so we make it live in the renderer process. If hunspell crashes, only the current tab will crash. The browser process process will survive. Since hunspell lives in the renderer process, calling into hunspell happens in the renderer process. Hence, USE_RENDERER_SPELLCHECKER or NO_BROWSER_SPELLCHECKER.
WebKit (Renderer) <---> Hunspell (Renderer)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note that only browser process is allowed to access network as well. Therefore, the optional server side spellchecker is also connected through the browser process. This is separate from both the system spellchecker used on Mac and Android and the Hunspell library used on Linux, ChromeOs, and Windows. Therefore, the full picture for Mac and Android is:
WebKit (Renderer) <--<IPC>--> Browser <---> System spellchecker
\--<Net>--> Optional server spellchecker
The full picture for Linux, ChromeOS, and Windows is:
WebKit (Renderer) <---> Hunspell (Renderer)
\--<IPC>--> Browser process <--<Net>--> Optional server spellchecker