You don't need this. Make this callback function take a first extra parameter XWalkBrowserMainParts and when setting it, you bind the pointer of this instance.