crosswalk-project/crosswalk — pull request #750 by mbbill (2013-09-23 12:04:27+00:00)
Title: Added shared runtime process mode support.

The implementation include a singleton class ported from chromium and
some modification to the XWalkBrowserMainParts class. After the first
application is launched, the singleton will create two sockets in /tmp,
one for locking and the other for IPC. From the second instance, the
runtime process will first try to detect the two files, if exist, they
will pass its command line to the runtime process of the first
application and then exit, while the first application's runtime process
will then process the command line.
The GetInstance() function is added to XWalkBrowserMainParts because we
need to access the browser main parts instance from a global function -
singleton callback.
The process command line function is moved out because it's either used
for processing the command line of itself but also from other
applications.