In file layout/base/nsDocumentViewer.cpp
Finds the same-type root (using explicit loop), to call SetIsPrinting() on it.
Recursively calls itself on all descendant DocShells in tree.
Generaly called during coarse-grained situations like starting, stopping, and checking print timings.
Sync IPC should be fine here.
Async is possible - the print logic is mostly asynchronous just a few call levels up.
- Architecture of printing code (caller code and above) is already in terms of issuing some commands and then looping on a timer to check on them.
- Should be possible to issue async “SetIsPrint” to chrome process and loop on timer waiting for result, like with everything else.