From 98d61a685f5d3d75d0dab0ae936d1828ae4b6dcc Mon Sep 17 00:00:00 2001 From: Jonathan Watt Date: Mon, 15 Jan 2018 16:57:29 +0000 Subject: [PATCH] Bug 1432124 - Clean up and document nsPrintingProxy.h. r=bobowen MozReview-Commit-ID: 6ANDHxqqQVg --- .../printingui/ipc/nsPrintingProxy.h | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/toolkit/components/printingui/ipc/nsPrintingProxy.h b/toolkit/components/printingui/ipc/nsPrintingProxy.h index 6b4d9cf5ae94..7390507dcfe2 100644 --- a/toolkit/components/printingui/ipc/nsPrintingProxy.h +++ b/toolkit/components/printingui/ipc/nsPrintingProxy.h @@ -15,25 +15,27 @@ class PRemotePrintJobChild; } } -class nsPrintingProxy: public nsIPrintingPromptService, - public mozilla::embedding::PPrintingChild +class nsPrintingProxy final: public nsIPrintingPromptService, + public mozilla::embedding::PPrintingChild { - virtual ~nsPrintingProxy(); - public: - nsPrintingProxy(); - static already_AddRefed GetInstance(); - nsresult Init(); - NS_DECL_ISUPPORTS NS_DECL_NSIPRINTINGPROMPTSERVICE + /** + * Used to proxy nsIPrintSettings.savePrintSettingsToPrefs calls to the + * parent process. + * + * @param aFlags - kInitSave* flags from nsIPrintSettings's to specify + * which settings to save. + */ nsresult SavePrintSettings(nsIPrintSettings* aPS, bool aUsePrinterNamePrefix, uint32_t aFlags); +protected: virtual PPrintProgressDialogChild* AllocPPrintProgressDialogChild() override; @@ -51,6 +53,13 @@ public: virtual bool DeallocPRemotePrintJobChild(PRemotePrintJobChild* aActor) override; + +private: + nsPrintingProxy(); + + virtual ~nsPrintingProxy(); + + nsresult Init(); }; #endif