Here's the bug to follow if you want to follow progress (the anchor comment in the url is for when screenshot capturing landed)
https://bugs.chromium.org/p/chromium/issues/detail?id=546953...
Re:A list of headless web browsers
by boundlessdreamz on Tuesday November 08, 2016 @08:29AM
(#12900023)
What about startup time? phantomjs is the only headless browser I have tested which starts up relatively fast.
I build from chromium src, and my code is more or less an extension with its own BUILD.gn with a deps on //headless. Once you've built the initial tree (took a night for me), builds will be really fast.
Most of the interaction with the browser is by the chrome debugging protocol, as with "normal" chromium. Generally speaking, you want to target that, instead of the internal APIs.
There are some tweaks you need to be aware of. Chromium needs a homedir, so you want to configure that. There's state stored between sessions, so if you want process invocations stateless, consider spending some time hacking or run the process in a fresh namespace/chroot/docker/jail/whatever each time. I had to write my own protocol handler and URLRequestJobs because I render pages from archives on disk and that was the easiest way to get that started at the time.
I don't know if vanilla chromium supports it, but I'm pretty sure I've seen a --headless flag somewhere... If not, headless_shell is pretty easy to build following the official build instructions[1]. I'm running on RHEL/Fedora/CentOS. There's also unofficial images on docker hub if you want to go that route.
[1]: https://chromium.googlesource.com/chromium/src/+/lkgr/headle...