Hi alexshalamov, could you please give more explanation why IPC is not needed?
IMHO step 1-6 is not able to behave correct to close main document. For instance,
When runtime process finds runtimes count is 1, it will close the main document immediately.
Since runtime process doesn't know the status of render process, if during this time, the RP opens a new window or is running a heavy task, the main document is still closed. This is not correct behavior. 

As for the Chat application example, it seems the background page is a better solution that event page. If the main document is idle for quite a long time(no message received from socket), I think the correct behavior is to close it. Because the event page should not be persistent. Only background page solution can guarantee main document is always running background until the whole application is killed.