ProcessSingleton itself won't depend on XWalkBrowserMainParts. It still expects a callback that takes two arguments (command line and current directory). The function above, that already knows about XWalkBrowserMainParts, will take the extra argument.

When registering the callback, you are currently doing:

    process_singleton_.reset(new ProcessSingleton(
      base::Bind(&ProcessSingletonNotificationCallback)));

you should change to something like this

    process_singleton_.reset(new ProcessSingleton(
      base::Bind(&ProcessSingletonNotificationCallback, base::Unretained(this))));

This will "bind" the first parameter. For ProcessSIngleton object, it will be like it is receiveing a two-parameter function with the parameters it knows. There's a description of this kind of use of base::Bind() in http://www.chromium.org/developers/design-documents/threading#base_Callback.

About the NULL check. I asked because with this approach, we should care about the case of XWalkBrowserMainParts being destroyed before ProcessSingleton (making the bind "invalid"). But given what you commented below and the fact that ProcessSingleton is owned by XWalkBrowserMainParts, I don't expect this to be a problem, so you can remove the check.