public static void InitEmbedding(String binDirectory, AppFileLocation appFileLocation, Boolean useWindowCreator = true, Boolean usePromptService = true, Boolean useFilePicker = true, Boolean useHelperAppLauncherDialog = true, Boolean useTooltipTextProvider = false) { XpcomHelper.InitEmbedding(binDirectory, appFileLocation); if (useWindowCreator) { ms_WindowCreator = new WindowCreator(); var windowWatcher = XpcomHelper.GetService<nsIWindowWatcher>(Xpcom.NS_WINDOWWATCHER_CONTRACTID); windowWatcher.SetWindowCreator(ms_WindowCreator); } if (usePromptService) { ms_PromptServiceFactory = new Factory<PromptService>(Xpcom.NS_PROMPTSERVICE_CONTRACTID); ms_PromptServiceFactory.Register(); } if (useFilePicker) { ms_FilePickerFactory = new Factory<FilePicker>("@mozilla.org/filepicker;1"); ms_FilePickerFactory.Register(); } if (useHelperAppLauncherDialog) { ms_HelperAppLauncherDialogFactory = new Factory<HelperAppLauncherDialog>(Xpcom.NS_IHELPERAPPLAUNCHERDLG_CONTRACTID); ms_HelperAppLauncherDialogFactory.Register(); } if (useTooltipTextProvider) { ms_TooltipTextProviderFactory = new Factory<TooltipTextProvider>(Xpcom.NS_TOOLTIPTEXTPROVIDER_CONTRACTID); ms_TooltipTextProviderFactory.Register(); } }